So the scenario goest like this:
1. I watch a movie with media center. Then I choose to watch TV. I press the "Watch TV" button in my remote. By doing this my remote activates "Kill projector" macro. This macro executes a Tellstick action to control the power socket of the projector. I could use the IR commands of the projector, but IR is not as reliable than the Nexa/Tellstick .
So, I came up with this idea of enabling or disabling the task with a timer (wait some time). I thought it would be a good idea to wait a little and see, if the shutdown is really needed to be done. When shutting down the system, this macro works fine: After watching someting I press "Power off" button in my remote. This shuts everything down as planned.
So, again, in my scenario, when I change from Media Center to TV, the process goes like this:
1. I have Media Center activated
2. The I Press "Wathc TV" -button on remote conrol
3. The EG get's the shutdown projector -signal (This point the remote control can not know, if the projector needs to be shut down)
4. Pre-shutdown timer starts to count down (6 seconds).
5. During the countdown the EG get's new signal: Enable TV with projector. This command deactivates (disable an item) the shutdown macro. But the macro runs to the end, bacause the "disable and item" -command is taking place only after the running macro has ended.
6. Projector shuts down
So, my question is: How to interrupt this running macro?
It has already started. The timer started to count down. Then in the middle of the countdown I got a new event: Enable projector. In this point the countdown has to be interrupted in order to prevent the shutdown. But the shutdown takes place, no matter what. Disabling the whole macro wont help. I tried to find a way to use the "if then else" -commands. But it seems like they are not ment to be used this way. Do I have any options left?
Hopefully you could understad this
