Jump to content

Recommended Posts

Posted

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

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
×
×
  • Create New...