Page 1 of 1

Task triggers

Posted: Sat Jul 07, 2007 8:36 am
by Richard Naninck
Scott,

Attached a screenshot of a task I had running, but found to behave wrong.

The task seems to trigger not only on the Running equal to No part, but also when the Action Property changes. So when the Action property gets changed while the timer is not running, this task will fire. Is this a bug or a feature? I think it would be more logical when a task only fires when condition statement properties change.

I created a photo panel in my theme. A script is handling all of the features like photo selections, slideshow etc etc. When the slideshow is started, the script sets the Running state of the picture timer to yes. This timer is set by a slider on my theme panel. Everytime the timer resets, this task is supposed to trigger and tell my script via the Action property that it should display the next slide. All of that works fine, but this task also fired while the timer was not running (thus having Running is No) and a theme button was pressed putting a value in the Action property.

I worked around this by also switching the Repeat is Yes or No in the script and expanding the task with an And on this Repeat Value as well.

Does this make any sense?

Posted: Sun Jul 08, 2007 9:07 pm
by ScottBot
I see what you are saying, but I can't duplicate it with just a simple task. Could it be possible that you have something else changing the running state of the timer back to "No"?

Posted: Mon Jul 09, 2007 12:04 pm
by Richard Naninck
Again you asked the right question!
Almost all script Action commands set the timer Running value to No. I use this timer for the slideshow, but when buttons like prev, next, stop etc are pressed, the script sets the Running value to No just in case the slideshow was running. I just didn't figure that a change from No to No would trigger a task thus thinking what I wrote above.

I worked around it using the Repeat Value in the equasion, but I could also do a GetPropertyValue from the timers Running state to see if it is No and if so, do nothing. Unless asking for a value triggers the task again. I could test that of course to see what happens, but it works now and I keep it at that.

Thanks for the suggestion.

Posted: Mon Jul 09, 2007 12:39 pm
by ScottBot
You might want to try setting the "Allow same value change" for the state property to unchecked. Not sure if that would fix it or not.

Posted: Mon Jul 09, 2007 1:02 pm
by Richard Naninck
Tried it, but didn't work.

Posted: Mon Jul 09, 2007 1:13 pm
by ScottBot
Yea, I thought it might not, since it is changed by the Device too.