Jump to content

Relative Mouse Movement in a While loop


S1rKiller
 Share

Recommended Posts

I am currently working on something and I have to use relative mouse movement in a While/WEnd loop but it says there is no matching WEnd statement for the While statement in the beginning. How do I fix this? Thanks :)

 

HotKeySet("{esc}","LoopFlagToggle")

$loopflag = 0
While $loopflag = 0


   _MouseMoveRelative(30, 1)
   Func _MouseMoveRelative ($iX, $iY)
    local $pos = MouseGetPos()
    MouseMove($pos[0] + $iX, $pos[1] + $iY,0)
   EndFunc

   Sleep(1500)

   _1MouseMoveRelative(-30, 1)

   Func _1MouseMoveRelative ($iX, $iY)
    local $pos = MouseGetPos()
    MouseMove($pos[0] + $iX, $pos[1] + $iY,0)
   EndFunc


   Sleep(1500)

WEnd

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...