Jump to content
Sign in to follow this  
TheTester

ControlClick function

Recommended Posts

TheTester

Hello,

I have searched most of the threads created for ControlClick but I only need this function as simple as it can be.

I have the executable (let's name it "name") and the coordinates (let's call them X and Y).It is also a left click of mouse,so it is "primary".

How do I write the function as simple as it can be?

Thanks for your time.

Share this post


Link to post
Share on other sites
JohnOne

HotKeySet("w","_ControlClick")
GUICreate("GUI")
$Button = GUICtrlCreateButton("Button",10,10)
GUISetState()
While 1
$Msg = GUIGetMsg()
Switch $Msg
  Case $Button
   Exit
EndSwitch
WEnd
Func _ControlClick()
ControlClick("GUI","","[CLASS:Button; INSTANCE:1]")
EndFunc


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
TheTester

I don't really understand what you wrote above,so I'll give the info on the executable:

>>>> Window <<<<
Title: Name
Class: Name
Position: 285, 199
Size: 1030, 801
Style: 0x14CA0000
ExStyle: 0x00000100
Handle: 0x00080306
 
>>>> Control <<<<
Class:
Instance:
ClassnameNN:
Name:
Advanced (Class):
ID:
Text:
Position:
Size:
ControlClick Coords:
Style:
ExStyle:
Handle:
 
>>>> Mouse <<<<
Position: 1104, 371
Cursor ID: 0
Color: 0x262C34
 
>>>> StatusBar <<<<
 
>>>> ToolsBar <<<<
 
>>>> Visible Text <<<<
 
 
>>>> Hidden Text <<<<

How do I make a primary click in X,Y directions in this?

Edit: Is it maybe this?

ControlClick ( "Name", "", [, primary [, 1 [, X [, Y ]]]] )

Thanks for your time

Edited by TheTester

Share this post


Link to post
Share on other sites
ffdshow

Probably it's needed a ControlClick inside a control, but you've edited the autoit info, so we can help you only with mouseclick:

MouseClick("primary", 1104,371,1)

Example of ControlClick inside a control:

ControlClick("Window title", "Some text from window if available", "Button1", "left", 1, 35, 8)

Edited by ffdshow

Share this post


Link to post
Share on other sites
JohnOne

If you are going to fart about editing your winfo you will have a hard time getting help. Not many people here have time to waste on bullshit. and trying to drag information out of people while the kick and screem.

Good luck.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
GNGNUT

if this is an .exe can you not call it directly ?? run "c:\name"

Share this post


Link to post
Share on other sites
TheTester

The only thing I edited in the winfo is the title and class which are the same, nothing else.

And if you don't have time to "waste" then nobody forces you to help me.

Edited by TheTester

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  

×