sajgon Posted December 17, 2007 Share Posted December 17, 2007 Can someone write me simple example of script which will press button on external program. Let it be(external program) test.exe which title is testwindow and it have 1 button called buttonA and 1 radio called radioA. What will be the script which will select radioA and then press ButtonA? Thx. Link to comment Share on other sites More sharing options...
Zedna Posted December 17, 2007 Share Posted December 17, 2007 Look into Helpfile at ControlCommand() ControlClick() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
FreeSiker Posted December 17, 2007 Share Posted December 17, 2007 Can someone write me simple example of script which will press button on external program. Let it be(external program) test.exe which title is testwindow and it have 1 button called buttonA and 1 radio called radioA. What will be the script which will select radioA and then press ButtonA? Thx. Try this but am not shure about our question #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 633, 447, 193, 125) $Radio1 = GUICtrlCreateRadio("Radio1", 88, 56, 97, 65) $Button1 = GUICtrlCreateButton("Button1", 96, 160, 169, 153, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() If ProcessExists ( "test.exe" ) Then GUICtrlSetState ( $Radio1, $GUI_CHECKED ) MsgBox (0, "Info", "process detected") ; the process action on detection EndIf Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Radio1 Case $Button1 MsgBox (0, "Info", "process detected") ;The same action than the detection EndSwitch WEnd Link to comment Share on other sites More sharing options...
sajgon Posted December 17, 2007 Author Share Posted December 17, 2007 FreeSiker My problem is that i want to interract with external GUI which wasnt made by me. I need to press buttons end edit checkbox states on this external GUI with some hotkeys. I know how to do this with sending my mouse over it or with sending LEFT, RIGHT, TAB and ENTER buttons but its not satisfaying me:P I used tool called "AutoIt Window Info Tool" and get some informations about the keys but have no ide what to do with this xD One of the controls give me this: Control Class: WindowsForms10.BUTTON.app.0.378734a Instance: 8 ClassnameNN: WindowsForms10.BUTTON.app.0.378734a8 ID: 721490 Text: 800x600 Position: 18, 63 Size: 82, 26 ControlClick Coords: 28, 9 Style: 0x5601000B ExStyle: 0x00000000 Handle: 0x000B0252 Window Title: WinMode Controller Class: WindowsForms10.window.8.app.0.378734a Position: 945, 94 Size: 316, 195 Style: 0x16CA0000 ExStyle: 0x00010101 Handle: 0x00040248 Is it possible to make a hotkey which will simulate checking this radio? How shoul i fill ControlCommand() and ControlClick() args whit informations gained with this tool? Link to comment Share on other sites More sharing options...
Squirrely1 Posted December 18, 2007 Share Posted December 18, 2007 This might work, but you might need to fill in a line from what the info tool said was the visible text of the window: ControlCommand("WinMode Controller", "", 721490, "Check", "") Das Häschen benutzt Radar 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