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.

help with one button two actions please

If you have a question or need help, this is the place to be.
Post Reply
atri7202
Posts: 14
Joined: Thu Mar 12, 2009 10:54 pm

help with one button two actions please

Post by atri7202 »

so i have a remote and i'm using winlirc with eventghost to control my lights on / off and i would only like to use one button to do so is there any way possible to do this? thanks in advance!!
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: help with one button two actions please

Post by jinxdone »

You can do multiple actions in one macro and then trigger the macro with one event. Basically doing multiple things with one button push is not a problem at all..

What do you use to control the lights? Do you know the state of the lights in EG (are they on/off?) or do you just toggle them? Tell us more about your setup so we might be able to help.
atri7202
Posts: 14
Joined: Thu Mar 12, 2009 10:54 pm

Re: help with one button two actions please

Post by atri7202 »

i would like to toggle my lights between on and off im using the CM11A plugin and winlirc to receive the events
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: help with one button two actions please

Post by jinxdone »

Well, can you turn the lights on/off at all? Does the CM11A work? If it does then just put more than one of the turn on/off commands in one macro.

I don't see what the problem is.. :roll:
atri7202
Posts: 14
Joined: Thu Mar 12, 2009 10:54 pm

Re: help with one button two actions please

Post by atri7202 »

jinxdone wrote:Well, can you turn the lights on/off at all? Does the CM11A work? If it does then just put more than one of the turn on/off commands in one macro.

I don't see what the problem is.. :roll:
i don't catch your drift maybe its something i don't know that i haven't learned yet, but i did as you said and all it did was turn my lights on then off there is no toggle on/off command for the cm11a just on and off
yes the cm11a plugin works and all
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: help with one button two actions please

Post by jinxdone »

Oh! So you want to essentially create a toggle button? :) I was somehow thinking you want to turn on or off X number of lights with a single press of a button.


Here is a quick example of a toggle switch with the enable/disable actions.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="851">
    <Folder Name="On/Off toggle" Expanded="True">
        <Macro Name="On" id="1728" Expanded="True">
            <Event Name="Keyboard.Space" />
            <Action Name="Action 1">
                EventGhost.ShowOSD(u'Action 1', 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>
            <Action>
                EventGhost.EnableItem(XmlIdLink(1730))
            </Action>
            <Action>
                EventGhost.DisableItem(XmlIdLink(1728))
            </Action>
        </Macro>
        <Macro Name="Off" id="1730" Enabled="False" Expanded="True">
            <Event Name="Keyboard.Space" />
            <Action>
                EventGhost.ShowOSD(u'Action 2', 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>
            <Action>
                EventGhost.EnableItem(XmlIdLink(1728))
            </Action>
            <Action>
                EventGhost.DisableItem(XmlIdLink(1730))
            </Action>
        </Macro>
    </Folder>
</EventGhost>
atri7202
Posts: 14
Joined: Thu Mar 12, 2009 10:54 pm

Re: help with one button two actions please

Post by atri7202 »

AHA! that's very clever would have never thought of that myself. thanks jinx for the help, this will clean up my remote interface alot :D :D :D
thanks once again my setup is almost done thanks to your help, will post vid after its all said and done. :mrgreen:
Post Reply