dekuNukem / duckyPad

Do-It-All Mechanical Macropad

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How end an infinite loop?

asd-ez opened this issue · comments

I need to use an infinity loop e.g.:

WHILE TRUE
	LMOUSE
END_WHILE

How can I end it by the next click by key? I try like this:

LOOP1:
WHILE TRUE
	LMOUSE
END_WHILE

LOOP2:

What will I need to write in LOOP2?

Probably something like this:

VAR $k = 0
BCLR
WHILE $k == 0
    RMOUSE
    DELAY 50
    $k = $_READKEY
END_WHILE

it press the mouse button while checking if a key is pressed in the loop. if so, it exits the loop.

@dekuNukem Thanks for your help!