jerwin Posted August 7, 2008 Posted August 7, 2008 can anyone can give me Loading Progress script for GUI that when i click start it the progress will load up to 100% then the script for start will execute... thanx in advance... [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font]
BrettF Posted August 7, 2008 Posted August 7, 2008 Well depends on what your script is doing in the background. If you want to make just a loading bar, then really, I see no point in it, and really 30seconds in the helpfile for ProgressOn is all you need. Also, you signature is way too long. Makes me have to scroll more than i want too Please shorten it. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
jerwin Posted August 7, 2008 Author Posted August 7, 2008 Well depends on what your script is doing in the background. If you want to make just a loading bar, then really, I see no point in it, and really 30seconds in the helpfile for ProgressOn is all you need. Also, you signature is way too long. Makes me have to scroll more than i want too Please shorten it. sorry about my signature.... heres my progress bar.... ProgressOn("Progress Meter", "Increments every second", "0 percent") For $i = 10 to 100 step 10 sleep(1000) ProgressSet( $i, $i & " percent") Next ProgressSet(100 , "Done", "Complete") sleep(500) ProgressOff() but i want it to be like this......... after loading the real gui will show have an idea how to do it??? [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font]
BrettF Posted August 7, 2008 Posted August 7, 2008 #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $pic = @ScriptDir & "\Screenie.jpg" $i = 1 $timestamp = TimerInit() #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("AForm1", 460, 326, 193, 115) $Pic1 = GUICtrlCreatePic($pic, 0, 0, 460, 300, BitOR($SS_NOTIFY, $WS_GROUP)) $Progress1 = GUICtrlCreateProgress(2, 304, 456, 17) GUICtrlSetData(-1, $i) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case TimerDiff($timestamp) < 20 $timestamp = TimerInit() $i += 1 If $i > 100 Then $i = 0 GUICtrlSetData($Progress1, $i) EndSwitch WEnd You will need the picture: Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
BrettF Posted August 7, 2008 Posted August 7, 2008 (edited) Sorry For Triple Post Edited August 7, 2008 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
BrettF Posted August 7, 2008 Posted August 7, 2008 (edited) Sorry For Triple Post- Edited August 7, 2008 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
jerwin Posted August 7, 2008 Author Posted August 7, 2008 Sorry For Triple Post-ahmm sir.. the loading dont have end... i wait for 5 mins but still the gui is loading... [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font]
BrettF Posted August 7, 2008 Posted August 7, 2008 Course it doesn't end.... I did that on purpose. You need to study the code, work out how it works (It's a just a Basic GUI...) Depending on what you are loading, you can set the progress... GUICtrlSetData ($Progress1, ammount...) I must add, I will not give it to you on a silver platter. I was hoping you would take the time to work out what I did, but obviously I was wrong.... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
jerwin Posted August 7, 2008 Author Posted August 7, 2008 oh sure thanx ur nise teacher...... thanx for the info i apreaciate it so much.... [font="Arial Black"]Looking for a partner in making Perfect Bot for DEKARONPm me if you wanna join.....[/font]
SuperFlyChetGuy Posted August 13, 2008 Posted August 13, 2008 This is what I've been looking for but I still don't know enough about it to use it in a program. I don't know where to put my variables to make the progress change or how to use it in my programs. The SuperFlyChetGuy
BrettF Posted August 15, 2008 Posted August 15, 2008 Allright, I'll comment the script, and tell you exactly what we're doing... #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $pic = @ScriptDir & "\Screenie.jpg"; This is the path to the image. $i = 1; initial value for the progress $timestamp = TimerInit(); start the timer- ONLY NEEDED FOR THIS EXAMPLE #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("AForm1", 460, 326, 193, 115); Create The GUI $Pic1 = GUICtrlCreatePic($pic, 0, 0, 460, 300, BitOR($SS_NOTIFY, $WS_GROUP)); Create the picture control, and set the pic to what we told it to have earlier. $Progress1 = GUICtrlCreateProgress(2, 304, 456, 17); Create the progress control GUICtrlSetData(-1, $i);Set the progress to the inital value we set earlier GUISetState(@SW_SHOW);Show the GUI #EndRegion ### END Koda GUI section ### While 1;Start loop $nMsg = GUIGetMsg();Get the messages from the gui (Events- like button clicks etc.) Switch $nMsg;Switch $nMsg. A switch conditionally runs statements. Case $GUI_EVENT_CLOSE; If the Big Red X is pressed.... Exit ; ... Then Exit Case TimerDiff($timestamp) < 20; If the timer is more than 20ms, change the progress. This is only for out example $timestamp = TimerInit(); Reset the timer $i += 1; Increase the value of what we're setting the progress to If $i > 100 Then $i = 0; If it is more than 100, then set it to be 0 again. GUICtrlSetData($Progress1, $i); Set the progress EndSwitch WEnd And here is a different example of setting the progress bar. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <Misc.au3> $i = 1; Set the initial value of the progress $Form1 = GUICreate("AForm1", 460, 326, 193, 115); Create The GUI $Progress1 = GUICtrlCreateProgress(2, 304, 456, 17); Create the progress control GUICtrlSetData(-1, $i);Set the progress to the inital value we set earlier GUISetState(@SW_SHOW);Show the GUI #EndRegion ### END Koda GUI section ### While 1;Start loop $nMsg = GUIGetMsg();Get the messages from the gui (Events- like button clicks etc.) Select Case $nMsg = $GUI_EVENT_CLOSE; If the Big Red X is pressed.... Exit ; ... Then Exit Case _IsPressed("26") = 1; If Up Arrow is pressed Do; Do The following until we release the key Sleep(50); Sleep so we don't increment the slider too fast $i += 1; Increase the value by 1 If $i > 100 Then $i = 100; If it = 100 then keep it at 100 GUICtrlSetData($Progress1, $i);Set the progress Until _IsPressed("26") = 0; Testing if the key is released Case _IsPressed("28") = 1; If Down Arrow is pressed Do; Do The following until we release the key Sleep(50); Sleep so we don't increment the slider too fast $i -= 1; Decrease the value by 1 If $i < 0 Then $i = 0; If it is less than 0, then keep it at 0 GUICtrlSetData($Progress1, $i); Set the Progress Until _IsPressed("28") = 0; Testing if the key is released EndSelect WEnd Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
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