<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1540" Guid="{657560C9-671F-482F-BFF6-A91A217BDCF2}" Time="1314756898.29">
    <Autostart Name="Autostart">
        <Action>
            EventGhost.NewJumpIf(XmlIdLink(13), 2, True)
        </Action>
        <Action>
            EventGhost.NewJumpIf(XmlIdLink(33), 2, True)
        </Action>
        <Action>
            EventGhost.NewJumpIf(XmlIdLink(51), 2, True)
        </Action>
        <Action>
            EventGhost.NewJumpIf(XmlIdLink(69), 2, True)
        </Action>
    </Autostart>
    <Folder Name="DEVICES" Expanded="True">
        <Folder Name="TV">
            <Macro Name="TV = True" id="10" Expanded="True">
                <Action>
                    EventGhost.PythonCommand(u'eg.globals.Tv = True')
                </Action>
                <Action>
                    EventGhost.EnableItem(XmlIdLink(86))
                </Action>
            </Macro>
            <Macro Name="TV = False" id="13" Expanded="True">
                <Action>
                    EventGhost.PythonCommand(u'eg.globals.Tv = False')
                </Action>
                <Action>
                    EventGhost.DisableItem(XmlIdLink(86))
                </Action>
            </Macro>
            <Macro Name="Toggle TV" Expanded="True">
                <Action>
                    EventGhost.PythonCommand(u'eg.globals.Tv = not eg.globals.Tv')
                </Action>
            </Macro>
            <Folder Name="Work" Expanded="True">
                <Macro Name="Decision" Expanded="True">
                    <Action>
                        EventGhost.PythonScript(u'if eg.globals.Tv:\n    eg.TriggerEvent("Tv-True")\nelse:\n    eg.TriggerEvent("Tv-False")')
                    </Action>
                </Macro>
                <Macro Name="When TV is True" Expanded="True">
                    <Event Name="Main.Tv-True" />
                    <Action Name="TV POWER OFF COMMAND">
                        EventGhost.Comment()
                    </Action>
                    <Action>
                        EventGhost.NewJumpIf(XmlIdLink(13), 2, False)
                    </Action>
                </Macro>
                <Macro Name="When TV is False" Expanded="True">
                    <Event Name="Main.Tv-False" />
                    <Action Name="TV POWER ON COMMAND">
                        EventGhost.Comment()
                    </Action>
                    <Action>
                        EventGhost.NewJumpIf(XmlIdLink(10), 2, False)
                    </Action>
                </Macro>
            </Folder>
        </Folder>
        <Folder Name="BLURAY">
            <Macro Name="BLURAY = True" id="30" Expanded="True">
                <Action>
                    EventGhost.PythonCommand(u'eg.globals.Bluray = True')
                </Action>
                <Action Name="Enable: BLURAY">
                    EventGhost.EnableItem(XmlIdLink(87))
                </Action>
            </Macro>
            <Macro Name="BLURAY = False" id="33" Expanded="True">
                <Action>
                    EventGhost.PythonCommand(u'eg.globals.Bluray = False')
                </Action>
                <Action Name="Disable: BLURAY">
                    EventGhost.DisableItem(XmlIdLink(87))
                </Action>
            </Macro>
            <Folder Name="Work" Expanded="True">
                <Macro Name="Decision" Expanded="True">
                    <Action>
                        EventGhost.PythonScript(u'if eg.globals.Bluray:\n    eg.TriggerEvent("Bluray-True")\nelse:\n    eg.TriggerEvent("Bluray-False")')
                    </Action>
                </Macro>
                <Macro Name="When BLURAY is True" Expanded="True">
                    <Event Name="Main.Bluray-True" />
                    <Action Name="BLURAY POWER OFF COMMAND">
                        EventGhost.Comment()
                    </Action>
                    <Action>
                        EventGhost.NewJumpIf(XmlIdLink(33), 2, False)
                    </Action>
                </Macro>
                <Macro Name="When BLURAY is False" Expanded="True">
                    <Event Name="Main.Bluray-False" />
                    <Action Name="BLURAY POWER ON COMMAND">
                        EventGhost.Comment()
                    </Action>
                    <Action>
                        EventGhost.NewJumpIf(XmlIdLink(30), 2, False)
                    </Action>
                </Macro>
            </Folder>
        </Folder>
        <Folder Name="RECEIVER">
            <Macro Name="RECEIVER = True" id="48" Expanded="True">
                <Action>
                    EventGhost.PythonCommand(u'eg.globals.Receiver = True')
                </Action>
                <Action Name="Enable: RECEIVER">
                    EventGhost.EnableItem(XmlIdLink(88))
                </Action>
            </Macro>
            <Macro Name="RECEIVER = False" id="51" Expanded="True">
                <Action>
                    EventGhost.PythonCommand(u'eg.globals.Receiver = False')
                </Action>
                <Action Name="Disable: RECEIVER">
                    EventGhost.DisableItem(XmlIdLink(88))
                </Action>
            </Macro>
            <Folder Name="Work" Expanded="True">
                <Macro Name="Decision" Expanded="True">
                    <Action>
                        EventGhost.PythonScript(u'if eg.globals.Receiver:\n    eg.TriggerEvent("Receiver-True")\nelse:\n    eg.TriggerEvent("Receiver-False")')
                    </Action>
                </Macro>
                <Macro Name="When RECEIVER is True" Expanded="True">
                    <Event Name="Main.Receiver-True" />
                    <Action Name="RECEIVER POWER OFF COMMAND">
                        EventGhost.Comment()
                    </Action>
                    <Action>
                        EventGhost.NewJumpIf(XmlIdLink(51), 2, False)
                    </Action>
                </Macro>
                <Macro Name="When RECEIVER is False" Expanded="True">
                    <Event Name="Main.Receiver-False" />
                    <Action Name="RECEIVER POWER ON COMMAND">
                        EventGhost.Comment()
                    </Action>
                    <Action>
                        EventGhost.NewJumpIf(XmlIdLink(48), 2, False)
                    </Action>
                </Macro>
            </Folder>
        </Folder>
        <Folder Name="CABLE">
            <Macro Name="CABLE = True" id="66" Expanded="True">
                <Action>
                    EventGhost.PythonCommand(u'eg.globals.Cable = True')
                </Action>
                <Action Name="Enable: CABLE">
                    EventGhost.EnableItem(XmlIdLink(89))
                </Action>
            </Macro>
            <Macro Name="CABLE = False" id="69" Expanded="True">
                <Action Name="eg.globals.Cable = False">
                    EventGhost.PythonCommand(u'eg.globals.Cable = False')
                </Action>
                <Action Name="Disable: CABLE">
                    EventGhost.DisableItem(XmlIdLink(89))
                </Action>
            </Macro>
            <Folder Name="Work" Expanded="True">
                <Macro Name="Decision" Expanded="True">
                    <Action>
                        EventGhost.PythonScript(u'if eg.globals.Cable:\n    eg.TriggerEvent("Cable-True")\nelse:\n    eg.TriggerEvent("Cable-False")')
                    </Action>
                </Macro>
                <Macro Name="When Cable is True" Expanded="True">
                    <Event Name="Main.Cable-True" />
                    <Action Name="CABLE POWER OFF COMMAND">
                        EventGhost.Comment()
                    </Action>
                    <Action>
                        EventGhost.NewJumpIf(XmlIdLink(69), 2, False)
                    </Action>
                </Macro>
                <Macro Name="When Cable is False" Expanded="True">
                    <Event Name="Main.Cable-False" />
                    <Action Name="CABLE POWER ON COMMAND">
                        EventGhost.Comment()
                    </Action>
                    <Action>
                        EventGhost.NewJumpIf(XmlIdLink(66), 2, False)
                    </Action>
                </Macro>
            </Folder>
        </Folder>
    </Folder>
    <Folder Name="Flags/Status" Expanded="True">
        <Macro Name="FLAGS" Expanded="True">
            <Action>
                EventGhost.PythonScript(u'eg.globals.Tv = True\neg.globals.Bluray = True\neg.globals.Receiver = True\neg.globals.Cable = True')
            </Action>
            <Action Name="TV" id="86" Enabled="False">
                EventGhost.Comment()
            </Action>
            <Action Name="BLURAY" id="87" Enabled="False">
                EventGhost.Comment()
            </Action>
            <Action Name="RECEIVER" id="88" Enabled="False">
                EventGhost.Comment()
            </Action>
            <Action Name="CABLE" id="89" Enabled="False">
                EventGhost.Comment()
            </Action>
        </Macro>
    </Folder>
    <Folder Name="MACROS" Expanded="True">
        <Macro Name="Watch Bluray">
            <Action Name="TV">
                EventGhost.PythonScript(u'if eg.globals.Tv:\n    eg.TriggerEvent("TvDoNothing")\nelse:\n    eg.TriggerEvent("Tv-False")')
            </Action>
            <Action Name="BLURAY">
                EventGhost.PythonScript(u'if eg.globals.Bluray:\n    eg.TriggerEvent("BlurayDoNothing")\nelse:\n    eg.TriggerEvent("Bluray-False")')
            </Action>
            <Action Name="RECEIVER">
                EventGhost.PythonScript(u'if eg.globals.Receiver:\n    eg.TriggerEvent("ReceiverDoNothing")\nelse:\n    eg.TriggerEvent("Receiver-False")')
            </Action>
            <Action Name="CABLE">
                EventGhost.PythonScript(u'if eg.globals.Cable:\n    eg.TriggerEvent("Cable-True")\nelse:\n    eg.TriggerEvent("CableDoNothing")')
            </Action>
        </Macro>
        <Macro Name="Watch Cable">
            <Action Name="TV">
                EventGhost.PythonScript(u'if eg.globals.Tv:\n    eg.TriggerEvent("TvDoNothing")\nelse:\n    eg.TriggerEvent("Tv-False")')
            </Action>
            <Action Name="BLURAY">
                EventGhost.PythonScript(u'if eg.globals.Bluray:\n    eg.TriggerEvent("Bluray-True")\nelse:\n    eg.TriggerEvent("BlurayDoNothing")')
            </Action>
            <Action Name="RECEIVER">
                EventGhost.PythonScript(u'if eg.globals.Receiver:\n    eg.TriggerEvent("ReceiverDoNothing")\nelse:\n    eg.TriggerEvent("Receiver-False")')
            </Action>
            <Action Name="CABLE">
                EventGhost.PythonScript(u'if eg.globals.Cable:\n    eg.TriggerEvent("CableDoNothing")\nelse:\n    eg.TriggerEvent("Cable-False")')
            </Action>
        </Macro>
        <Macro Name="Listen To Cable">
            <Action Name="TV">
                EventGhost.PythonScript(u'if eg.globals.Tv:\n    eg.TriggerEvent("Tv-True")\nelse:\n    eg.TriggerEvent("TvDoNothing")')
            </Action>
            <Action Name="BLURAY">
                EventGhost.PythonScript(u'if eg.globals.Bluray:\n    eg.TriggerEvent("Bluray-True")\nelse:\n    eg.TriggerEvent("BlurayDoNothing")')
            </Action>
            <Action Name="RECEIVER">
                EventGhost.PythonScript(u'if eg.globals.Receiver:\n    eg.TriggerEvent("ReceiverDoNothing")\nelse:\n    eg.TriggerEvent("Receiver-False")')
            </Action>
            <Action Name="CABLE">
                EventGhost.PythonScript(u'if eg.globals.Cable:\n    eg.TriggerEvent("CableDoNothing")\nelse:\n    eg.TriggerEvent("Cable-False")')
            </Action>
        </Macro>
        <Macro Name="Power Off">
            <Action Name="TV">
                EventGhost.PythonScript(u'if eg.globals.Tv:\n    eg.TriggerEvent("Tv-True")\nelse:\n    eg.TriggerEvent("TvDoNothing")')
            </Action>
            <Action Name="BLURAY">
                EventGhost.PythonScript(u'if eg.globals.Bluray:\n    eg.TriggerEvent("Bluray-True")\nelse:\n    eg.TriggerEvent("BlurayDoNothing")')
            </Action>
            <Action Name="RECEIVER">
                EventGhost.PythonScript(u'if eg.globals.Receiver:\n    eg.TriggerEvent("Receiver-True")\nelse:\n    eg.TriggerEvent("ReceiverDoNothing")')
            </Action>
            <Action Name="CABLE">
                EventGhost.PythonScript(u'if eg.globals.Cable:\n    eg.TriggerEvent("Cable-True")\nelse:\n    eg.TriggerEvent("CableDoNothing")')
            </Action>
        </Macro>
    </Folder>
</EventGhost>
