piyanut Posted December 24, 2015 Posted December 24, 2015 (edited) How to click OK in MessageBoxI try to use this code but not working$title = "Start Load user!!"; the message title WinWaitActive("[CLASS:#32770]", "") If WinActive("[CLASS:#32770]") Then ControlClick("[CLASS:Button; INSTANCE:1]","OK","2","",1) Else EndIf Edited December 24, 2015 by piyanut
Developers Jos Posted December 24, 2015 Developers Posted December 24, 2015 Show the au3info information of that button so we can see it's Control information.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Developers Jos Posted December 24, 2015 Developers Posted December 24, 2015 That looks like the info for the window with a start button. Please post the same info when the window is shown you posted first and then have the mouse hover over the OK button.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
piyanut Posted December 24, 2015 Author Posted December 24, 2015 Here Window info please WinWaitActive("[CLASS:#32770]","Start Load user!!") ControlClick("[CLASS:#32770]","OK","2","",1) that not work how?
gruntydatsun Posted December 24, 2015 Posted December 24, 2015 How does it go if you don't set the window name in either function call?What happens if you put a 3 second delay between the winwaitactive and the button click. Also, I hear Santa.
Developers Jos Posted December 24, 2015 Developers Posted December 24, 2015 You are now showing the window information, not the control information of the button. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
piyanut Posted December 24, 2015 Author Posted December 24, 2015 You are now showing the window information, not the control information of the button. JosI write C# programming my app and show only dialog message that show start and finish message
TheSaint Posted December 24, 2015 Posted December 24, 2015 Also, I hear Santa.You rang? @piyanutIt seems to me you are dealing with two dialog boxes.In the first, your window text is clearly - Load user finished!!In the second (with Au3 Info), it is - Start Load user!!It may be you are mixing up the two? Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
piyanut Posted December 24, 2015 Author Posted December 24, 2015 (edited) You rang? @piyanutIt seems to me you are dealing with two dialog boxes.In the first, your window text is clearly - Load user finished!!In the second (with Au3 Info), it is - Start Load user!!It may be you are mixing up the two?Sorry i capture wrong how to used commad ControlClick("[CLASS:#32770]","OK","2","",1) not work How to fix to auto click button "OK" in Message Box? Edited December 24, 2015 by piyanut
TheSaint Posted December 24, 2015 Posted December 24, 2015 Some of your parameters are wrong by the look of it.ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] )You need to get the third parameter (controlID) correct if is not '2', and the button (should be left).ControlClick ("[CLASS:#32770]", "OK", controlID, "left", 1) Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
piyanut Posted December 24, 2015 Author Posted December 24, 2015 (edited) thank you that work , i am newbie autoit Edited December 24, 2015 by piyanut
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