Jump to content
Sign in to follow this  

How to controlclick with no controls

Recommended Posts


I have an application that shows absolutly no controls, i only have a window title. So i tried this:

$hWin = WinGetHandle($title)
$hButton=ControlGetHandle($hWin, "", "")
ControlClick($hWin, "", $hButton, "left", 1, 830, 453)

Controlsend works just fine with this, but controlclick is messy. It does click, but it doesnt click where i want it too. As the autoit windowinfo offers no control coords, i put the application in full screen and used my normal mouse coords in the code. I thought it would work out as the controlclick coords are the same as my windows pixel resolution coords. I dont know why it doesnt work. Does anyone know how i could do this and how should i get the coords?

Help greatly appreciated. Thanks.

Share this post

Link to post
Share on other sites

You can debug it by using a hotkey when your mouse is in position. Hotkey CTRL+1 or something like that. The hotkeys starts a function where you read out the position of your mouse and then perform a click.

Just for testing the click on the right coords.

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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