Sign in to follow this  
Followers 0
jorgeng

close program at 22.30 with yes no options

5 posts in this topic

I have a stock program which has to be closed manually every workday when us stock market ends at evening.

I shut down computer at night with airytec switch off automatic and then important values ain't written down to disk and the result when opening program next workday is that

there is not correct values which was created yesterday.

Winclose won't work since i have to manually click yes (question if i want to close the program)

I know the class from autoit3 window info.

What will i use to close a program at kl.22.30 and click yes in windows box so values is written to disk?

 

 

Share this post


Link to post
Share on other sites



When you do Winclose, and the yes/no pop up appears, what information does the AutoIt Window Info Tool give you on that pop up? Can you capture the ControlID of the Yes button and do a ControlClick?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

When i use winclose there is no yes/no popup option available...

attached screenshot show values for button no = 2

avsluta nat.png

Edited by jorgeng

Share this post


Link to post
Share on other sites

So try something like this:

WinWait("[CLASS:#32770]", "")
ControlClick("[CLASS:#32770]", "", "Button2")

To narrow it further, look at the "Visible Text" tab in the Window Info Tool, and plug some of that text into the 2nd parameter on both WinWait and ControlClick.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Ok, but what is the command to click on the close button in upper right corner after done:

WinActivate("[CLASS:WindowsForms10.Window.8.app.0.378734a]", "")

?

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