panna Posted May 18, 2010 Share Posted May 18, 2010 I have a small GUI like getting two numbers and want to add those two numbers. Here i used AutoIt script to test this small GUI. Here is the code for your reference: If WinExists("[TITLE:Test Form]") Then ;MsgBox(0, "", "Window exists") $list = ProcessList("TestApplication.exe") for $i = 1 to $list WinActivate("[TITLE:Test Form]", "") next else MsgBox(0, "", "Please Open the Appication") EndIf $sNo = ControlGetText("[TITLE:Test Form]", "txtFirstNumber", 1770450) sleep(1000) MsgBox(0,"",$sNo) --Issue noticed here is 'ControlId' of ControlGetText() changes when we relaunch the GUI, So i am not able to get the value of the textbox to proceed further.. It would be really great,if someone could help me.. Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 18, 2010 Share Posted May 18, 2010 Look up ProcessList() in the help file. It returns an array, not an integer appropriate for your For/Next loop. Look up Controls in the help file. Review the various "special descriptions" that can be used to identify a control. 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