Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trouble with counter
#1
i'm trying 2 make a counter so that evry so often it calls a function
it will be inside of a function that is called when the main macro ends calls a function which inturn calls another function,which inturns calls another function.
what i'm tring 2 do is every so often instead of calling the 3rd function call a different function and reset the counter

i tried using this
but it just seems 2 skip over it
Code:
Copy      Help
int x
x+1
if x= 200
,,"Function5"
,,x=0
else
,Function3



[/code]


also tried if x<12
also tried using Function5 without quotes
can u help?[/code]
#2
Code:
Copy      Help
int x
x+1
if x= 12
,,"Function5"
,,x=0
else
,Function3
#3
you forgot the rep command.
http://www.quickmacros.com/help/Flow/IDP_REP.html

use it like this
Code:
Copy      Help
rep ####
,statement
,statement
An old blog on QM coding and automation.

The Macro Hook
#4
i don't want the whole function 2 repeat just the counter 2 work
#5
what i need it 2 do and ,maybe a counter is the wrong way 2 go is every lets say 12th time this function is called go2 another function instead rep doesn't work it just repeats the function over and and over.these functions are not part of the main macro.they are called after the macro ends using atend
ex


main macro
statements...
....

.....
atend function 1
then after function 1 finishes it calls function 2 when function 2 finishes it calls function 3
but every 12 th time i want 2 call function 5 instead of function3.these function do not repeat there are onlt called after the main macro ends?
#6
try something like this; you'll need to change some things.


Code:
Copy      Help
int x
rep 100
,x+1
,out x
,if x=12
,,bee
,,1
,,x=0
,else
,,Function3
[/code]
An old blog on QM coding and automation.

The Macro Hook
#7
hey ty for your help but it is still making the function repeat.Is there a way 2 set up a counter without using rep or for?
#8
post your other function codes; sounds like they are ending so quickly that it seems like it's not waiting.
An old blog on QM coding and automation.

The Macro Hook
#9
ok this is what it is doing.It is displaying # in output excuting function,then next function,then going back 2 main macro like it is supposed 2.macro starts then 4 some reason the function with the counter is stopping the macro and repeating
and will keep going on like this till i exit qm.the 2 functions after the counter execute in about 7 seconds.But like i said is there a way 2 create a counter without using rep or for?
#10
kevin, it would be really helpful when you provide your code.

right click in editor -> other formats -> copy bbcode
and paste here.
pi
#11
sorry i didn't post a replay because i used a global variable and it works perfectly
basically like this
int+ x
some statements
x+1
if x=12
function3
x=0
else
more statements


Forum Jump:


Users browsing this thread: 8 Guest(s)