jorgeng Posted November 16, 2015 Share Posted November 16, 2015 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 thatthere 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? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 16, 2015 Moderators Share Posted November 16, 2015 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! Link to comment Share on other sites More sharing options...
jorgeng Posted November 16, 2015 Author Share Posted November 16, 2015 (edited) When i use winclose there is no yes/no popup option available...attached screenshot show values for button no = 2 Edited November 16, 2015 by jorgeng Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 16, 2015 Moderators Share Posted November 16, 2015 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! Link to comment Share on other sites More sharing options...
jorgeng Posted November 16, 2015 Author Share Posted November 16, 2015 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]", "")? 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