Jump to content

Automated ControlClick() working first time only


Recommended Posts

I have a script I'm working on and I just about have it complete...save one piece of functionality. The script proceeds through 3 or 4 different screens (depending on the series of button clicks), but one of the automated ControlClick() commands works (welcome screen), but the same automated ControlClick() commands fails (defer screen). Can anyone provide some insight as to why the aforementioned ControlClick() isn't working, but the first one does? I've attached a basic flowchart of how the code is supposed to work as well as the code. Thanx in advance.

flowchart.png

code.txt

Link to comment
Share on other sites

Another possibility is that your timer expires before the window shows up.  ControlClick would error out then. 

BTW, I cannot emphase it more, put some error handling in your code. It will not hurt you.  And at least you would know when a statement fails...

Link to comment
Share on other sites

Danp2, blanking the text data element made no difference. As you'll note, the first welcome screen was already that way, but works without issue.

Nine, the expiration of the timer (while the defer screen is visible), is what is supposed to trigger the controlclick, as in the first welcome screen. Also, what suggestions would you make as pertains to error handling?

Link to comment
Share on other sites

As @Danp2and I suggested, put some error handling.  One easiest way is to ConsoleWrite return value AND @error after each statement to understand which of the lines is failing.  The way you programmed your script is like a blind running a 100m.  He may get in the right direction and win.  But what happens when he runs against the crowd ?

Link to comment
Share on other sites

Link to comment
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
 Share

×
×
  • Create New...