problems with app.scheduleTask

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

I am writing a script where i want to delay the calling of a function, but i seem to be having some odd behavior from app.scheduleTask

I can call the function, but it doesn't pass the variables to it.

So

Code: Select all

app.scheduleTask("myFunction();",1000,0)    // this works

myFunction(value1,value2);  // this also works

app.scheduleTask("myFunction(value1,value2);",1000,0)  // this doesn't work
is there something special about scheduleTask that i am missing?

-Lloyd
nab
Posts: 203
Joined: November 29th, 2005, 3:00 am
Location: Royan
Contact:

Hello Lloyd,

my "scheduleTask/cancelTask" test seems to work, look at this script and you will hopefully find why that does not work for you.
http://www.nabscripts.com/Forum/Scripts ... xample.jsx

(to be totally honest I've never used this method until this evening)
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

var myScript = "myFunction(val);";
I hadn't thought of putting the string in a variable.. thanks for the tip i am defintely going to try it..

-Lloyd
Post Reply