loop counts? if statement

Hints and tricks for using Mouse and Key Recorder

loop counts? if statement

Postby psionic98 » 18 Oct 2011, 22:31

I want to write a statement that uses the loop counter in the app but am very new to this and could use some help.

First off.. does loopcount exist?

If so can the macro do some simple math to see if the loopcount is divisible by say 3.. or is there another way to say.. every 3 loops, run this part of code, otherwise always run the rest?

basically i'd like the above, but i think its something like

if loopcount/3 = true
do this code
else
do this code

Not quite sure what is/isn't possible with this app yet

My code runs every 1000ms, so would it be easier to do something that has a delay of 3000ms in the code, but again no clue how that might be accomplished..

I'd really like to learn this though.. quite a useful little app to take some of the boring out of some of the work i do on a 2nd pc.

Thanks for the help
psionic98
 
Posts: 1
Joined: 18 Oct 2011, 22:25

Re: loop counts? if statement

Postby admin » 20 Oct 2011, 10:10

Here an example:

{{SetVarCounter 0
{{Label Start
{{IncVarCounter 1
{{If {{Mod {{VarCounter} | 3} = 0 ;;{{Goto LoopIsNotNx3
{{MessageBox Loop: {{VarCounter} reached
{{Goto Ende
{{Label LoopIsNotNx3
{{' Here something else can be done when loop is not n x 3
{{Label Ende
{{Delay 300} {{' Millisecounds - Here the delay can be adjusted
{{Goto Start

John Krauer, Kra-Tronic Corp.
admin
Site Admin
 
Posts: 320
Joined: 28 Oct 2005, 13:50


Return to Mouse and Key Recorder

Who is online

Users browsing this forum: No registered users and 1 guest

cron