cyanidemonkey Posted July 23, 2007 Share Posted July 23, 2007 (edited) I am trying to auto move a slider in an AutoIt GUI from 0 to 100 over a space of time in seconds (say 15 sec for example - the actual time is feed via a varible), how would I do this? Edited July 23, 2007 by cyanidemonkey My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator Link to comment Share on other sites More sharing options...
Generator Posted July 23, 2007 Share Posted July 23, 2007 For $i=1 to 100 GUICtrlSetData($Slider,1) Sleep(150) Next That will take 15 seconds to proceed. Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 23, 2007 Share Posted July 23, 2007 For $i=1 to 100GUICtrlSetData($Slider,1)Sleep(150)NextThat will take 15 seconds to proceed.Change that to: GUICtrlSetData($Slider,$i) ...or it won't proceed at all! Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Generator Posted July 23, 2007 Share Posted July 23, 2007 Change that to: GUICtrlSetData($Slider,$i) ...or it won't proceed at all! My mistake, didn't see that. Link to comment Share on other sites More sharing options...
cyanidemonkey Posted July 23, 2007 Author Share Posted July 23, 2007 (edited) thanks fellas. if I put this in my while loop it will it slow down the rest of my script while it is moving the slider across? Sorry proberly should have explained the senario better. While 1 [other code doing stuff] If $foo = $bar Then For $i=1 to 100 GUICtrlSetData($Slider,$i) Sleep(150) Next EndIf [other code doing stuff] WEnd (havn't tried it yet, I'm still at work, will when I get home later) Edited July 23, 2007 by cyanidemonkey My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator Link to comment Share on other sites More sharing options...
Generator Posted July 23, 2007 Share Posted July 23, 2007 thanks fellas. if I put this in my while loop it will it slow down the rest of my script while it is moving the slider across? Sorry proberly should have explained the senario better. While 1 [other code doing stuff] If $foo = $bar Then For $i=1 to 100 GUICtrlSetData($Slider,$i) Sleep(150) Next EndIf [other code doing stuff] WEnd (havn't tried it yet, I'm still at work, will when I get home later)While your script is doing the slide bar it can't do anything else, so you might want to inject some of the script in. Link to comment Share on other sites More sharing options...
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