Jump to content

Recommended Posts

Posted

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?

 

 

  • Moderators
Posted

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?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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
  • Moderators
Posted

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted

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]", "")

?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...