Jump to content
bbmalgor

ControlClick with coordinates follows mouse

Recommended Posts

bbmalgor

I have a simple script that pulls some info from the mouse position in the current active window, and then loops on clicking there for me.  I'm using control clicks so that I can work on other things while the clicks continue to be sent.  Normally it works fine enough for my needs, but occasional hiccups for things like chrome tabs. 

The problem:  I've found an application where instead of sending clicks to the recorded location, the clicks will follow the mouse.  The clicks stay within the recorded window, but they don't stick to the recorded coordinates.

Here is some of my code:

opt("MouseCoordMode",2)
$g_hHandle = WinGetHandle("[ACTIVE]")
$g_aPosition = MouseGetPos()
While 1
    ControlClick($g_hHandle, "", "", $MOUSE_CLICK_PRIMARY, 1, $g_aPosition[0], $g_aPosition[1])
    Sleep(25)
WEnd

Any help or alternatives would be appreciated.

Share this post


Link to post
Share on other sites
bbmalgor

bump

Share this post


Link to post
Share on other sites
jdelaney

Because to help you directly could be assisting in game automation, which no one here will assist with, I'll instead ask a generic question...what is the application, and what are you attempting to automate by doing this clicking...there is probably a better way to go about it.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

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

×