Hi,
I'd like to trigger an action at the end of enduring event. Is that possible somehow?
I'd like to to following:
When volume up key is pressed on remote I want to start action "button volume up pressed" and when the key is released I want to start action "button volume up released".
I use X10 plugin which creates enduring events correctly. I just didn't found anything in EventGhost which would allow me to trigger another action when enduring event ends.
Thanks in advance for help.
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Action at the end of enduring event
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Action at the end of enduring event
Suppose Test.Test is an enduring event.Then the following script does what you need:
At the beginning is triggered event EnduringEvent.Start and at the end is triggered event EnduringEvent.Stop.
However, I do not know if it will have practical use.
I do not have the opportunity to try it.
Pako
Code: Select all
evt = eg.event
def TestEnd():
if not evt.isEnded:
eg.scheduler.AddTask(0.01, TestEnd)
else:
eg.TriggerEvent("Stop", prefix = "EnduringEvent")
eg.TriggerEvent("Start", prefix = "EnduringEvent")
TestEnd()However, I do not know if it will have practical use.
I do not have the opportunity to try it.
Pako