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.

Need help - combo OSD & Timer, feedback loop of sorts

If you have a question or need help, this is the place to be.
Post Reply
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Need help - combo OSD & Timer, feedback loop of sorts

Post by Livin »

I did not see a straight forward way of doing this... maybe someone can assist? Thx in advance!

processed in this order...

Macro1:
Detection of running app(s) --> this is complete

Macro2:
1> OSD with 30 second timer --> OSD plugin
2> Awaits detection of button press
a> if button press is detected 'Jump' to Macro1
b> if no button press is detected 'Jump' to Macro3, or continue Macro2
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Need help - combo OSD & Timer, feedback loop of sorts

Post by jinxdone »

TriggerEvent has a timer you can use for this.. so maybe something like this would do..

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1397">
    <Folder Name="test" Expanded="True">
        <Macro Name="Macro 1" id="319" Enabled="False">
            <Event Name="Keyboard.LShift" />
            <Action>
                EventGhost.DisableItem(XmlIdLink(319))
            </Action>
            <Action>
                EventGhost.DisableItem(XmlIdLink(321))
            </Action>
            <Action>
                EventGhost.ShowOSD(u'keypress while waiting', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0, False)
            </Action>
        </Macro>
        <Macro Name="Macro 2" id="321" Enabled="False">
            <Event Name="Main.endwait" />
            <Action>
                EventGhost.DisableItem(XmlIdLink(319))
            </Action>
            <Action>
                EventGhost.DisableItem(XmlIdLink(321))
            </Action>
            <Action>
                EventGhost.ShowOSD(u'no key was pressed', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0, False)
            </Action>
        </Macro>
        <Macro Name="Wait for a keypress">
            <Event Name="Keyboard.LCtrl" />
            <Action>
                EventGhost.EnableItem(XmlIdLink(319))
            </Action>
            <Action>
                EventGhost.EnableItem(XmlIdLink(321))
            </Action>
            <Action>
                EventGhost.ShowOSD(u'Waiting for keypress', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 10.0, False)
            </Action>
            <Action>
                EventGhost.TriggerEvent(u'endwait', 10.0)
            </Action>
        </Macro>
    </Folder>
</EventGhost>
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Need help - combo OSD & Timer, feedback loop of sorts

Post by Livin »

good idea, thanks!

though, I need it to detect ANY button press or IR signal. This will all me to loop back to check to see if an app was started, or bring up the warning again.

Basically, this entire process is to check to see if it an entire system shut down should occur... or if an app is running, it will leave it up. This specific loop would give a warning and allow the user to start an app, or the timer would run down and the system would shut off.


this really highlights the need for a msgbox type property where it can timeout and/or have multiple methods of input that would trigger different outcomes.

... or just If/Then/Else ;)
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Need help - combo OSD & Timer, feedback loop of sorts

Post by Livin »

here's a screen shot of what I have, using specific triggers for application launches. I'm still missing the way to detects any KB press and/or IR so that if I simply want to delay the shutdown I can press any button to restart the wait time.

ideas?
Attachments
OSDloop.PNG
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Need help - combo OSD & Timer, feedback loop of sorts

Post by jinxdone »

You can use the * wildcard with events.. for example Lirc.* would catch both Lirc.PLAY and LIRC.STOP events from the remote.

Only trouble is that the keyboard plugin doesn't allow using the * wildcard. (because the it blocks a keypress from going to windows if its being used in EG.).. So, getting the keyboard 'any key' will require a bit more code.
User avatar
Livin
Experienced User
Posts: 792
Joined: Wed Oct 08, 2008 4:56 am

Re: Need help - combo OSD & Timer, feedback loop of sorts

Post by Livin »

cool... I can just use IR then :)
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
Post Reply