styles3000 Posted July 4, 2009 Share Posted July 4, 2009 In the download I affixed to this message shows the AU3 Info Tool locating the control ID of the button I want to press on my application. I need to know what info I need to use to extract and incorporate into my AutoIT script to press that button rather than using mouse clicks like in the example shown below. Thanks. WinWait("HyperVRE - Convert your content into cash","") If Not WinActive("HyperVRE - Convert your content into cash","") Then WinActivate("HyperVRE - Convert your content into cash","") WinWaitActive("HyperVRE - Convert your content into cash","") MouseMove(221,126) sleep(5000) MouseDown("left") MouseUp("left")Control_ID.pdfControl_ID.pdf Link to comment Share on other sites More sharing options...
Authenticity Posted July 4, 2009 Share Posted July 4, 2009 ControlClick("HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1") Link to comment Share on other sites More sharing options...
styles3000 Posted July 4, 2009 Author Share Posted July 4, 2009 ControlClick("HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1") Is there anything else? Its not clicking. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 4, 2009 Share Posted July 4, 2009 (edited) Is there a WinActivate before the ControlClick? I have run into a situation where I had to do a WinActivate first, although it seemed I shouldn't have had to. It's an issue with the program getting the click, not Autoit..Some controls will resist clicking unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlClick().From: Function ControlClick Edited July 4, 2009 by snowmaker - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
styles3000 Posted July 5, 2009 Author Share Posted July 5, 2009 Is there a WinActivate before the ControlClick? I have run into a situation where I had to do a WinActivate first, although it seemed I shouldn't have had to. It's an issue with the program getting the click, not Autoit..From: Function ControlClickYa know, after I got off line last night I thought about that very same thing. It would make sense to acvtivate the the .exe first before I try to click any button,huh? Link to comment Share on other sites More sharing options...
styles3000 Posted July 5, 2009 Author Share Posted July 5, 2009 Ya know, after I got off line last night I thought about that very same thing. It would make sense to acvtivate the the .exe first before I try to click any button,huh? My button is still not clicking. I've added a shellexecute("D:\Program Files\HyperVRE\HyperVRE.exe") to execute to application first , but the button is not being pressed by AutoIT. I looked at the help file and I noticed this....... ControlClick ( "title", "text", controlID [, button [, clicks [, x [, y ]]]] ) Which tells me I need to be more specific. I have all the info below, i just don't know where to place the info. The name of the button is "New Project", I want to left click and the Coordinates are 53,11. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 5, 2009 Share Posted July 5, 2009 (edited) Well I guess it wouldn't hurt to include that extra info, but the mouse button, number of clicks and the x,y locations are optional and default to left, 1 and center,center (of the control, not the screen) if not included. I would guess then that some controls just won't accept a ControlClick whether the window is active or not.. Try WinActivate and MouseClick, see if that works.. Edited July 5, 2009 by snowmaker - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
bogQ Posted July 5, 2009 Share Posted July 5, 2009 (edited) i think that controlsend will work in this case together with focusing on the control, something like this WinActivate("HyperVRE - Convert your content into cash") WinWaitActive("HyperVRE - Convert your content into cash") ControlFocus ( "HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1" ) ControlSend("HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1","{ENTER}") WinActivate and WinWaitActive added only becose of previous sugestions but i think that itl work without them if your main window isnt minimised Edited July 5, 2009 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
styles3000 Posted July 5, 2009 Author Share Posted July 5, 2009 i think that controlsend will work in this case together with focusing on the control, something like this WinActivate("HyperVRE - Convert your content into cash") WinWaitActive("HyperVRE - Convert your content into cash") ControlFocus ( "HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1" ) ControlSend("HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1","{ENTER}") WinActivate and WinWaitActive added only becose of previous sugestions but i think that itl work without them if your main window isnt minimised It worked. Thanks. Link to comment Share on other sites More sharing options...
styles3000 Posted July 5, 2009 Author Share Posted July 5, 2009 It worked. Thanks. This is what worked......shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Document 2.txt") shellexecute("D:\Program Files\HyperVRE\HyperVRE.exe") sleep(15000) ControlFocus ( "HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1" ) ControlSend("HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1","{ENTER}") Link to comment Share on other sites More sharing options...
bogQ Posted July 5, 2009 Share Posted July 5, 2009 (edited) shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Document 2.txt") shellexecute("D:\Program Files\HyperVRE\HyperVRE.exe") sleep(15000) ControlFocus ( "HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1" ) ControlSend("HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1","{ENTER}") sugestion shellexecute("D:\Documents and Settings\Taevon Jones\Desktop\Document 2.txt") shellexecute("D:\Program Files\HyperVRE\HyperVRE.exe") WinWait("HyperVRE - Convert your content into cash") ControlFocus ("HyperVRE - Convert your content into cash","","ThunderRT6UserControlDC1") ControlSend("HyperVRE - Convert your content into cash","","ThunderRT6UserControlDC1","{ENTER}") Edited July 5, 2009 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. 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