looping clicking actions

Is there any way you can make a zscript run and still let you work on the canvas like the ZTimeLapse does?

I want to use the [mouseLbutton] command with the [loop, command
I want the [CanvasClick, to loop. The code reference says the [CanvasClick, needs a number value so it can set the item to that canvas postion, but that’s not what I want because there wont be any item in the zscript im trying.
I’m looking for some zscript code so that I can click the Left Mouse button then an action it repeats itself were ever my curser goes on the canvas.

ThIs is how it would work
1 press the zscript start button
2 the zscript is now runing
3 if you Left mouse click any were on the canvas, it will act as If I’m just left mouse clicking.
so it appears that im just clicking on the canvas constantly whereever my cursor goes.

[if,[mouseLbutton] = [CanvasClick /release=mouseLbutton

since it’s looping, the left mouse button should reactivate it self after it’s release.

Is there any way you can set a value in increments in a Loop
loop one, set value to 2
loop two set value to 4
loop three set value to 6

after loop 10 the values repeats it self starting on value 2
and it’ll do this 99 times.

I Don’t want canvas ‘Stroke’ Just CanvasClick …if that makes sense.

edit: also, on a random sidenote… how do the dll’s work?

To capture the initial left button down event, you can use the [Sleep] command with event type set to 4.

To increment your values, first VarDef a variable outside the loop, with an initial value of zero.

Then you can have a statement like this:
[If,variablename == 20,

This is all kind of off the top of my head, but I think that should get you started.