Sign in to follow this  
Followers 0
mrbors

ControlSend moving my mouse pointer?

2 posts in this topic

Hi there,

I'm making a simple anti-idle script for a game which is supposed to work while it's minimized and for any number of game windows. It works fine except for one problem - every time the script hits the controlsend statements (to briefly send a couple of arrow keys to the game to prevent going idle) it causes my mouse pointer in Windows to jump to the top left corner of the screen, which is quite annoying.

Does anyone know why this is happening or how to stop it? I don't need this script to move the mouse at all. My code is below: -

AutoItSetOption("WinTitleMatchMode", 4)

While 1
    Global $handles = WinList("classname=LWJGL")
    For $i = 1 to $handles[0][0]
        ControlSend($handles[$i][1],"","","{UP DOWN}")
        Sleep(10)
        ControlSend($handles[$i][1],"","","{UP UP}")
        Sleep(10)
        ControlSend($handles[$i][1],"","","{DOWN DOWN}")
        Sleep(10)
        ControlSend($handles[$i][1],"","","{DOWN UP}")  
    Next
    Sleep(120000)
WEnd

Share this post


Link to post
Share on other sites



A lot of games dont like getting automated, well they dont care but the developers of those games do, and thats why.

Its probably one of the reasons that game automation of any flavour is not allowed here.

Unlucky, and welcome.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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  
Followers 0