Sign in to follow this  
Followers 0
brimoner

IF statement

6 posts in this topic

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

Share this post


Link to post
Share on other sites



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

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.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

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.


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks again. I'll try it tomorrow.

Sean

Np, glad to help. Did you get your other issue worked out?

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0