ConsultingJoe Posted September 20, 2006 Posted September 20, 2006 expandcollapse popup#include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("AForm1", 622, 448, 192, 125) $progress = create_progress(128, 128, 193, 21, "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg") GUISetState(@SW_SHOW) For $i = 0 To 101 Step 10 set_progress( $progress, $i ) ConsoleWrite($i & @CRLF) Sleep(100) Next For $i = 101 To 0 Step -10 set_progress( $progress, $i ) ConsoleWrite($i & @CRLF) Sleep(100) Next While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;;;; EndSelect WEnd Exit Func create_progress($left, $top, $width, $height, $progressbar) If Not FileExists( $progressbar ) Then SetError( 1 ) Return -1 Else $progressbg = GUICtrlCreateLabel( "", $left-2, $top-2, $width+4, $height+4, -1, $WS_EX_CLIENTEDGE ) $progresspic = GUICtrlCreatePic( $progressbar, $left, $top, 0, $height) Dim $data[3] = [$width, $progressbg, $progresspic] Return $data EndIf EndFunc Func set_progress( $progress, $percent ) If Not IsArray( $progress ) Then SetError( 1 ) Return -1 ElseIf $percent < 101 And $percent > -1 Then $percent = $progress[0]*($percent*.01) ConsoleWrite($progress[0]) GUICtrlSetPos ( $progress[2], -1, -1, $percent ) Else Return -1 SetError( 2 ) EndIf EndFunc Check out ConsultingJoe.com
rbhkamal Posted September 20, 2006 Posted September 20, 2006 lol I didn't expect that.. very nice. RK "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix
ConsultingJoe Posted September 20, 2006 Author Posted September 20, 2006 lol I didn't expect that.. very nice.RKIts really simple I'm sure it could be made into a real ctrl or an option could be added to the progress control Check out ConsultingJoe.com
RazerM Posted September 20, 2006 Posted September 20, 2006 This is really good. Easy to use also. My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
ConsultingJoe Posted September 20, 2006 Author Posted September 20, 2006 This is really good. Easy to use also.Thanks, do you know if there is a way to send it functions like guictrlsetdata()?? Check out ConsultingJoe.com
RazerM Posted September 20, 2006 Posted September 20, 2006 I'm not sure I understand the question, can you explain? My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
ConsultingJoe Posted September 20, 2006 Author Posted September 20, 2006 I'm not sure I understand the question, can you explain?so my functions that create the control make it act like a control so instead of my func to set the progress you can just do guictrlsetdata, or guictrldelete Check out ConsultingJoe.com
RazerM Posted September 20, 2006 Posted September 20, 2006 You can't do that. My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
ConsultingJoe Posted September 20, 2006 Author Posted September 20, 2006 You can't do that.ok, just seeing if there was a way, I was thinking of a dummy control to emulate the real control Check out ConsultingJoe.com
ConsultingJoe Posted September 20, 2006 Author Posted September 20, 2006 Nice Larry. I just did the indented label to show that it was a progress bar so the user know that and its not just an empy space until the progress begins BTW: do you know when the menu gui function was add? I love it Check out ConsultingJoe.com
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now