dushkin Posted April 29, 2010 Share Posted April 29, 2010 (edited) Hello all, 1. I am working on the Windows scientific calculator. Please review this script:If WinExists("Calculator") Then $hBtn1 = WinGetHandle("Calculator", "Sta") MsgBox(0, "hBtn1", $hBtn1) $hBtn2 = WinGetHandle("Calculator", "CE") MsgBox(0, "hBtn2", $hBtn2) EndIf Why do I get the same value for both of the buttons? Unfortunately I am quite sure I am not using the function correctly... :-(2. On larger applications, it takes me even 20 seconds until I get the handle. Is there a faster way to get a button handle, given only the text on it?Thanks. Edited April 29, 2010 by dushkin Link to comment Share on other sites More sharing options...
dushkin Posted April 29, 2010 Author Share Posted April 29, 2010 (edited) OK OK - Got it!!!!(Is there a way to remove topics???)Hello all, 1. I am working on the Windows scientific calculator. Please review this script:If WinExists("Calculator") Then $hBtn1 = WinGetHandle("Calculator", "Sta") MsgBox(0, "hBtn1", $hBtn1) $hBtn2 = WinGetHandle("Calculator", "CE") MsgBox(0, "hBtn2", $hBtn2) EndIf Why do I get the same value for both of the buttons? Unfortunately I am quite sure I am not using the function correctly... :-(2. On larger applications, it takes me even 20 seconds until I get the handle. Is there a faster way to get a button handle, given only the text on it?Thanks. Edited April 29, 2010 by dushkin Link to comment Share on other sites More sharing options...
sezercan19 Posted April 29, 2010 Share Posted April 29, 2010 use ControlGetHandle() If WinExists("Calculator") Then $hBtn1 = ControlGetHandle("Calculator","","Button4") ;sta button MsgBox(0, "hBtn1", $hBtn1) $hBtn2 = ControlGetHandle("Calculator","","Button23") ;CE button MsgBox(0, "hBtn2", $hBtn2) EndIf Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 29, 2010 Share Posted April 29, 2010 OK OK - Got it!!!!(Is there a way to remove topics???)We would rather you didn't. This forum builds a searchable history of questions and answers, and we encourage users to search before posting questions. There won't be anything to search if topics are deleted as the questions are answered. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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