Jump to content
Sign in to follow this  
styles3000

What To Use In The Script When Using The AU3Info Tool

Recommended Posts

styles3000
:)

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.pdf

Control_ID.pdf

Share this post


Link to post
Share on other sites
Authenticity

ControlClick("HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1")

Share this post


Link to post
Share on other sites
styles3000

ControlClick("HyperVRE - Convert your content into cash", "", "ThunderRT6UserControlDC1")
Is there anything else? Its not clicking.

Share this post


Link to post
Share on other sites
somdcomputerguy

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 by snowmaker

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
styles3000

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 ControlClick

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?

Share this post


Link to post
Share on other sites
styles3000

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.

Share this post


Link to post
Share on other sites
somdcomputerguy

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 by snowmaker

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
bogQ

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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 

Share this post


Link to post
Share on other sites
styles3000

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.

Share this post


Link to post
Share on other sites
styles3000

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}")

Share this post


Link to post
Share on other sites
bogQ

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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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.

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×