Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted (edited)

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
Posted (edited)

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
Posted (edited)

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

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
  • Recently Browsing   0 members

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