Page 1 of 1

Blocky One Time Only

Posted: Monday 17 July 2017 17:44
by Andree
Hi to all,
i want to set an event for notify me when time to work is over 30 minutes.
i have made this blocky and work fine but at every time the script "time to work" run and the result is over 30 minutes i receive a notification!
how can i set "IF time to work > 30" from 7:30 to 8:30 send ONLY ONE TIME a notifications...." ?
Thx!
Traffic.JPG
Traffic.JPG (36.53 KiB) Viewed 2414 times

Re: Blocky One Time Only

Posted: Monday 17 July 2017 18:12
by pvm
Can you use a user variable or dummy switch to monitor whether you've already send the message

Re: Blocky One Time Only

Posted: Monday 17 July 2017 18:17
by tozzke
add a variable (in this case a string variable with the value 'no') in the if-statement as well as in the output.
Something like:

Code: Select all

If [your if now] and [[var time_to_work_notification_sent?] = ["no"]]
Do [Set [var time_to_work_notification_sent?] = ["yes"]]
   [Send notification...]
Else if [Time > 9:00] and [var time_to_work_notification_sent?] = ["yes"]
Do [Set [var time_to_work_notification_sent?] = ["no"]]
This way the notification wil only be sent once because the if-statement is no longer true after it triggers

Blocky One Time Only

Posted: Monday 17 July 2017 18:18
by Andree
pvm wrote:Can you use a user variable or dummy switch to monitor whether you've already send the message
Can you explain how can i use user variables for this target?

Re: Blocky One Time Only

Posted: Monday 17 July 2017 18:23
by Andree
tozzke wrote:add a variable (in this case a string variable with the value 'no') in the if-statement as well as in the output.
Something like:

Code: Select all

If [your if now] and [[var time_to_work_notification_sent?] = ["no"]]
Do [Set [var time_to_work_notification_sent?] = ["yes"]]
   [Send notification...]
Else if [Time > 9:00] and [var time_to_work_notification_sent?] = ["yes"]
Do [Set [var time_to_work_notification_sent?] = ["no"]]
This way the notification wil only be sent once because the if-statement is no longer true after it triggers

Thx! I can try when arrive at home !

Re: Blocky One Time Only

Posted: Tuesday 18 July 2017 18:47
by Andree
Thx work perfectly!