Jump to content

Recommended Posts

Posted (edited)

How would I go about writing a IF Then statement if the conrol send fails?

Run ("Notepad.exe")
WinWaitActive ("Untitled - Notepad")
ControlSend("Untitled - Notepad", "", "Edit1", ("Provider Practice Record"))

I have been running into lag alot. So my script has been missing input. I would like to be able to have it retry to put in "Provider Practice Record" if it misses. 

I am assuming  a if then statement is what I need but I am not sure what ControlSend will return if it tries to send to Edit1 and it is not there. 

Or do I need to just add a timeout? 

 

Edited by SkysLastChance

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

Posted

I believe so. I will have to keep testing to see if it works. Thank you!

How did you know a failed value is 0? 

You miss 100% of the shots you don't take. -Wayne Gretzky -Michael Scott

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
×
×
  • Create New...