Spongey Posted March 25, 2010 Share Posted March 25, 2010 In an "if" statement, how do I test if there is a prompt waiting for input ? Thanks. Mike Link to comment Share on other sites More sharing options...
Fulano Posted March 25, 2010 Share Posted March 25, 2010 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! Link to comment Share on other sites More sharing options...
Spongey Posted March 25, 2010 Author Share Posted March 25, 2010 It's from another application that requires input information. It's not an AutoIT Input Box. The application doesn't time out. Link to comment Share on other sites More sharing options...
Fulano Posted March 25, 2010 Share Posted March 25, 2010 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! Link to comment Share on other sites More sharing options...
Spongey Posted March 25, 2010 Author Share Posted March 25, 2010 I was hoping there was a prompt detection method like I use in unix shell scripting. Thanks anyway. Link to comment Share on other sites More sharing options...
Fulano Posted March 25, 2010 Share Posted March 25, 2010 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! 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