Specifically I am trying to write a simple script for a Logitech mouse that uses Lua language.
The desired script is straightforward: Move the mouse down 1 pixel every 5 milliseconds and click mouse button 1 every 500 milliseconds.
The actions independent of each other are easy;
repeat
MoveMouseRelative(0,1)
Sleep (5)
repeat
PressMouseButton(1)
Sleep (500)
However, I am looking for a simple/elegant way to combine them into one loop. Any suggestions for a newbie?