anandnz Posted January 30, 2011 Share Posted January 30, 2011 (edited) Hi there again. I am looking for a command which Does nothing until a application throws up a dialog box. I want a certain timeout. After executing the batch file, it takes a variable time for the output generation which can range from several hours to a mintue depending on the data Run comamnd Dont do anything till a dialog box comes If the dialog box is "complete" put in pass.log run a second batch file. else put in fail log I tried the following. But the script does not react to the output window ( dialog box), The name is copied from the AltiT windo Info. Please can some one review my code. #include <File.au3> Local $working =1 Run("P:\technology\Requirements\AutoIT_Script_documents\Scripts\thirdparty.bat") While ($working==1) if WinActive("Information") Then Send("Enter") $dirworking = 0 Else Sleep(2000) EndIf WEnd ;While (!WinWaitActive("Information")) ; sleep(2000) ;WEnd Help is appreciated Thanks in Advance Edited January 30, 2011 by anandnz Link to comment Share on other sites More sharing options...
JohnOne Posted January 30, 2011 Share Posted January 30, 2011 (edited) Hi there again. I am looking for a command which Does nothing until a application throws up a dialog box. I want a certain timeout. = WinWaitActive()But i want a if condition for this dialog box to come. = WinExists()Activate the window if not activate. = WinAcivate()send("Enter")Help is appreciatedThanks in Advance Edited January 30, 2011 by JohnOne 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...
anandnz Posted January 30, 2011 Author Share Posted January 30, 2011 Thank you john it works. I will try developing the program further.... much appreciated. 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