Jump to content
Sign in to follow this  
FoxWizzy

Mouse Click

Recommended Posts

FoxWizzy

Hello i am trying to create a mouse auto click BUT i i want it to remebber where it was last.

E.X. if the mouse is at ... 324,245 and i move it i want it to go back to 324,245

That is not all :) Every time it clicks at a coord. it has to add +20 to it and remebmer that

this is as far as i got

HotKeySet("{insert}","start")
HotKeySet("{delete}","ex")

While 1
    Sleep(100)
WEnd

Func start()
    MouseMove(247,367)
    While 1
        $ms = MouseGetPos()
        MouseClick("left",$ms[0],$ms[1]+20)
        Sleep(36000)
        Send("^w")
        Sleep(50)
    WEnd
EndFunc

Func ex()
    Exit
EndFunc

Share this post


Link to post
Share on other sites
Zedna

Maybe something like this:

HotKeySet("{insert}","start")
HotKeySet("{delete}","ex")

While 1
    Sleep(100)
WEnd

Func start()
    $ms_orig = MouseGetPos()
    $ms = $ms_orig 
 
    For $i = 1 To 10
        $ms[1] += 20
        MouseClick("left",$ms[0],$ms[1])
        Sleep(3000)
        Send("^w")
        Sleep(50)
    Next
 MouseMove($ms_orig[0],$ms_orig[1]) ; restore mouse position
EndFunc

Func ex()
    Exit
EndFunc

Share this post


Link to post
Share on other sites
FoxWizzy

perfect...thenx

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  

×