Task triggers

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Task triggers

Post 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?
Attachments
naamloos.JPG
naamloos.JPG (7.17 KiB) Viewed 1352 times
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post 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"?
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post 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.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post 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.
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Tried it, but didn't work.
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Yea, I thought it might not, since it is changed by the Device too.
Scott
Post Reply