Jump to content

ControlClick with x,y cords?


Recommended Posts

Looking at the helpfile for ControlClick I don't see how to specify where its actually going to click.. "Sends a mouse click command to a given control." does that mean at random or center..? Or is the only way to send exact mouse clicks would be via WinActivate and mouse click?

I have written a tcp app that broadcasts set keys i have defined to a remote window - trying to see if its possible to controlclick into the remote apps based of the cords of my current mouse.

Don't let that status fool you, I am no advanced memeber!

Link to comment
Share on other sites

Don't know what kind of helpfile you were looking at, but mine says:

ControlClick

--------------------------------------------------------------------------------

Sends a mouse click command to a given control.

ControlClick ( "title", "text", controlID [, button [, clicks [, x [, y ]]]] )

Parameters

title The title of the window to access.

text The text of the window to access.

controlID The control to interact with. See Controls.

button [optional] The button to click, "left", "right" or "middle". Default is the left button.

clicks [optional] The number of times to click the mouse. Default is 1.

x [optional] The x position to click within the control. Default is center.

y [optional] The y position to click within the control. Default is center.

"be smart, drink your wine"

Link to comment
Share on other sites

Don't know what kind of helpfile you were looking at, but mine says:

rotflmao ok coding on my wifes laptop while watching tv is a bad idea... just noticed its running version 3.2.0.1...... that was released Aug 13, 2006 >.<

Firelordz i'm not sure what you mean how else would it know where to click? i have the controlID and its sending text perfectly, though my current project is try to click on a laptop get those cords, convert the x,y to a best guess same loc in the remotly controlled windows then click in those exact spots in each remote window ie if i click in the center of the window on my main laptop i want it to controlclick into the center of each of the remote windows

and for laughs... the oldschool help file that was driving me nutz: lol

Function Reference

ControlClick

--------------------------------------------------------------------------------

Sends a mouse click command to a given control.

ControlClick ( "title", "text", controlID [, button] [, clicks]] )

Parameters

title The title of the window to access.

text The text of the window to access.

controlID The control to interact with. See Controls.

button [optional] The button to click, "left", "right" or "middle". Default is the left button.

clicks optional] The number of times to click the mouse. Default is 1.

Return Value

Success: Returns 1.

Failure: Returns 0.

Edited by zhenyalix

Don't let that status fool you, I am no advanced memeber!

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