S1rKiller Posted September 16, 2020 Share Posted September 16, 2020 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 More sharing options...
Dan_555 Posted September 16, 2020 Share Posted September 16, 2020 Place both func and endfunc outside the while/endwhile loops S1rKiller and Danp2 2 Some of my script sourcecode Link to comment Share on other sites More sharing options...
S1rKiller Posted September 16, 2020 Author Share Posted September 16, 2020 3 minutes ago, Dan_555 said: Place both func and endfunc outside the while/endwhile loops omg now I feel dumb xD thanks bro Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now