Jump to content

ControlClick function


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...