Jump to content

Internet browser and mousemove?


Recommended Posts

I'm quite new to autoit and since I want to learn it, I'm creating a simple aimbot for a flash game.

global $pos
global $findcolor
global $do = "false"
HotKeyset("{NUMPADDIV}", "stop")

func stop()
    if $do="true" Then
        $do="false"
    Else
        $do = "true"
    EndIf
EndFunc

while 1
    if ($do="true") Then
    $pos = MouseGetPos()
    $findcolor = PixelSearch(0,0,1280,1204,0x393753,10)
    if not @error Then
        MouseMove($findcolor[0],$findcolor[1])
        sleep(100)
    Else
        msgbox(1,"not found","error")
    EndIf
    endif
wend

However the cursor seems to be a few pixels away from the mouse, how do I correct this. I already tried replacing

MouseMove($findcolor[0],$findcolor[1])
by
MouseMove($findcolor[0],$findcolor[1]+120
but this fails, same result as the first one.
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...