adding a counter to a trigger

Home Forums Scripts adding a counter to a trigger

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8069 Reply
    murk
    Guest

    hello, I’d like to add a counter to a trigger, so that after x amount of triggers a code is executed. I’m new to javascript, so forgive me if this is obvious. my assumption is I should use setMessage to the target trigger to be a counter like so

           var counter = 0;	
    	run("setMessage 100 var counter = counter++");
    		if(counter > 5){
    			run("setMessage 200 direct:// setPattern 2 {2} {0} {0}, direct:// setActive 2 {1}");
    			console.log(counter);

    however, I am not able to get this to work. Is there something obvious I’m missing?

    #8070 Reply
    murk
    Guest

    “}” is in the code I just didnt copy it over

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: adding a counter to a trigger
Your information:





© IanniX Association

What is IanniX? | Download | Showcase | Forums | Research | About