Sign in to follow this  
Followers 0
Spongey

test for prompt

6 posts in this topic

In an "if" statement, how do I test if there is a prompt waiting for input ?

Thanks.

Mike

Share this post


Link to post
Share on other sites



Do you mean from an InputBox? If so, the InputBox blocks program execution, so it cannot continue until the InputBox is satisfied (or times out, if you give it the optional timeout parameter).

If you want to check to see if it timed out, read up on the documentation on how to check the @error macro.


#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Share this post


Link to post
Share on other sites

It's from another application that requires input information. It's not an AutoIT Input Box. The application doesn't time out.

Share this post


Link to post
Share on other sites

Well, the time out was specific to the InputBox, so you can pretty well ignore that part.

If it's in an external program there are a couple of ways to test for it.

If it's a popup window, usually you can use WinExists, or WinGetTitle ("[active]")

If it's not, you'll have to parse through WinGetText() on the main window and search for keywords specific to that particular situation.

Good luck :(


#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

Share this post


Link to post
Share on other sites

I was hoping there was a prompt detection method like I use in unix shell scripting.

Thanks anyway.

Share this post


Link to post
Share on other sites

Np, good luck :(


#fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja!

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