brimoner Posted March 12, 2007 Share Posted March 12, 2007 I'm working on a script that opens a software program and sends commands to download remote data. This all works great. The problem is that if an error occurs during the download, an error window pops up, and requires a SEND "Enter" to exit. If the window does not pop up, I don't want to send the "enter". Is there a function in Auto IT that will send the "enter" if the error window pops up, but continue with the script if the window does not pop up? Thanks Sean Link to comment Share on other sites More sharing options...
seandisanti Posted March 12, 2007 Share Posted March 12, 2007 I'm working on a script that opens a software program and sends commands to download remote data. This all works great.The problem is that if an error occurs during the download, an error window pops up, and requires a SEND "Enter" to exit. If the window does not pop up, I don't want to send the "enter".Is there a function in Auto IT that will send the "enter" if the error window pops up, but continue with the script if the window does not pop up?ThanksSeancheck out AdlibEnable() in the help file. you can have an adlib function watch for the error message and deal with it if it pops up. Link to comment Share on other sites More sharing options...
brimoner Posted March 12, 2007 Author Share Posted March 12, 2007 check out AdlibEnable() in the help file. you can have an adlib function watch for the error message and deal with it if it pops up.O.K. that works great! Thanks.Another question...how do I tell the script to advance to a certain line in the code, once the error window is closed? kinda like a GOTO statement. If WinActive (error window) send (enter) then goto line XXX and continue running the script.Sean Link to comment Share on other sites More sharing options...
seandisanti Posted March 12, 2007 Share Posted March 12, 2007 O.K. that works great! Thanks.Another question...how do I tell the script to advance to a certain line in the code, once the error window is closed? kinda like a GOTO statement. If WinActive (error window) send (enter) then goto line XXX and continue running the script.Seanuse winwait()'s etc to make sure your main thread waits for each window before continuing, so that if the error window pops up, it's already waiting for the next window to come up, then your adlib kills the error window, and the correct window comes up, then the script continues as it should. -Sean also. Link to comment Share on other sites More sharing options...
brimoner Posted March 13, 2007 Author Share Posted March 13, 2007 use winwait()'s etc to make sure your main thread waits for each window before continuing, so that if the error window pops up, it's already waiting for the next window to come up, then your adlib kills the error window, and the correct window comes up, then the script continues as it should. -Sean also.Thanks again. I'll try it tomorrow.Sean Link to comment Share on other sites More sharing options...
seandisanti Posted March 13, 2007 Share Posted March 13, 2007 Thanks again. I'll try it tomorrow.SeanNp, glad to help. Did you get your other issue worked out? 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