xentaris83 Posted August 20, 2012 Share Posted August 20, 2012 hy,i have a crapy video conversion program that needs always some butons to be presed after the conversion is done and to start the next video i made 1 code for it but i dont know how to ad to it random time delay between the functions(some movies takes longer some smaler amount of time) the first function is ok,starts the program to convert but the problem apears that where i cant get it to pres the ready and start the second func because of the random time of the conversion here is my code HotKeySet("{ENTER}", "first") While 1 Sleep(100) WEnd Func first() Send("{F2 DOWN}") While 1 $pix = PixelSearch(x, y, x, y, color, color variation) If Not @error Then Sleep(300) Send("{F2 UP}") Call("second") EndIf WEnd EndFunc ;==>first Func second() Send("{F6 DOWN}") While 1 $pix = PixelSearch(x, y, x, y, color, color variation) If Not @error Then Sleep(300) Send("{F6 UP}") Call("first") EndIf WEnd Link to comment Share on other sites More sharing options...
stormbreaker Posted August 20, 2012 Share Posted August 20, 2012 Does your program have a progress bar? If so, then there is no need to sleep(). You could just poll the progress percentage using ControlGetText(). Once it reaches 100%, execute your commands... ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1 Link to comment Share on other sites More sharing options...
JohnOne Posted August 20, 2012 Share Posted August 20, 2012 $pix = PixelSearch(x, y, x, y, color, color variation)Last parameter has a space in it you know. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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