vickerps Posted April 25, 2004 Posted April 25, 2004 I have just seen the Progress function in the help file. Basically on my scripts when autoit running through a script and all the users see nothing happening. To stop them thinking the prog has frozen i use SplashTextOn and splashoff and somthing like please wait. For example SplashTextOn (please wait) ....autoit is doing copying or fileinstall ... autoit doing calculations ...autoit doing iniwrite or iniread splashoff msgbox (finished) could i use the progess on, set and off function in the same way. How?
scriptkitty Posted April 26, 2004 Posted April 26, 2004 sure, and it gives them a bar to show how much estimated time left. ex from helpfile: 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() you can also just use it in say a 3 step process: ProgressOn("Progress Meter", "Starting step 1 of 3", "0 percent",0,0) sleep(1000) msgbox(1,"step1","done",10) ProgressSet( 33, "step 1 done") sleep(1000) msgbox(1,"step2","done",10) ProgressSet( 66, "step 1 done") sleep(2000) ProgressSet(100 , "Done", "Complete") msgbox(1,"step3","done",10) sleep(500) ProgressOff() AutoIt3, the MACGYVER Pocket Knife for computers.
vickerps Posted April 26, 2004 Author Posted April 26, 2004 Thanks Script kitty How do u implement it in the little example i gave. For example if i put it in front of the code it would just do the progressbar until it reach 100% and then carry on doing the rest of the script wouldn't it? Would you put it under the adlib section? please help?
scriptkitty Posted April 26, 2004 Posted April 26, 2004 You are making it far too hard. Just start the progress bar,and update it as you go along, and finally end it at the end. Manually put in the ProgressSet() parts. If you want to get complex, you could assign a variable to the progress, and adlib it, but you don't need to go through all that for something this simple. Later on when more familiar you can do many more things with it. ; put this at the begining. ProgressOn("Progress Meter", "Starting step 1 of 3", "0 percent",0,0) sleep(1000) ; put a bunch of code here msgbox(1,"step1","done",10) ProgressSet( 33, "step 1 done") ; put a bunch more code here sleep(1000) msgbox(1,"step2","done",10) ; put the last of your code here ProgressSet( 66, "step 1 done") sleep(2000) ProgressSet(100 , "Done", "Complete") msgbox(1,"step3","done",10) sleep(500) ProgressOff() AutoIt3, the MACGYVER Pocket Knife for computers.
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