<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4" Guid="{CF3FE189-15DD-480D-8888-23063F9D8A73}" Time="1501605936.24">
    <Autostart Name="Autostart" XML_Guid="{DB359689-2ED7-442C-9A13-A11062DB9A3E}">
        <Action XML_Guid="{3D6F3AE2-C73C-4796-A687-77E821E8BDE8}">
            EventGhost.FlushEvents()
        </Action>
        <Action Enabled="False" XML_Guid="{9AB490FE-D7FB-4DBC-8906-EB2E638083BC}">
            EventGhost.Wait(1.0)
        </Action>
        <Plugin XML_Guid="{B5C4180D-A14E-45BC-AA8D-3053780D1598}" Identifier="EGAppControl" Guid="{22A5D3F6-3628-4B57-8608-C4098A465BEC}" File="EGAppControl">
            gAIpLg==
        </Plugin>
        <Plugin XML_Guid="{5D3A0090-0B87-4756-BC9C-5747E41BE1FB}" Identifier="FileOperations" Guid="{50D933C5-F93B-4A8A-A6CE-95A40F906036}" File="FileOperations">
            gAIpLg==
        </Plugin>
        <Plugin XML_Guid="{A33A1014-8DF3-457C-83DB-F26159490ACF}" Identifier="LogRedirector" Guid="{E34BB200-A001-410B-B5F2-16B479AF2046}" File="Log redirector">
            gAIoSwFYMwAAAEQ6XFByb2dyYW1tZGF0ZW5cRXZlbnRnaG9zdFxMb2dzXEV2ZW50R2hvc3RfTG9nLnR4dHEASwJLAksBiF1xAShVGFByb2Nlc3MuQ3JlYXRlZC5XbWlBcFNydnECVRpQcm9jZXNzLkRlc3Ryb3llZC5XbWlBcFNydnEDVRlQcm9jZXNzLkRlc3Ryb3llZC5jb25ob3N0cQRVF1Byb2Nlc3MuQ3JlYXRlZC5jb25ob3N0cQVYEwAAACBDRUMudHJhZmZpYy4gNDA6OGZxBlgVAAAAQ0VDLnRyYWZmaWMuIDA0OjkwOjAwcQdlSwJ0cQgu
        </Plugin>
        <Plugin XML_Guid="{94CB7919-9C04-48F9-9549-2F8EE0BE5E08}" Identifier="SchedulGhost" Guid="{39EFE2FF-6CA9-4450-B0E3-1AA125420B37}" File="SchedulGhost">
            gAIoWCgAAABEOlxQcm9ncmFtbWRhdGVuXEV2ZW50Z2hvc3RcU2NoZWR1bEdob3N0cQBYNgAAAEQ6XFByb2dyYW1tZGF0ZW5cRXZlbnRnaG9zdFxTY2hlZHVsR2hvc3RcU2NoZWRfTG9nLnR4dHEBWAwAAABTY2hlZHVsR2hvc3RxAl1xAyhdcQRdcQVlSwB0cQYu
        </Plugin>
        <Plugin XML_Guid="{6FC86651-15FD-4B95-9814-E9D3BA68BD12}" Identifier="Suntracker" Guid="{6AE8C0C3-93B4-4446-BC77-FDFA2528E531}" File="SunTracker">
            gAIoVQQxOC4wcQBVBTU5LjI1cQFYDQAAAEdNWFgwMDA3OjE6R01xAlgdAAAAMDEwMSwwNTAxLDA2MDYsMTIyNCwxMjI1LDEyMjZxA1giAAAAMDEwNiwwNDAyLDA0MDUsMDUxMiwwNTIyLDA1MjMsMDYyNXEEWAIAAAAwM3EFWAIAAAAxMHEGiYiIWAYAAAArMDEuMDBxB1gGAAAAbWV0cmljcQhLBYlYBAAAAE1haW5xCYl0cQou
        </Plugin>
        <Plugin XML_Guid="{A8DD9848-E8D2-461D-BEDC-9035188CE921}" Identifier="StandbyControl" Guid="{427420BD-DCE6-458B-9A2A-858093DF1C55}" File="StandbyControl">
            gAIoTYQDTVgCTYQDXXEAXXEBdHECLg==
        </Plugin>
        <Plugin XML_Guid="{79C4C6C5-E630-4185-A465-DBA45364BA2A}" Identifier="PythonScriptEditor" Guid="{13049FCC-4EA9-4666-A4DF-EA601E0CA0CE}" File="PythonScriptEditor">
            gAIpLg==
        </Plugin>
        <Plugin XML_Guid="{410B3B8A-BF19-4708-B1C5-35F27F3179F1}" Identifier="Taskbar" Guid="{9E798FF1-ABFB-42F2-A292-0FF746309DBE}" File="Taskbar">
            gAIpLg==
        </Plugin>
        <Plugin XML_Guid="{3123E527-B69E-4A48-8325-FCD2015379C5}" Identifier="NetworkSender" Guid="{B4F0DAFE-2E0B-47F3-A155-ED72C7A4E270}" File="NetworkSender">
            gAJYBgAAAG1tbm90ZXEATQAEWAgAAABwb3Jjb2Rpb3EBh3ECLg==
        </Plugin>
        <Plugin XML_Guid="{6519D022-4394-41A3-8DB4-73A2CB64C0AB}" Identifier="NetworkReceiver" Guid="{8F35AE6D-AF12-4A94-AA91-4B63F0CBBE1C}" File="NetworkReceiver">
            gAJNDidYCAAAAHBvcmNvZGlvcQBYAwAAAFRDUHEBh3ECLg==
        </Plugin>
        <Plugin XML_Guid="{01F420C4-BABC-4065-A2DF-C323DF8EAA63}" Identifier="NetworkReceiver2" Guid="{8F35AE6D-AF12-4A94-AA91-4B63F0CBBE1C}" File="NetworkReceiver">
            gAJNDydYCAAAAHBvcmNvZGlvcQBYAwAAAFRDUHEBh3ECLg==
        </Plugin>
        <Plugin XML_Guid="{42C74281-AD2B-4820-8068-04AC38910646}" Identifier="SSH" Guid="sshClient" File="sshClient">
            gAIpLg==
        </Plugin>
        <Plugin XML_Guid="{D37ED3FF-9CB7-45B3-A7B0-6A9743A50296}" Identifier="MediaPortal" Guid="{50B10A24-77AC-4248-85E5-16A04983170E}" File="MediaPortal">
            gAIpLg==
        </Plugin>
        <Plugin XML_Guid="{28871B66-FEBD-4C79-97D3-F63674516474}" Identifier="MPMessageSender" Guid="MediaPortalMessageSender" File="MediaPortalMessageSender">
            gAJYDQAAADE5Mi4xNjguNzcuMjFxAE0NJ1gIAAAAcG9yY29kaW9xAYdxAi4=
        </Plugin>
        <Plugin XML_Guid="{90A7B874-A917-4CA2-BF53-42FE19931E30}" Identifier="XBMC2" Guid="{8C8B850C-773F-4583-AAD9-A568262B7933}" File="XBMCRepeat">
            gAJ9cQAoVQdKU09OUlBDcQF9cQIoVQZlbmFibGVxA4hVBHBvcnRxBE2CI3VVC0V2ZW50U2VydmVycQV9cQYoaAOIaARNMSZ1VQxsb2dSYXdFdmVudHNxB4lVCUJyb2FkY2FzdHEIfXEJKGgDiWgETVYgdVUEWEJNQ3EKfXELKFUIdXNlcm5hbWVxDFgEAAAAa29kaXENVQJpcHEOWA0AAAAxOTIuMTY4Ljc3LjIxcQ9VCHBhc3N3b3JkcRBYAAAAAHERaARNkB91VQhsb2dEZWJ1Z3ESiXWJhnETLg==
        </Plugin>
        <Plugin XML_Guid="{8C75F4B4-6BB1-434E-A916-5411476A366E}" Identifier="Process" Guid="{82BADF9F-D809-4EBC-A540-CCBF7563F8DF}" File="ProcessWatcher">
            gAIpLg==
        </Plugin>
        <Plugin XML_Guid="{CA62AFF5-1110-4B65-9BB7-D15DFA98457B}" Identifier="Task" Guid="{D1748551-C605-4423-B392-FB77E6842437}" File="Task">
            gAIpLg==
        </Plugin>
        <Plugin XML_Guid="{55307CA1-CEF6-4C1B-8D1E-2CFE6C1C12CB}" Identifier="MCE_Vista" Guid="{A7DB04BB-9F0A-486A-BCA1-CA87B9620D54}" File="MceRemote_Vista">
            gAIpLg==
        </Plugin>
        <Action XML_Guid="{9F3559CF-16C0-450B-99EE-9C59DF334392}">
            EventGhost.EnableItem(eg.GUID('{49B4E1A3-E761-4FCA-9600-7914DE1A6357}'))
        </Action>
        <Plugin XML_Guid="{76113D13-8614-42AE-A38E-AFA34E4C0C10}" Identifier="AudioEndpoint" Guid="{31DE576B-5938-4C0B-A0E2-64F9ADF02BF8}" File="AudioEndpoint">
            gAIpLg==
        </Plugin>
        <Action XML_Guid="{5B89BE78-2769-4772-A1CF-79705026938D}">
            EventGhost.NewJumpIf(eg.GUID('{1472A2BF-864C-47AC-801B-915C369075C3}'), 2, False)
        </Action>
        <Plugin Enabled="False" XML_Guid="{7644F709-1BE7-49AB-8E94-0344F45469CE}" Identifier="CEC" Guid="{FD322EEA-C897-470C-BEF7-77BF15C52DB4}" File="libCEC">
            gAIoiEsBWAYAAABsaWJDRUNxAFUEQ09NNnEBdHECLg==
        </Plugin>
        <Action XML_Guid="{180F7E23-1765-479C-9204-B8A551BA154B}">
            EventGhost.NewJumpIf(eg.GUID('{1472A2BF-864C-47AC-801B-915C369075C3}'), 2, False)
        </Action>
    </Autostart>
    <Folder Name="Default" XML_Guid="{49B4E1A3-E761-4FCA-9600-7914DE1A6357}" Expanded="True">
        <Folder Name="System" XML_Guid="{D83AF122-A35D-4ADC-B46F-EB24B92E7B58}" Expanded="True">
            <Folder Name="EG_startaktionen" XML_Guid="{F80BE2BF-5980-4155-B7D4-C342AD2A0DF9}">
                <Macro Name="EG_Startaktionen" XML_Guid="{1472A2BF-864C-47AC-801B-915C369075C3}">
                    <Action XML_Guid="{31ACBBE2-6B0D-4078-BF3B-A2BE88BF27F3}">
                        SSH.AddHost(u'mmrp01', 22, u'MYUSERNAME', u'MYPASSW', u'mmrp01', u'Event', True, True)
                    </Action>
                    <Action XML_Guid="{5D5DE3AC-1AD8-46FF-94F3-12359DC7C24D}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.htpcapp_last.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Set logged htpcapp_last" XML_Guid="{8A9C0600-CCA5-418D-A567-5FF513D3A3F8}">
                        EventGhost.PythonScript(u'eg.globals.htpcapp_last = eg.result\nprint eg.globals.htpcapp_last')
                    </Action>
                    <Action Name="Set start vars" XML_Guid="{53EB391C-9334-48F0-BF50-035A3E35A993}">
                        EventGhost.PythonScript(u'eg.globals.htpcapp = eg.globals.htpcapp_last\neg.globals.amp_volume = 25\neg.globals.amp_volume_old = eg.globals.amp_volume-1\neg.globals.amp_volume_old2 = 33\neg.globals.bitstreaming = "unknown"\neg.globals.luminance = "unknown"\neg.globals.fullscreen = 0\neg.globals.dimension = "2D"\neg.globals.harm_act = "OFF"\neg.globals.harm_act_active = 1\n#eg.globals.htpcapp_last = "mp"\neg.globals.standbytriggered = 0\neg.globals.systemvolumelevel = 100\neg.globals.firststandbyafterresume = 0\neg.globals.first_play = 1\neg.globals.cec_error = 0\neg.globals.inhibit_pause = 0\neg.globals.forcedrestartkodi = 0\neg.globals.systemvolumelevel_set = "100.00"\neg.globals.restart_mce = 1\neg.globals.mpstart_active = 1\neg.globals.kodistart_active = 1\neg.globals.systemresume_active = 1\neg.globals.htpcappstart_active = 1\neg.globals.forcedrestartkodi = 0\neg.globals.kodi_forced_restart_onok = 0\neg.globals.forcedrestartmp = 0\neg.globals.mp_forced_restart_onok = 0\n#eg.globals.checksystemaudio_ON_run = 0\neg.globals.checksystemaudio_OFF_run = 0\neg.globals.systemvolumeprocessing = 1\neg.globals.headset_activateonok = 0\neg.globals.show_pre_osd = 1\neg.globals.scriptname_sysvol = "SystemVolumeControl UpDown"\neg.globals.avr_volume_interrupt = 0\neg.globals.vol_change_direction = "startvalue"\neg.globals.vol_change_direction_last = "startvalue"\neg.globals.vol_direction_control = 0\neg.globals.volmax = 100\neg.globals.headset_no = 1\neg.globals.debug = 0\neg.globals.kodi_screensaveractive = 0\neg.globals.XBMC2_System_OnStart_active = 1\neg.globals.delay_avrvolcontrol = 0.0\neg.globals.avr_action = 0\neg.globals.debug = 0\neg.globals.htpcapp_singlemode = 0\neg.globals.ovpn_currentconfig = 1\neg.globals.failsaverestart = 0\neg.globals.standby_osd_delay = 90.0\n')
                    </Action>
                    <Action Name="Set appearance start vars" XML_Guid="{8B470172-E207-47B3-8E79-FFD725FA2782}">
                        EventGhost.PythonScript(u'eg.globals.osd_skin = "mp"\neg.globals.osd_font = "TitanSmall"\neg.globals.osd_font_color = (255, 255, 255)\neg.globals.osd_font_size = -29\neg.globals.osd_pos = 6\neg.globals.osd_x = 0\neg.globals.osd_y = 20\neg.globals.osd_vol_font_bold_weight = 400\neg.globals.osd_vol_font_size = -29\neg.globals.osd_vol_font_size_fscreen = -32\neg.globals.osd_vol_font_bold_weight = 200\neg.globals.osd_vol_pos = 1\neg.globals.osd_vol_x = 75\neg.globals.osd_vol_y = 8\neg.globals.osd_vol_pos_fscreen = 6\neg.globals.osd_vol_fscreen_x = 0\neg.globals.osd_vol_fscreen_y = 20\neg.globals.osd_vol_pos_startscreen = 4\neg.globals.osd_vol_startscreen_x = 0\neg.globals.osd_vol_startscreen_y = 0\n#\neg.globals.osd_font_string = \'0;%d;0;0;0;%d;0;0;0;0;3;2;1;34;%s\' % (eg.globals.osd_font_size, eg.globals.osd_vol_font_bold_weight, eg.globals.osd_font)\neg.plugins.FileOperations.Write(2, u\'{eg.globals.osd_font_string}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.osd_font_string.txt\', 0, 0, True, False, False, \'cp1252\')\ndef setosd():\n    eg.TriggerEvent ("setosd."+eg.globals.htpcapp_last, prefix="htpc")\neg.scheduler.AddTask(0.0, setosd)\n#\n#Background\neg.globals.kodi_bg = u\'D:\\\\Programmdaten\\\\kodi\\\\images\\\\kodi_splash_default.jpg\'\neg.globals.mp_bg = u\'D:\\\\Programmdaten\\\\MediaPortal\\\\System Backgrounds\\\\default.jpg\'\nif eg.globals.htpcapp_last==\'kodi\':\n    eg.globals.def_bg = eg.globals.kodi_bg\nelse:\n    eg.globals.def_bg = eg.globals.mp_bg')
                    </Action>
                    <Action XML_Guid="{92C9F879-A378-4C4C-B972-AAE6B0CE42A3}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.bitstreaming.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Python Script: Set current bitstreaming status" XML_Guid="{483EFB9E-45E8-4F13-A768-F065AA42AD30}">
                        EventGhost.PythonScript(u'#debug:\ndebug = eg.globals.debug\n#debug = 1\n#/debug\neg.result = int(eg.result)\neg.globals.bitstreaming = eg.result\nprint eg.globals.bitstreaming\n#\nif debug:\n    print eg.globals.bitstreaming\n    print type(eg.globals.bitstreaming)\n    if not eg.globals.bitstreaming: \n        print "Boolean check fine"\n    else:\n        print "Fucked"')
                    </Action>
                    <Action XML_Guid="{1CFF5158-6000-469D-9435-5BF1D31D2DCE}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.lav_mixing.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Set current lav mixing status" XML_Guid="{8E11EB0A-91DF-4E81-87F6-4F0F0F0CFACC}">
                        EventGhost.PythonScript(u'debug = eg.globals.debug\n#debug = 1\nif debug:\n    print eg.result\n    print type(eg.result)\neg.result = int(eg.result)\nif debug: print type(eg.result)\neg.globals.lav_mixing = eg.result\nif debug: print "eg.globals.lav_mixing: "+str(eg.globals.lav_mixing)')
                    </Action>
                    <Action XML_Guid="{EEECCBEF-1596-4408-9E58-16ACB6E14C50}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.playing.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Python Script: Set current playing status" XML_Guid="{E596300C-9941-4E21-A063-9B2B800812E5}">
                        EventGhost.PythonScript(u'eg.result = int(eg.result)\nif eg.result:\n    eg.globals.playing = 1\nelse:\n    eg.globals.playing = 0\nprint "Playing: "+str(eg.globals.playing)\nif eg.globals.playing:\n    eg.globals.fullscreen = 1')
                    </Action>
                    <Action XML_Guid="{26BBBC76-8FAD-4521-B1DD-3CC2FE0A42DE}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.player_status.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Python Script: Set current player status" XML_Guid="{D17A151C-CF18-4857-A920-B21EE0AB7AD7}">
                        EventGhost.PythonScript(u'eg.globals.player_status = eg.result')
                    </Action>
                    <Action XML_Guid="{AC1532A3-C723-4DDB-839C-0F02AC76C148}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.sunstate.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Python Script: Set previous sun state_old" XML_Guid="{7459DF6C-7681-4560-ADDF-B43CCDB90276}">
                        EventGhost.PythonScript(u'eg.globals.luminance_old = eg.result\neg.globals.luminance = eg.globals.luminance_old\nprint eg.globals.luminance_old')
                    </Action>
                    <Action XML_Guid="{4CFB866F-C26F-4257-9184-776B5DCE47BB}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.harmony_actions_list.txt', 0, 0, 'cp1252', 1, False, 0)
                    </Action>
                    <Action Name="Build eg.globals.HarmActList" XML_Guid="{28EFCFC1-ED1D-4475-8F6E-3CF08C1440BF}">
                        EventGhost.PythonScript(u"#print eg.result\neg.globals.HarmActList = eg.result\nprint eg.globals.HarmActList\nprint  '\\n'.join(eg.globals.HarmActList)")
                    </Action>
                    <Action XML_Guid="{BEAB790F-EFBB-44F3-83BC-48818B3A7E6E}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.harm_act_last.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Python Script: Set eg.globals.harm_act_last." XML_Guid="{7BB4B8AB-490B-4DB0-BA52-10EDD1968327}">
                        EventGhost.PythonScript(u'eg.globals.harm_act_last = str(eg.result)\nprint eg.globals.harm_act_last\n#eg.globals.harm_act_recent_trigger = "OFF"')
                    </Action>
                    <Action XML_Guid="{6B571BDA-2AA0-4AC4-9522-FE0279A9DD29}">
                        EventGhost.EnableItem(eg.GUID('{C8429847-2B16-4A88-88D7-63A52090459F}'))
                    </Action>
                    <Action XML_Guid="{566494F8-F073-47E3-97D3-BD54236A27E5}">
                        FileOperations.Read(1, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.failsaverestart.txt', 0, 0, 'utf8', 1, False, 1)
                    </Action>
                    <Action Name="Python Script: Check for failsaverestart" XML_Guid="{D117CFA8-49FA-498D-AF0B-9E24C8F47811}">
                        EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\n#debug = 1\n#/debug\neg.result = int(eg.result)\neg.globals.failsaverestart = eg.result\nif debug: print "eg.globals.failsaverestart = "+str(eg.globals.failsaverestart)\ndef reset_failsaverestart():\n    import time\n    debug = eg.globals.debug\n    debug = 1\n    time.sleep(120)\n    eg.globals.failsaverestart = 0\n    if debug: print "eg.globals.failsaverestart reset to 0"\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.failsaverestart}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart.txt\', 0, 0, True, False, False, \'cp1252\')\neg.scheduler.AddTask(0.0, reset_failsaverestart)\ndef show_failsaverestart_osd():\n    import time\n    max = 5\n    eg.plugins.EventGhost.ShowOSD(u\'     Errorhandling: EG wurde neu gestartet     \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 3.0, eg.globals.osd_skin)\n    time.sleep(1)\n    text = "Bitte warten "\n    for x in range(0, max):\n        if debug: print x\n        eg.plugins.EventGhost.ShowOSD(u\'    \'+text+x*"."+(max-x)*" "+"    ", eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 3.0, eg.globals.osd_skin)\n        time.sleep(1)\nif eg.globals.failsaverestart:\n    eg.scheduler.AddTask(0.0, show_failsaverestart_osd)')
                    </Action>
                    <Action Name="Get HarmAct ID" XML_Guid="{C64A913A-F467-4250-AFEA-8B6615C97B34}">
                        EventGhost.PythonScript(u'def getharmid():\n    eg.plugins.SSH.RunCommand(u\'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 get_current_activity_id\', u\'mmrp01\', False, False, False)\n    print "getting harm_act ID"\neg.scheduler.AddTask(3.0, getharmid)')
                    </Action>
                    <Action XML_Guid="{DCD93114-D4A2-4A62-8782-F2B9AD4F2C1E}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.headset_connected.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Set eg.globals.headset_connected" XML_Guid="{C06A0F2A-494A-4D01-8D5D-3A07C44937B2}">
                        EventGhost.PythonScript(u'eg.result = int(eg.result)\neg.globals.headset_connected = eg.result\nprint eg.globals.headset_connected')
                    </Action>
                    <Action XML_Guid="{53EA56C6-9C02-4B24-B614-DB321EDE518C}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.headset_active.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Set eg.globals.headset_active" XML_Guid="{26AF67B0-A0D5-4822-8336-E7B9186C7D34}">
                        EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\n#debug = 1\n#eg.result = 1\n#/debug\nif debug: print type(eg.result)\neg.globals.headset_active = int(eg.result)\nif debug: print type(eg.globals.headset_active)\nif eg.globals.headset_active and eg.globals.headset_connected:\n    eg.result = 1\n    print "headset is connected and activated"\nelse:\n    eg.globals.headset_active = 0\n    eg.globals.headset_connected = 0\n    eg.result = 0\n    print "headset is NOT connected and activated"')
                    </Action>
                    <Action XML_Guid="{8E62ACA0-D66D-4369-9E1F-B7A68EBB1E3D}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.checksystemaudio_ON_run.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Set eg.globals.checksystemaudio_ON_run" XML_Guid="{8AF981A3-E1A3-4D14-B984-C4EC9919795D}">
                        EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    print "debug is on"\n    print eg.result\n    print type(eg.result)\neg.globals.checksystemaudio_ON_run = int(eg.result)\nprint "eg.globals.checksystemaudio_ON_run: "+str(eg.globals.checksystemaudio_ON_run)\nif debug: print type(eg.globals.checksystemaudio_ON_run)')
                    </Action>
                    <Action XML_Guid="{BBC67E1F-E651-442E-956A-8E158C0A8445}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.checksystemaudio_OFF_run.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Set eg.globals.checksystemaudio_OFF_run" XML_Guid="{A9C4BBDD-F484-44B8-9126-B117C75BFA71}">
                        EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    print "debug is on"\n    #print eg.result\n    #print type(eg.result)\neg.globals.checksystemaudio_OFF_run = int(eg.result)\nprint "eg.globals.checksystemaudio_ON_run: "+str(eg.globals.checksystemaudio_OFF_run)\nif debug: print type(eg.globals.checksystemaudio_OFF_run)')
                    </Action>
                    <Action XML_Guid="{762B0D4B-42F2-4B27-8AC1-F3747FF8D6E1}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.amp_connected.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Set eg.globals.amp_connected" XML_Guid="{F5A3B0A9-F30C-4A19-B8B3-06B3BF4FB7D7}">
                        EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    print "debug is on"\n    print eg.result\n    print type(eg.result)\neg.globals.amp_connected = int(eg.result)\nprint "eg.globals.amp_connected: "+str(eg.globals.amp_connected)\nif debug: print type(eg.globals.amp_connected)\n\n')
                    </Action>
                    <Action XML_Guid="{14407874-3DEE-4252-8F8F-36957D400603}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.remotesession.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Set eg.globals.remotesession" XML_Guid="{0F44FBF0-5734-44E6-998E-69D929247E49}">
                        EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    print "debug is on"\n    print eg.result\n    print type(eg.result)\neg.globals.remotesession = int(eg.result)\nprint "eg.globals.remotesession: "+str(eg.globals.remotesession)\nif debug: print type(eg.globals.remotesession)\n\n')
                    </Action>
                    <Action XML_Guid="{17EA2714-02F6-4FED-B916-F95A68CB7330}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.mp_loaded.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Set eg.globals.mp_loaded" XML_Guid="{C3FF1C45-1B20-4BD5-9D6A-CC55B7D0E031}">
                        EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    print "debug is on"\n    print eg.result\n    print type(eg.result)\neg.globals.mp_loaded = int(eg.result)\nprint "eg.globals.mp_loaded: "+str(eg.globals.mp_loaded)\nif debug: print type(eg.globals.mp_loaded)\n\n\n\n')
                    </Action>
                    <Action XML_Guid="{96C4FF96-D007-4E43-A542-6DCA66C837FA}">
                        EventGhost.EnableExclusive(eg.GUID('{AF865C51-9B88-42F4-A3A9-720C42DE7FBC}'))
                    </Action>
                    <Action XML_Guid="{1656628D-ECFF-4C82-8F2D-3C67BBF9DB05}">
                        EventGhost.EnableExclusive(eg.GUID('{44040479-B0CC-4AE8-89E1-E2E8110A9E54}'))
                    </Action>
                    <Action XML_Guid="{47842BAA-EC67-42B9-B2F3-C32F357C6D55}">
                        EventGhost.EnableExclusive(eg.GUID('{5AED4961-EE4C-4FA1-8125-F639F1E6CF25}'))
                    </Action>
                    <Action XML_Guid="{1AFC2CD2-3272-4F55-A427-BEBCF68A774B}">
                        EventGhost.EnableExclusive(eg.GUID('{C30E7D4D-488F-405A-84F7-7840E24E3D79}'))
                    </Action>
                    <Action XML_Guid="{DEF10493-9117-4E4B-B5A2-958A51AD9945}">
                        EventGhost.EnableItem(eg.GUID('{82FEB88F-A298-4362-B6FB-7886C994905D}'))
                    </Action>
                    <Action XML_Guid="{C19D8E30-3EFD-49E5-9914-2669FBE357E4}">
                        EventGhost.NewJumpIf(eg.GUID('{C20F5129-EBB0-4F0B-B111-2DCC62B84A36}'), 2, True)
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="SystemAudio" XML_Guid="{EC1E10AC-42B3-460C-8F8D-F5BAEDEACBFB}" Expanded="True">
                <Folder Name="Devices" XML_Guid="{D2B5713F-6BD6-4103-9BED-003C968CC495}" Expanded="True">
                    <Macro Name="Set Audio Device Headsets" XML_Guid="{DF7FAEEC-55F5-49E4-84F8-9B8F3808C69F}" Expanded="True">
                        <Event Name="system.audiorouting.triggersysaudiodevicechange_H1" XML_Guid="{CA271663-4176-4BA0-9111-E38F4FD7A4C1}" />
                        <Action Name="Set Audio Device Headsets" Enabled="False" XML_Guid="{331E5BEC-9AD1-4EB6-BB38-1AD821870E75}">
                            EventGhost.PythonScript(u'def changesysaudio2headset():\n\timport time\n\tif eg.globals.headset_no == 1:\n\t\tprint "setting sys audio to headset 1"\n\t\teg.plugins.Window.SendKeys(u\'{Shift+Ctrl+Alt+H}\', False, 2)\n\t\ttime.sleep(0.5)\n\t\teg.plugins.System.ChangeMasterVolumeBy(-1.0, u\'Primary Sound Driver\')\n\t\ttime.sleep(.250)\n\t\teg.plugins.System.ChangeMasterVolumeBy(1.0, u\'Primary Sound Driver\')\n\telif eg.globals.headset_no == 2:\n\t\tprint "setting sys audio to headset 2"\n\t\teg.plugins.Window.SendKeys(u\'{Shift+Ctrl+Alt+S}\', False, 2)\n\ttime.sleep(2)\n\tif eg.globals.headset_no == 1:\n\t\tprint "setting sys audio to headset 1"\n\t\teg.plugins.Window.SendKeys(u\'{Shift+Ctrl+Alt+H}\', False, 2)\n\telif eg.globals.headset_no == 2:\n\t\tprint "setting sys audio to headset 2"\n\t\teg.plugins.Window.SendKeys(u\'{Shift+Ctrl+Alt+S}\', False, 2)\n\ttime.sleep(2)\n\tif eg.globals.headset_no == 1:\n\t\tprint "setting sys audio to headset 1"\n\t\teg.plugins.Window.SendKeys(u\'{Shift+Ctrl+Alt+H}\', False, 2)\n\telif eg.globals.headset_no == 2:\n\t\tprint "setting sys audio to headset 2"\n\t\teg.plugins.Window.SendKeys(u\'{Shift+Ctrl+Alt+S}\', False, 2)\neg.scheduler.AddTask(0.0, changesysaudio2headset)')
                        </Action>
                        <Action XML_Guid="{66873805-3917-4C13-89FA-3580D790D331}">
                            AudioEndpoint.SetDefaultDevice(u'{0.0.0.00000000}.{dac47dc9-5b39-4cf7-b013-a3d189b6ed47}', 0)
                        </Action>
                    </Macro>
                    <Macro Name="AudioEndpoint: Get Default Audio Device: 0" XML_Guid="{05152E18-9895-4EF3-BB8D-E1B81C18C00A}" Expanded="True">
                        <Action XML_Guid="{2142B686-811E-4868-B9E1-139BB15594C8}">
                            AudioEndpoint.GetDefaultDevice(0, 0)
                        </Action>
                        <Action Name="print" XML_Guid="{ADC23B71-B0C1-4218-A9CD-F37D77A5D521}">
                            EventGhost.PythonScript(u'print eg.result')
                        </Action>
                    </Macro>
                    <Macro Name="Connection_AudioEndpoint" XML_Guid="{EE00FF4C-F082-42B8-AC95-4D8E026D3D05}" Expanded="True">
                        <Event Name="AudioEndpoint.State.UNPLUGGED.*" XML_Guid="{ACB8CB1B-9175-444C-935B-7D9664852DC0}" />
                        <Event Name="AudioEndpoint.State.ACTIVE.*" XML_Guid="{F2664862-7507-45B2-B084-11AE68B48C03}" />
                        <Action Name="Process Audio Devices" XML_Guid="{B9E15F9A-45B5-4820-BFB0-A252A83D3888}">
                            EventGhost.PythonScript(u'scriptname = \'Process Audio Devices\'\n#debug\ndebug = eg.globals.debug\ndebug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\n#/debug\n#\n#test\ntest = 0\n#AudioEndpoint.State.ACTIVE.Bluetooth Audio Renderer (Bluetooth Stereo-Audio)\n#AudioEndpoint.State.UNPLUGGED.Bluetooth Audio Renderer (Bluetooth Stereo-Audio)\n#Bluetooth Audio Renderer (2- Bluetooth Stereo-Audio)\n#AudioEndpoint.State.ACTIVE.TX-SR607-14\n#AudioEndpoint.State.UNPLUGGED.TX-SR607-14\n#\nif test:\n    eg.event.string = "(Bluetooth Stereo-Audio).UNPLUGGED"\n    #eg.event.string = "(Bluetooth Stereo-Audio).ACTIVE"\n#/test\n#\n#---------------------------------- scriptstart -----------------------------------------------\n#set start vars\nif debug: print \'Event: \'+eg.event.string\ndevicestring = eg.event.string\nheadsetaction = 0\nampaction = 0\nDeviceStatusChange = 0\n#\nif \'TX-SR607\' in devicestring:\n    ampaction = 1\n    devicename = "Amp"\n    if debug: print "Amp action set"\nelif "(Bluetooth Stereo-Audio)" in devicestring:\n    headsetaction = 1\n    eg.globals.headset_no = 1\n    devicename = "Headset 1"\n    if debug: print "Headsetaction with "+str(devicename)+" set"\nelif "(2- Bluetooth Stereo-Audio)" in devicestring:\n    headsetaction = 1\n    eg.globals.headset_no = 2\n    devicename = "Headset 2"\n    if debug: print "Headsetaction with "+str(devicename)+" set"\nelse:\n    if debug: print "Device is unknown"\n    devicename = "Unknown"\n#Attached\nif "ACTIVE" in devicestring:\n    if debug: print devicename+" connected"\n    DeviceStatusChange = 1\n    eg.globals.audio_mode = devicename\n#Removed\nelif \'UNPLUGGED\' in devicestring:\n    if debug: print devicename+" removed"\n    DeviceStatusChange = 0\nif headsetaction:\n    eg.globals.headset_connected = DeviceStatusChange\nelif ampaction:\n    eg.globals.amp_connected = DeviceStatusChange\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.amp_connected}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.amp_connected.txt\', 0, 0, True, False, False, \'cp1252\')\nprint str(devicename)+" has changed its state to "+str(DeviceStatusChange)\nif not \'Unknown\' in devicename:\n    eg.TriggerEvent((str(devicename)+"."+str(DeviceStatusChange)), prefix="System.Device")\n    def updatesystemvolume_var():\n        import time\n        time.sleep(2)\n        eg.TriggerEvent((str(devicename)+"."+str(DeviceStatusChange)), prefix="System.SystemDevice_delayedaction")\n    eg.scheduler.AddTask(0.0, updatesystemvolume_var)\nelse:\n    if debug: print "Devicename is: "+str(devicename)\nif debug:\n    from datetime import datetime\n    print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug')
                        </Action>
                    </Macro>
                </Folder>
                <Folder Name="SystemVolume" XML_Guid="{68D088FB-AC54-4F9C-B0AF-70F9A5F53DF7}">
                    <Folder Name="HTPC Level" XML_Guid="{15C75FB5-FEF9-4FCC-A060-4B524EAFB803}">
                        <Macro Name="VolumeLevel default" XML_Guid="{25D7A1FE-9A57-48D4-BDBE-B5F710FBB429}">
                            <Action XML_Guid="{48A1780E-E0E2-4AF7-99C3-D7C8B7B39883}">
                                EventGhost.PythonCommand(u'eg.globals.systemvolumelevel_set = 100.0')
                            </Action>
                            <Action XML_Guid="{A4FA18A7-A2AA-4967-BE5D-E18AE4B682D8}">
                                EventGhost.NewJumpIf(eg.GUID('{D252CF23-D844-4248-ABD6-1AB7665A5AA7}'), 0, False)
                            </Action>
                        </Macro>
                        <Macro Name="VolumeLevel 50%" XML_Guid="{1334E8D0-6C10-4D28-B5A6-1F5AB56C0E3C}">
                            <Action XML_Guid="{02DE237A-858C-4EEB-A396-AE3F1F1633AF}">
                                System.SetMasterVolume(50.0, u'Primary Sound Driver')
                            </Action>
                            <Action XML_Guid="{A4FA18A7-A2AA-4967-BE5D-E18AE4B682D8}">
                                EventGhost.NewJumpIf(eg.GUID('{D252CF23-D844-4248-ABD6-1AB7665A5AA7}'), 0, False)
                            </Action>
                        </Macro>
                        <Macro Name="VolumeLevel var" XML_Guid="{8A5136DA-8EA2-4647-A50A-B600CC9E763F}">
                            <Event Name="System.Device.Amp.1" Enabled="False" XML_Guid="{022492E9-AC52-46A3-A06F-63D4BF4B4F1A}" />
                            <Event Name="system.audiorouting.Set_VolumeLevel_var" XML_Guid="{C5F23A66-1C81-495B-B32A-C57456FE20C4}" />
                            <Event Name="System.SystemDevice_delayedaction.Headset.1" XML_Guid="{56DBA0AD-B960-4422-91DD-E910C77A1EAE}" />
                            <Event Name="System.SystemDevice_delayedaction.Headset.0" XML_Guid="{0B3C87F3-D9F2-470A-BBB7-6C0C53E6EC80}" />
                            <Event Name="System.SystemDevice_delayedaction.Amp.1" XML_Guid="{51F0B177-B054-4942-AC0D-E0605B68553D}" />
                            <Action Enabled="False" XML_Guid="{6FE821F6-4AB3-4346-AE6C-2FACAF4DB467}">
                                EventGhost.NewJumpIf(eg.GUID('{E9DED717-6642-4DF8-9233-57B6F2C22858}'), 2, True)
                            </Action>
                            <Action XML_Guid="{A4FA18A7-A2AA-4967-BE5D-E18AE4B682D8}">
                                EventGhost.NewJumpIf(eg.GUID('{D252CF23-D844-4248-ABD6-1AB7665A5AA7}'), 2, False)
                            </Action>
                        </Macro>
                        <Macro Name="VolumeLevel TVSender" XML_Guid="{BDEF814F-3511-4A81-AF89-B86953C26C2D}">
                            <Action XML_Guid="{E11559ED-2EA0-4C1E-91B7-8D40AFD71A36}">
                                System.SetMasterVolume(70.0, u'Primary Sound Driver')
                            </Action>
                            <Action XML_Guid="{A4FA18A7-A2AA-4967-BE5D-E18AE4B682D8}">
                                EventGhost.NewJumpIf(eg.GUID('{D252CF23-D844-4248-ABD6-1AB7665A5AA7}'), 0, False)
                            </Action>
                            <Action Name="Gilt nur für processed audio, nicht bitstreaming" XML_Guid="{735A8FBE-EFD7-416F-B4F8-E1EFEB17FAE0}">
                                EventGhost.Comment()
                            </Action>
                            <Action XML_Guid="{26836824-155A-4E23-9FC0-2BD8E9C7EA6F}">
                                EventGhost.NewJumpIf(eg.GUID('{E9DED717-6642-4DF8-9233-57B6F2C22858}'), 2, True)
                            </Action>
                        </Macro>
                        <Macro Name="Verändere Master-Lautstärke: -30.00 %" XML_Guid="{EAB0907D-7111-4B8D-A486-7930AC6D736C}" Expanded="True">
                            <Action XML_Guid="{2A19CF89-4B15-475C-A807-5160B816A1E0}">
                                System.ChangeMasterVolumeBy(-30.0, u'Primary Sound Driver')
                            </Action>
                        </Macro>
                        <Macro Name="OSD Volume Debug" XML_Guid="{E9DED717-6642-4DF8-9233-57B6F2C22858}" Expanded="True">
                            <Action XML_Guid="{FFA8DB76-0536-442C-B4E4-42B413F1010C}">
                                EventGhost.ShowOSD(u'DEBUG: VOL def {eg.globals.systemvolumelevel}%', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;TitanSmall', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 2.0, u'mp')
                            </Action>
                        </Macro>
                    </Folder>
                    <Macro Name="AudioEndpoint: Get Volume ???" XML_Guid="{F8AD4234-5FDC-4604-A3E1-AEC960A279B3}">
                        <Action XML_Guid="{7CDF67C4-AE12-4795-8FA6-F13BFCD5B60A}">
                            AudioEndpoint.GetDefaultDevice(0, 0)
                        </Action>
                        <Action XML_Guid="{FD05167A-73C5-42C8-A662-49CE9B5E7DE4}">
                            AudioEndpoint.GetVolume('returnedDevice')
                        </Action>
                        <Action XML_Guid="{79B1599E-140B-46BC-BBFA-EBF265A2C665}">
                            EventGhost.PythonScript(u'print eg.result')
                        </Action>
                    </Macro>
                    <Macro Name="Set level, vars" XML_Guid="{D252CF23-D844-4248-ABD6-1AB7665A5AA7}">
                        <Action Name="Set level + var" XML_Guid="{954CA05B-662C-4A4D-9058-5B06499BD3AB}">
                            EventGhost.PythonScript(u'if eg.globals.amp_connected:\n    eg.plugins.System.SetMasterVolume(eg.globals.systemvolumelevel_set, u\'Primary Sound Driver\')\nelse:\n    print "Amp not connected - Skipping set Volume"')
                        </Action>
                    </Macro>
                    <Macro Name="Print/check Volume" XML_Guid="{FE76CFC2-75CA-4CD0-B830-A0872ABF5FB8}">
                        <Event Name="System.Volume" Enabled="False" XML_Guid="{E0351CD1-6A56-4C4E-A5CF-B5FDCEB778E7}" />
                        <Event Name="AudioEndpoint.Volume.*" XML_Guid="{76EB83E1-B515-4CBA-A43E-56F0431772FB}" />
                        <Action Name="Print/check/log Volume" XML_Guid="{440D76BD-BA4D-49E5-A267-787081CD5059}">
                            EventGhost.PythonScript(u'if not eg.globals.systemvolumeprocessing:\n    print "skip processing"\n    eg.Exit()\n#print int(round(float(eg.event.payload)))\nif \'AudioEndpoint.Volume\' in eg.event.string:\n    #print eg.event.payload\n    eg.globals.systemvolumelevel = int(round(float(eg.event.payload[1])))\n    print "Set by AudioEndpoint: Volume: "+str(eg.globals.systemvolumelevel)\nelse:\n    eg.globals.systemvolumelevel = int(round(float(eg.event.payload)))\n    print "Set by System: Volume: "+str(eg.globals.systemvolumelevel)\neg.globals.systemvolumelevel_set = eg.globals.systemvolumelevel\neg.globals.audiodevice_status = "fine"\neg.globals.checksystemaudio_ON_run = 0\neg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_ON_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_runs.txt\', 0, 0, False, False, False, \'cp1252\')')
                        </Action>
                    </Macro>
                </Folder>
                <Macro Name="CheckSystemAudioStatus_old" Enabled="False" XML_Guid="{9F19DFCC-F81D-4251-A3AB-D0212D14D740}">
                    <Event Name="errorhandling.sc_Checkbyconnectionstatus.audiodevice_status_run.2" XML_Guid="{AF570E9C-C032-4898-BE43-46C59130AC69}" />
                    <Event Name="AVRouting_delayed.Check_system_audio_status" XML_Guid="{F618720E-9FE1-4E5C-BF56-E1775C92C281}" />
                    <Action Name="Prerequisities" XML_Guid="{BE93FC9A-9A44-4F99-9EAC-78A5FC9CB288}">
                        EventGhost.PythonScript(u'#scriptstart\nscriptname = "Check Audio - Check for Harmony Action active"\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\ndebug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\nif eg.globals.harm_act == "OFF":\n    print "Skipping check because of harmony action = OFF"\n    eg.StopMacro()\nelse:\n    print "Harmony Action active: Proceeding with tests"\n    eg.globals.checksystemaudio_ON_run = eg.globals.checksystemaudio_ON_run+1\n    def reset_checksystemaudio_ON_run():\n        import time\n        time.sleep(120.0)\n        eg.globals.checksystemaudio_ON_run = 0\n        print "eg.globals.checksystemaudio_ON_run reset to "+str(eg.globals.checksystemaudio_ON_run)+" - Logging to file..."\n        eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_ON_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_runs.txt\', 0, 0, True, False, False, \'cp1252\')\n    eg.scheduler.AddTask(0.0, reset_checksystemaudio_ON_run)')
                    </Action>
                    <Action Name="Check by connection status" XML_Guid="{C504C254-E48B-4028-BD28-690A96CEA6D0}">
                        EventGhost.PythonScript(u'scriptname = "Checkbyconnectionstatus"\neg.globals.scriptname = scriptname\ndebug = eg.globals.debug\ndebug = 1\n#eg.globals.checksystemaudio_ON_run = eg.globals.checksystemaudio_ON_run+1\nif eg.globals.amp_connected == 0:\n    eg.TriggerEvent ("PowerToggle", prefix="errorhandling.avr_power")\n    print "AVR not connected, trying to start AVR_Power - Skip further tests for the moment"\n    print "This was checksystemaudio_ON_run "+str(eg.globals.checksystemaudio_ON_run)+" in "+scriptname\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_ON_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_runs.txt\', 0, 0, True, False, False, \'cp1252\')\n    def recheckavraction():\n        import time\n        time.sleep(5)\n        if "AVR" in eg.globals.harm_act:\n            eg.TriggerEvent("AVRPowerON", prefix = "Checkbyconnectionstatus.recheckavraction")\n        else:\n            eg.TriggerEvent("AVRPowerOFF", prefix = "Checkbyconnectionstatus.recheckavraction")\n    eg.scheduler.AddTask(0.0, recheckavraction)\n    def audiodevice_status_rerun():\n        import time\n        scriptname = eg.globals.scriptname\n        print "checksystemaudio_ON_run "+str(eg.globals.checksystemaudio_ON_run)+" started - running next in 15s" \n        time.sleep(15)\n        eg.TriggerEvent ("audiodevice_status_run."+str(eg.globals.checksystemaudio_ON_run+1), prefix="errorhandling.sc_"+scriptname)\n    eg.scheduler.AddTask(0.0, audiodevice_status_rerun)\n    eg.StopMacro()\nelse:\n    print "AVR seems to be connected, going for further tests"\n    print "This was checksystemaudio_ON_run "+str(eg.globals.checksystemaudio_ON_run)+" in "+scriptname\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_ON_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_runs.txt\', 0, 0, True, False, False, \'cp1252\')')
                    </Action>
                    <Action XML_Guid="{BC12F71A-7A36-449A-ACEB-137DBE4037AE}">
                        EventGhost.PythonCommand(u'eg.globals.audiodevice_status = "broken"')
                    </Action>
                    <Action XML_Guid="{FC32CB0C-FB2F-4ACD-84B2-C3B7C66445A7}">
                        System.ChangeMasterVolumeBy(-1.0, u'Primary Sound Driver')
                    </Action>
                    <Action XML_Guid="{7E0C4A6C-3C57-454D-9F61-F118DDCB3597}">
                        System.ChangeMasterVolumeBy(1.0, u'Primary Sound Driver')
                    </Action>
                    <Action Name="Check by SystemAudioFunction" XML_Guid="{FB5E1638-AB62-4F68-A0C3-93418E5BA1CB}">
                        EventGhost.PythonScript(u'#script to check if audio device is present, if not send power toggle to avr_power, recheck after some time\nscriptname = "CheckSystemAudioStatus"\neg.globals.scriptname = scriptname\nimport time\n###eg.globals.checksystemaudio_ON_run = eg.globals.checksystemaudio_ON_run+1\ndef audiodevice_status():\n    import time\n    scriptname = eg.globals.scriptname\n    time.sleep(7)\n    if eg.globals.audiodevice_status == "broken":\n        print "System audio (still) not available - going for errorhandling"\n        eg.globals.checksystemaudio_ON_run = eg.globals.checksystemaudio_ON_run+1\n        def audiodevice_status_rerun():\n            import time\n            scriptname = eg.globals.scriptname\n            print "checksystemaudio_ON_run "+str(eg.globals.checksystemaudio_ON_run)+" started - running next in 15s" \n            time.sleep(15)\n            eg.TriggerEvent ("audiodevice_status_run."+str(eg.globals.checksystemaudio_ON_run+1), prefix="errorhandling.sc_"+scriptname)\n        if eg.globals.checksystemaudio_ON_run == 2:\n            print scriptname+"in Run "+str(eg.globals.checksystemaudio_ON_run)+" not succesful - going to restart eventghost"\n            eg.plugins.EventGhost.ShowOSD(u\'   {scriptname} ist im {eg.globals.checksystemaudio_ON_run}. Versuch fehlgeschlagen. Eventghost wird neu gestartet.   \', u\'0;-24;0;0;0;700;0;0;0;0;3;2;1;34;eg.globals.osd_font\', (255, 255, 255), None, 4, (0, 5), 0, 3.0, eg.globals.osd_skin)\n            print "This was checksystemaudio_ON_run: "+str(eg.globals.checksystemaudio_ON_run)\n            eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_ON_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_runs.txt\', 0, 0, True, False, False, \'cp1252\')\n            time.sleep(2)\n            eg.TriggerEvent ("restart_eg", prefix="errorhandling.sc_"+scriptname)\n            #eg.scheduler.AddTask(0.0, audiodevice_status_rerun)\n        elif eg.globals.checksystemaudio_ON_run &gt; 2:\n            print scriptname+"in Run "+str(eg.globals.checksystemaudio_ON_run)+" not succesful - Abort"\n            print "!!!!!!!!!!!!!!!!! Audio fucked !!!!!!!!!!!!!!!!!!!!!!!"\n            eg.globals.checksystemaudio_ON_run = 0\n            eg.plugins.EventGhost.ShowOSD(u\'   {scriptname} ist fehlgeschlagen. Fehler auf Audio. !! Fehler selbst beheben!!   \', u\'0;-24;0;0;0;700;0;0;0;0;3;2;1;34;eg.globals.osd_font\', (255, 255, 255), None, 4, (0, 5), 0, 30.0, eg.globals.osd_skin)\n            print "This was checksystemaudio_ON_run: "+str(eg.globals.checksystemaudio_ON_run)\n            eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_ON_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_runs.txt\', 0, 0, True, False, False, \'cp1252\')\n    else:\n        print "System audio seems to be fine"\n        eg.plugins.EventGhost.ShowOSD(u\'\', u\'0;-24;0;0;0;700;0;0;0;0;3;2;1;34;eg.globals.osd_font\', (255, 255, 255), None, 4, (0, 5), 0, 0.1, eg.globals.osd_skin)\neg.scheduler.AddTask(0.0, audiodevice_status)')
                    </Action>
                </Macro>
                <Macro Name="CheckSystemAudioStatus_ON" XML_Guid="{24A27DD2-B558-4084-ADBB-11DF229F20E6}">
                    <Event Name="AVRouting_delayed.Check_system_audio_status" XML_Guid="{F618720E-9FE1-4E5C-BF56-E1775C92C281}" />
                    <Event Name="errorhandling.sc_CheckAudioStatusON.audiodevice_status_run.*" XML_Guid="{E58B0FE9-B19E-416F-9685-785FF751897D}" />
                    <Event Name="errorhandling.audiocheck.check" XML_Guid="{2AA9D2D6-F957-40AA-9F5A-AAAE17F68E0F}" />
                    <Action Name="Prerequisities" XML_Guid="{BE93FC9A-9A44-4F99-9EAC-78A5FC9CB288}">
                        EventGhost.PythonScript(u'#scriptstart\nscriptname = "Check Audio - Check for Harmony Action active"\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\ndebug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\nif eg.globals.harm_act == "OFF":\n    print "Skipping check because of harmony action = OFF"\n    eg.StopMacro()\nelse:\n    print "Harmony Action active: Proceeding with tests"\n    eg.globals.checksystemaudio_ON_run = eg.globals.checksystemaudio_ON_run+1\n    print "This is checksystemaudio_ON_run "+str(eg.globals.checksystemaudio_ON_run)+" in "+scriptname\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_ON_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_runs.txt\', 0, 0, True, False, False, \'cp1252\')\n    def reset_checksystemaudio_ON_run():\n        import time\n        time.sleep(120.0)\n        eg.globals.checksystemaudio_ON_run = 0\n        print "eg.globals.checksystemaudio_ON_run reset to "+str(eg.globals.checksystemaudio_ON_run)+" - Logging to file..."\n        eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_ON_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_runs.txt\', 0, 0, True, False, False, \'cp1252\')\n    eg.scheduler.AddTask(0.0, reset_checksystemaudio_ON_run)')
                    </Action>
                    <Action XML_Guid="{D185697F-6CC4-466B-B15F-749E7C50D327}">
                        AudioEndpoint.GetDefaultDevice(0, 0)
                    </Action>
                    <Action Name="CheckAudioStatusON" XML_Guid="{B3115E5E-7734-4A2D-95FC-1075EAC60CB5}">
                        EventGhost.PythonScript(u'#scriptstart\nscriptname = "CheckAudioStatusON"\nimport time\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\ndef checksystemaudio():\n    scriptname = "CheckAudioStatusON"\n    debug = eg.globals.debug\n    debug = 1\n    if debug:\n        from datetime import datetime\n        print "Function start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n        #print eg.result\n        #print type(eg.result)\n        #print "eg.result[\'name\']: ", eg.result[\'name\']\n    eg.globals.audiodevice_status = eg.result\n    eg.globals.pause_avrPower_avr = 3\n    eg.globals.CheckAudioStatusON_rerundelay = 10\n    eg.globals.checksystemaudio_ON_run_max = 5\n    if (not eg.globals.audiodevice_status) or (not eg.globals.amp_connected):\n        eg.globals.audiodevice_status = "broken"\n        print "System audio is broken - going to start amp"\n        if eg.globals.checksystemaudio_ON_run == 1:\n            print "Starting AMP only..."\n            eg.TriggerEvent ("Power", prefix="errorhandling.avr", payload=scriptname)\n            time.sleep(1.5)\n            eg.TriggerEvent ("InputBD", prefix="errorhandling.avr", payload=scriptname)\n            time.sleep(5)\n            eg.TriggerEvent ("audiodevice_status_run."+str(eg.globals.checksystemaudio_ON_run+1), prefix="errorhandling.sc_"+scriptname, payload=scriptname)\n        elif eg.globals.checksystemaudio_ON_run &lt; eg.globals.checksystemaudio_ON_run_max:\n            print "Starting AVRPower and AVR "+str(eg.globals.pause_avrPower_avr)+" seconds later"\n            eg.TriggerEvent ("PowerToggle", prefix="errorhandling.avr_power", payload=scriptname)\n            time.sleep(eg.globals.pause_avrPower_avr)\n            eg.TriggerEvent ("Power", prefix="errorhandling.avr", payload=scriptname)\n            time.sleep(1.5)\n            eg.TriggerEvent ("InputBD", prefix="errorhandling.avr", payload=scriptname)        \n            time.sleep(eg.globals.CheckAudioStatusON_rerundelay)\n            eg.TriggerEvent ("audiodevice_status_run."+str(eg.globals.checksystemaudio_ON_run+1), prefix="errorhandling.sc_"+scriptname, payload=scriptname)\n        elif eg.globals.checksystemaudio_ON_run &gt;= eg.globals.checksystemaudio_ON_run_max:\n            print "ERROR: "+scriptname+" was not succesfull. Audio is fucked"\n            eg.plugins.EventGhost.ShowOSD(u\'   {scriptname} ist fehlgeschlagen. Fehler auf Audio. !! Fehler selbst beheben!!   \', eg.globals.osd_font_string,  (eg.globals.osd_font_color), None, 4, (0, 5), 0, 30.0, eg.globals.osd_skin)\n    else:\n        eg.globals.audiodevice_status = "fine"\n        print "System audio is fine!\\nThis was checksystemaudio_ON_run "+str(eg.globals.checksystemaudio_ON_run)+" in "+scriptname\n        eg.globals.checksystemaudio_ON_run = 0\n        eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_ON_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_runs.txt\', 0, 0, True, False, False, \'cp1252\')\n        eg.TriggerEvent("setkodiaudio", prefix = "errorhandling.audiocheck", payload=scriptname)\n        if "TX-SR607-14" in eg.result[\'name\']:\n            print "Amp is default audio device"\n        else:\n            print "... but Amp is NOT default audio device! Default right now is "+str(eg.result[\'name\'])\n            eg.plugins.EventGhost.ShowOSD(u\'   Achtung! Audio device check meldet nicht AMP als default. Aktuell: \'+str(eg.result[\'name\']), u\'0;-24;0;0;0;700;0;0;0;0;3;2;1;34;eg.globals.osd_font\', (255, 255, 255), None, 4, (0, 5), 0, 30.0, eg.globals.osd_skin)\n        if \'AVR\' in eg.globals.harm_act:\n            eg.TriggerEvent("setaudio_AVR", prefix = "errorhandling.audiocheck", payload=scriptname)\n    #debug\n    if debug:\n        from datetime import datetime\n        print "Function end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    #/debug\neg.scheduler.AddTask(0.0, checksystemaudio)\n#debug\nif debug:\n    from datetime import datetime\n    print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug')
                    </Action>
                </Macro>
                <Macro Name="CheckSystemAudioStatus_OFF" XML_Guid="{06BE9695-4473-4A45-B4E5-A2356EA04FD8}">
                    <Event Name="errorhandling.sc_CheckSystemAudioStatus_OFF.checksystemaudio_OFF_run.2" XML_Guid="{0F2AC5F2-F1ED-49BF-AC1C-2E10ABBF6CB1}" />
                    <Action Name="Prerequisities" XML_Guid="{BE93FC9A-9A44-4F99-9EAC-78A5FC9CB288}">
                        EventGhost.PythonScript(u'#scriptstart\nscriptname = "CheckAudioOFF - Check for Harmony Action NOT active"\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\ndebug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\nif not eg.globals.harm_act == "OFF":\n    print "Skipping check because of harmony action = OFF"\n    eg.StopMacro()\nelse:\n    print "Harmony Action not active: Proceeding with tests"\n    eg.globals.checksystemaudio_OFF_run = eg.globals.checksystemaudio_OFF_run+1\n    print "This is checksystemaudio_OFF_run "+str(eg.globals.checksystemaudio_OFF_run)+" in "+scriptname\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_OFF_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.checksystemaudio_OFF_run.txt\', 0, 0, True, False, False, \'cp1252\')\n    def reset_checksystemaudio_OFF_run():\n        import time\n        time.sleep(120.0)\n        eg.globals.checksystemaudio_OFF_run = 0\n        print "eg.globals.checksystemaudio_OFF_run reset to "+str(eg.globals.checksystemaudio_OFF_run)+" - Logging to file..."\n        eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_OFF_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.checksystemaudio_OFF_run.txt\', 0, 0, True, False, False, \'cp1252\')\n    eg.scheduler.AddTask(0.0, reset_checksystemaudio_OFF_run)')
                    </Action>
                    <Action XML_Guid="{D185697F-6CC4-466B-B15F-749E7C50D327}">
                        AudioEndpoint.GetDefaultDevice(0, 0)
                    </Action>
                    <Action Name="CheckAudioStatusON" XML_Guid="{B3115E5E-7734-4A2D-95FC-1075EAC60CB5}">
                        EventGhost.PythonScript(u'def checksystemaudio():\n    scriptname = "CheckAudioStatusOFF"\n    eg.globals.scriptname = scriptname\n    debug = eg.globals.debug\n    debug = 1\n    print eg.result\n    #print type(eg.result)\n    #print "eg.result[\'name\']: ", eg.result[\'name\']\n    eg.globals.audiodevice_status = eg.result\n    import time\n    eg.globals.pause_avrPower_avr = 2\n    eg.globals.CheckAudioStatusOFF_rerundelay = 10\n    eg.globals.checksystemaudio_OFF_run_max = 5\n    if eg.globals.audiodevice_status:\n        eg.globals.audiodevice_status = "fine"\n        print "System audio is running - going to shutdown amp"\n        if eg.globals.checksystemaudio_OFF_run &lt; eg.globals.checksystemaudio_OFF_run_max:\n            print "Stopping AVRPower and AVR "+str(eg.globals.pause_avrPower_avr)+" seconds later"\n            eg.TriggerEvent ("PowerOff", prefix="errorhandling.avr")\n            time.sleep(eg.globals.pause_avrPower_avr)\n            eg.TriggerEvent ("PowerToggle", prefix="errorhandling.avr_power")            \n            time.sleep(eg.globals.CheckAudioStatusOFF_rerundelay)\n            eg.TriggerEvent ("audiodevice_status_run."+str(eg.globals.checksystemaudio_OFF_run+1), prefix="errorhandling.sc_"+scriptname)\n        elif eg.globals.checksystemaudio_OFF_run &gt;= eg.globals.checksystemaudio_OFF_run_max:\n            print "ERROR: "+scriptname+" was not succesfull. Audio is fucked"\n            eg.plugins.EventGhost.ShowOSD(u\'   {scriptname} ist fehlgeschlagen. Fehler auf Audio. !! Fehler selbst beheben!!   \', u\'0;-24;0;0;0;700;0;0;0;0;3;2;1;34;eg.globals.osd_font\', (255, 255, 255), None, 4, (0, 5), 0, 30.0, eg.globals.osd_skin)\n    else:\n        eg.globals.audiodevice_status = "broken"\n        print "System audio is fine!\\nThis was checksystemaudio_OFF_run "+str(eg.globals.checksystemaudio_OFF_run)+" in "+scriptname\n        eg.globals.checksystemaudio_OFF_run = 0\n        eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_OFF_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.checksystemaudio_OFF_run.txt\', 0, 0, True, False, False, \'cp1252\')\neg.scheduler.AddTask(0.0, checksystemaudio)')
                    </Action>
                </Macro>
                <Macro Name="CheckSystemAudioStatus_OFF OLD" Enabled="False" XML_Guid="{D26BD586-F0B3-413D-BF41-600E8B631EFE}">
                    <Action Name="Prechecks / Check by connection status (run 1)" XML_Guid="{01DC51A8-91AD-459D-9200-171AADF2E71A}">
                        EventGhost.PythonScript(u'scriptname = "CheckAudioByConnectionstatus_off"\neg.globals.scriptname = scriptname\n#debug\n#eg.globals.harm_act = "OFF"\n#/debug\nif "HTPC" in eg.globals.harm_act:\n    print "harm_Act is "+str(eg.globals.harm_act)+", skipping check..."\n    eg.StopMacro()\n    eg.Exit()\nelse:\n    print "harm_Act is "+str(eg.globals.harm_act)+", checking..."\n    eg.globals.audiodevice_status = "broken"\n    if eg.globals.amp_connected:\n        eg.globals.checksystemaudio_OFF_run = eg.globals.checksystemaudio_OFF_run+1\n        eg.TriggerEvent ("PowerToggle", prefix="errorhandling.avr_power")\n        print "Amp seems to be connected, trying to switch off by AVR_Power - Delaying further tests"\n        def audiodevice_status_off():\n            import time\n            scriptname = eg.globals.scriptname\n            wait = 15\n            print "checksystemaudio_OFF_run "+str(eg.globals.checksystemaudio_OFF_run)+" started - running next in "+str(wait)+"s" \n            time.sleep(wait)\n            eg.TriggerEvent ("audiodevice_status_run."+str(eg.globals.checksystemaudio_OFF_run+1), prefix="errorhandling.sc_"+scriptname)\n        eg.scheduler.AddTask(0.0, audiodevice_status_off)\n        eg.StopMacro()\n    else:\n        print "AVR seems NOT to be connected, skipping run 1 and going for further tests"')
                    </Action>
                    <Action XML_Guid="{D8185375-1983-4501-93FB-F2A9473C322D}">
                        System.ChangeMasterVolumeBy(-1.0, u'Primary Sound Driver')
                    </Action>
                    <Action XML_Guid="{41B81EA5-95C1-45D0-95E4-3B3244B85354}">
                        System.ChangeMasterVolumeBy(1.0, u'Primary Sound Driver')
                    </Action>
                    <Action Name="Check by Volume Control (run x)" XML_Guid="{BBD3D9F9-9915-42D8-8057-6DC59FA24708}">
                        EventGhost.PythonScript(u'#script to check if audio device is present, if not send power toggle to avr_power, recheck after some time\nimport time\nfrom datetime import datetime\nscriptname = "CheckSystemAudioStatus_OFF"\neg.globals.scriptname = scriptname\nprint "Scriptstart: "+scriptname+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\nprint "eg.globals.checksystemaudio_OFF_run = "+str(eg.globals.checksystemaudio_OFF_run)\nif eg.globals.amp_connected:\n    print "eg.globals.amp_connected is still true - something is odd..."\ndef audiodevice_status_off():\n    import time\n    scriptname = eg.globals.scriptname\n    #time.sleep(4)\n    if not eg.globals.audiodevice_status == "broken":\n        print "System audio available - going for switch off AVR_power"\n        eg.globals.checksystemaudio_OFF_run = eg.globals.checksystemaudio_OFF_run+1\n        def audiodevice_status_rerun():\n            import time\n            scriptname = eg.globals.scriptname\n            print "checksystemaudio_OFF_run "+str(eg.globals.checksystemaudio_OFF_run)+" started - running next in 15s" \n            time.sleep(15)\n            eg.TriggerEvent ("checksystemaudio_OFF_run."+str(eg.globals.checksystemaudio_OFF_run+1), prefix="errorhandling.sc_"+scriptname)\n        if eg.globals.checksystemaudio_OFF_run &lt;= 2:\n            print "System Audio still present - Trying to switch of the "+str(eg.globals.checksystemaudio_OFF_run)+". time"\n            eg.TriggerEvent ("PowerToggle", prefix="errorhandling.avr_power")\n            eg.scheduler.AddTask(0.0, audiodevice_status_rerun)\n        elif eg.globals.checksystemaudio_OFF_run &gt; 2:\n            eg.plugins.EventGhost.ShowOSD(u\'   {scriptname} ist fehlgeschlagen. System Audio weiterhin an.   \', u\'0;-24;0;0;0;700;0;0;0;0;3;2;1;34;eg.globals.osd_font\', (255, 255, 255), None, 4, (0, 5), 0, 3.0, eg.globals.osd_skin)\n            print "Checks for audio off not succesful in "+str(eg.globals.checksystemaudio_OFF_run)+" runs - Please investigate"\n        print "This was checksystemaudio_OFF_run: "+str(eg.globals.checksystemaudio_OFF_run)\n        eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_OFF_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_off_runs.txt\', 0, 0, True, False, False, \'cp1252\')\n    else:\n        print "System audio seems to be off - Test passed"\n        eg.globals.checksystemaudio_OFF_run = 0\n        eg.plugins.FileOperations.Write(2, u\'{eg.globals.checksystemaudio_OFF_run}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart_sound_off_runs.txt\', 0, 0, True, False, False, \'cp1252\')\neg.scheduler.AddTask(0.0, audiodevice_status_off)\nprint "Scriptend: "+scriptname+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])')
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="SystemResume" XML_Guid="{9D233D91-8D0C-44F7-A586-8A8B3C4B3DA2}">
                <Macro Name="On System.ResumeAutomatic" XML_Guid="{82FEB88F-A298-4362-B6FB-7886C994905D}" Expanded="True">
                    <Event Name="System.ResumeAutomatic" XML_Guid="{DD056E2F-52CD-4299-95E4-0F7402A0F168}" />
                    <Event Name="System.Resume" XML_Guid="{32D9D07A-1C4A-4F95-8CB4-DC3DCABEA692}" />
                    <Action Name="Check for rerun" XML_Guid="{6D5BE273-5CEB-4091-B91B-6089AFF97924}">
                        EventGhost.PythonScript(u'if not eg.globals.systemresume_active:\n    print "Macro should not be run - skipping"\n    eg.StopMacro()\nelse:\n    print "Macro is not blocked - restarting mce"')
                    </Action>
                    <Action Enabled="False" XML_Guid="{7AF1D997-3A71-496D-A3AC-6254AA116214}">
                        EventGhost.FlushEvents()
                    </Action>
                    <Action XML_Guid="{F596D023-191A-413D-A8F8-D65B9158F925}">
                        EventGhost.PythonCommand("eg.plugins.SSH.AddHost(u'mmrp01', 22, u'MYUSERNAME', u'MYPASSW', u'mmrp01', u'Event', True)")
                    </Action>
                    <Action Enabled="False" XML_Guid="{5B9A397A-8892-4C7A-B8F9-BC518032570E}">
                        EventGhost.DisableItem(eg.GUID('{82FEB88F-A298-4362-B6FB-7886C994905D}'))
                    </Action>
                    <Action Enabled="False" XML_Guid="{C8F160FF-ED28-4991-9A58-87E88A024E6D}">
                        SchedulGhost.RunScheduleImmediately(u'WaitResumeAutomaticRestartEG', True)
                    </Action>
                    <Action XML_Guid="{C9A9811A-2F61-4AE7-B767-96A82201458D}">
                        EventGhost.NewJumpIf(eg.GUID('{F9C0950D-B809-4483-9E31-34408AFEBE73}'), 2, True)
                    </Action>
                    <Action XML_Guid="{2DB07EC9-FC0B-4AAA-B369-18B0886D03A6}">
                        EventGhost.NewJumpIf(eg.GUID('{44040479-B0CC-4AE8-89E1-E2E8110A9E54}'), 2, True)
                    </Action>
                    <Action XML_Guid="{A36796FD-9AC4-4D52-B479-F48BA6C42AE0}">
                        Mouse.MoveAbsolute(960, 1078, None, False, False)
                    </Action>
                    <Action XML_Guid="{BBFA57B7-4754-4650-BA7D-2E12298474CE}">
                        EventGhost.DisableItem(eg.GUID('{A434218E-D2D5-44A8-AD9B-6A50C8B7EDC9}'))
                    </Action>
                    <Action XML_Guid="{11F1A8CA-76AB-4CBF-B81B-0A7CD4B0AC49}">
                        EventGhost.EnableItem(eg.GUID('{ED7EEFC2-B9B6-40C5-AA3A-D109C65F33DD}'))
                    </Action>
                    <Action XML_Guid="{241D9FB3-350D-4E3E-921D-3903353E87A6}">
                        EventGhost.EnableItem(eg.GUID('{371C5200-2251-4C37-8A27-2869CAF438CF}'))
                    </Action>
                    <Action Name="Set vars after resume" XML_Guid="{8C845209-F8CE-4761-B6C7-729BAE9BD90A}">
                        EventGhost.PythonScript(u'eg.globals.first_play = 1\neg.globals.firststandbyafterresume = 1\neg.globals.standbytriggered = 0\neg.globals.cec_error = 0')
                    </Action>
                    <Action XML_Guid="{20441641-9F84-45F5-8005-EA0D6BBA278F}">
                        FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.htpcapp_last.txt', 0, 0, 'cp1252', 1, False, 1)
                    </Action>
                    <Action Name="Process htpcapp_last from file" XML_Guid="{58353F71-3D6F-42F6-B736-30D90F1DC9BA}">
                        EventGhost.PythonScript(u'#print type(eg.result)\n#print "eg.result = "+str(eg.result)\neg.globals.htpcapp_last = str(eg.result)\nprint eg.globals.htpcapp_last\n#print type(eg.globals.htpcapp_last)\nif not eg.globals.htpcapp_last == "kodi":\n    if not eg.globals.htpcapp_last == "mp":\n        print "Warning: Last htpcapp not logged propperly"\neg.globals.htpcapp = eg.globals.htpcapp_last\n#eg.TriggerEvent ("htpcapp_last."+eg.globals.htpcapp_last, prefix="logfile")')
                    </Action>
                    <Action Name="Delayed check for harmony action" XML_Guid="{F881FB56-2E5D-4AD4-B499-E11FF1555FAB}">
                        EventGhost.PythonScript(u'#scriptstart\n#trigger delayed check for harmony action\nscriptname = "SystemResume_Check_Harm_Act"\nimport time\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\neg.globals.checkdelay = 10\ndef checkharmactafterresume():\n    if debug:\n        from datetime import datetime\n        print "Function checkharmactafterresume start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n        #/debug\n    import time\n    if debug: print "will check harmony action in "+str(eg.globals.checkdelay)+" seconds"\n    time.sleep(eg.globals.checkdelay)\n    if eg.globals.harm_act == "OFF":\n        print "harmony action is not set - getting it from harmony hub"\n        eg.TriggerEvent("get_harm_act", prefix="sc_resume")\n    else:\n        print "harmony action seems to be set correctly - skipping check with harmony hub"\n    if debug:\n        from datetime import datetime\n        print "Function checkharmactafterresume ended: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n        #/debug\neg.scheduler.AddTask(0.0, checkharmactafterresume)\nif debug: print "Task checkharmactafterresume triggered"\nif debug:\n    from datetime import datetime\n    print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug')
                    </Action>
                    <Action Name="reenable macro loop" XML_Guid="{60423674-F577-4B6E-9A3A-1A3121CC742F}">
                        EventGhost.PythonScript(u'eg.globals.systemresume_active = 0\ndef systemresume_active():\n    import time\n    time.sleep(120)\n    print "reenable system resume"\n    eg.globals.systemresume_active = 1\neg.scheduler.AddTask(0.0, systemresume_active)\n')
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="StandbyControl" XML_Guid="{26DD9D28-3B16-4700-9E4E-8A841A50DE0B}">
                <Macro Name="Activate Standby Control" XML_Guid="{5E00741D-28FE-44AB-A692-559BCFC0DEC8}">
                    <Event Name="Process.Created.ffmpeg" XML_Guid="{9DDD1365-6DB7-4458-871D-31687973CE15}" />
                    <Action XML_Guid="{809FD08B-D7AD-4298-AA42-E10328403383}">
                        EventGhost.EnableItem(eg.GUID('{A8DD9848-E8D2-461D-BEDC-9035188CE921}'))
                    </Action>
                    <Action XML_Guid="{6F59BB37-4E16-4B07-9BCF-380E90B07941}">
                        EventGhost.EnableItem(eg.GUID('{CAD15444-BB3F-4794-B24B-8DB380AF852C}'))
                    </Action>
                </Macro>
                <Folder Name="Standby Control Active" XML_Guid="{CAD15444-BB3F-4794-B24B-8DB380AF852C}">
                    <Folder Name="Set Modes" XML_Guid="{29DEFDE0-88D5-41EF-9292-435D91107021}">
                        <Macro Name="SetMode_JustStarted" XML_Guid="{83E66E69-EAE7-4F27-AE5C-560640B8AD15}" Expanded="True">
                            <Action Name="Check for standbytriggered" XML_Guid="{2DE92399-D4B9-451A-B32B-BEFCD2A623CC}">
                                EventGhost.PythonScript(u'if eg.globals.standbytriggered == 0:\n    eg.result = 1\nelse:\n    eg.result = 0')
                            </Action>
                            <Action XML_Guid="{EBFAC3BD-EB39-4005-A217-63C55F5E2CBB}">
                                EventGhost.NewJumpIf(eg.GUID('{B429E6D7-D5AF-4578-92FD-2382744B68FC}'), 0, True)
                            </Action>
                            <Action Name="Standby Control: Enable Standby: playing" XML_Guid="{A7575188-1AE5-4A9D-A3E1-2A7AAC698817}">
                                StandbyControl.EnableStandbyByApplication(u'playing', True, 0, 900, 0, 900)
                            </Action>
                            <Action XML_Guid="{39184851-5380-4BB9-915D-1C9280D55A74}">
                                StandbyControl.EnableStandbyByApplication(u'kodi', True, 0, 60, 0, 600)
                            </Action>
                            <Action XML_Guid="{B31DD636-883B-4D2B-8F57-03CE1292599C}">
                                StandbyControl.EnableStandbyByApplication(u'sleep', True, 0, 60, 0, 600)
                            </Action>
                            <Action XML_Guid="{D8648FA4-4BD5-4A4B-887E-3DA409766811}">
                                StandbyControl.EnableStandbyByApplication(u'streaming', True, 0, 60, 0, 600)
                            </Action>
                            <Action XML_Guid="{9F9B7A44-9BE3-4B09-A476-200FD4E7F4E8}">
                                StandbyControl.InhibitStandbyByApplication(u'just_started', False, 0, 600, True, 20, True)
                            </Action>
                            <Action XML_Guid="{D6C91C60-AECE-4FE7-BA88-62438AAD3B33}">
                                StandbyControl.TriggerStandbyTimer(False, False, 1260)
                            </Action>
                            <Action XML_Guid="{014AF4D7-56A3-417B-812D-34E82BB021A9}">
                                System.SetSystemIdleTimer(False)
                            </Action>
                            <Action XML_Guid="{512C8660-81FA-46D2-958E-2B6C1FA28BDA}">
                                EventGhost.EnableItem(eg.GUID('{47E618C2-EDDC-4C5A-A70D-21B45A6BBA9F}'))
                            </Action>
                            <Action XML_Guid="{0D8BCA58-A7F3-4B2B-A19B-7DF90C560C32}">
                                EventGhost.DisableItem(eg.GUID('{320276F1-831E-4CD9-9C61-32EF45374CE4}'))
                            </Action>
                        </Macro>
                        <Folder Name="SC APP Modes" XML_Guid="{47E618C2-EDDC-4C5A-A70D-21B45A6BBA9F}" Expanded="True">
                            <Folder Name="MP" XML_Guid="{074FFE49-980E-405B-951D-C469A9BF0E36}">
                                <Macro Name="Set_Stopped" XML_Guid="{D62D3AC0-1697-450F-B83C-4A129857F63D}">
                                    <Action Name="Check for htpcapp=mp" XML_Guid="{C9918591-0592-41EA-936A-FF8D416A9CA6}">
                                        EventGhost.PythonScript(u'if not eg.globals.htpcapp == "mp":\n    eg.StopMacro()\n    print "htpcapp is not mp"\nelse:\n    pass')
                                    </Action>
                                    <Action XML_Guid="{1DDC5005-A67A-4A2B-BC31-8AC229126D01}">
                                        EventGhost.EnableExclusive(eg.GUID('{9A436ECD-2217-46E4-A817-2B03100505CF}'))
                                    </Action>
                                    <Action XML_Guid="{0263986E-4A95-4DAF-BDA0-FFC393E00F0D}">
                                        EventGhost.EnableExclusive(eg.GUID('{6C95DA09-59C4-425A-BCCF-9713DF21CE07}'))
                                    </Action>
                                    <Action Name="Check for not standbytriggered" XML_Guid="{12F90275-88F7-4074-9499-FEB383FC6D8D}">
                                        EventGhost.PythonScript(u'if eg.globals.standbytriggered == 0:\n    eg.result = 1\nelse:\n    eg.result = 0')
                                    </Action>
                                    <Action XML_Guid="{8E47E1CD-6068-46C4-B5E2-CE5A9D4AF31F}">
                                        EventGhost.NewJumpIf(eg.GUID('{B429E6D7-D5AF-4578-92FD-2382744B68FC}'), 0, True)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: playing" XML_Guid="{B01915E6-C057-4A89-80C7-EC7B5CA98776}">
                                        StandbyControl.EnableStandbyByApplication(u'playing', True, 0, 900, 0, 900)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: tv_pause" XML_Guid="{173B5DFA-FCCF-4631-B851-AE2D92FAB351}">
                                        StandbyControl.EnableStandbyByApplication(u'tv_pause', True, 0, 900, 0, 900)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: pause" XML_Guid="{F17B67BE-D2C9-403C-8FAF-C9A13E012E8B}">
                                        StandbyControl.EnableStandbyByApplication(u'pause', True, 0, 900, 0, 900)
                                    </Action>
                                </Macro>
                                <Macro Name="SetMode_Menu" XML_Guid="{6CB6E729-356B-4BEA-B87E-2D53ABE37148}">
                                    <Event Name="Main.sc.trigger_mode_menu" XML_Guid="{B8A91445-6141-4C57-A9C8-F23621C5C676}" />
                                    <Action Name="Check for htpcapp=mp" XML_Guid="{8EF72083-930C-4095-ABE3-EFAE2A9E7296}">
                                        EventGhost.PythonScript(u'if not eg.globals.htpcapp == "mp":\n    eg.StopMacro()\n    print "htpcapp is not mp"\nelse:\n    print "mp running"\n    pass')
                                    </Action>
                                    <Action XML_Guid="{7DEE3525-BE3C-420A-9D29-C18597683ABC}">
                                        EventGhost.EnableExclusive(eg.GUID('{9A436ECD-2217-46E4-A817-2B03100505CF}'))
                                    </Action>
                                    <Action XML_Guid="{FE513DC8-1608-48FA-9503-51E9B1AA0720}">
                                        EventGhost.EnableExclusive(eg.GUID('{6C95DA09-59C4-425A-BCCF-9713DF21CE07}'))
                                    </Action>
                                    <Action Name="Check for not standbytriggered" XML_Guid="{B841FE1C-47D3-4097-9AE8-A027F2FCCB0A}">
                                        EventGhost.PythonScript(u'if eg.globals.standbytriggered == 0:\n    eg.result = 1\nelse:\n    eg.result = 0')
                                    </Action>
                                    <Action XML_Guid="{860C362A-1F17-4E83-A0D7-13291C11B0CB}">
                                        EventGhost.NewJumpIf(eg.GUID('{B429E6D7-D5AF-4578-92FD-2382744B68FC}'), 0, True)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: kodi" XML_Guid="{BC7E3438-559F-4676-8B4E-A7FC2F10A784}">
                                        StandbyControl.EnableStandbyByApplication(u'kodi', True, 0, 900, 0, 900)
                                    </Action>
                                    <Action XML_Guid="{3E2A3048-BB48-438B-A501-926B8EEDB055}">
                                        StandbyControl.EnableStandbyByApplication(u'streaming', True, 0, 60, 0, 600)
                                    </Action>
                                    <Action XML_Guid="{5F16A0CE-2216-4080-BC85-DAACE1E40C2F}">
                                        StandbyControl.TriggerStandbyTimer(False, True, 540)
                                    </Action>
                                    <Action XML_Guid="{FDB772CD-7360-4DC7-84E2-D92FCEFBB974}">
                                        System.SetSystemIdleTimer(False)
                                    </Action>
                                </Macro>
                                <Macro Name="Set_Mode_Playing" XML_Guid="{4EA674BA-95FF-4C42-8781-7C6E861A0245}">
                                    <Action Name="Check for htpcapp=mp" XML_Guid="{8350A778-AE98-4800-9262-8BF5542A2437}">
                                        EventGhost.PythonScript(u'if not eg.globals.htpcapp == "mp":\n    eg.StopMacro()\n    print "htpcapp is not mp"\nelse:\n    pass')
                                    </Action>
                                    <Action XML_Guid="{5BE3135B-47CE-4276-9D2C-4A40529E0653}">
                                        EventGhost.EnableExclusive(eg.GUID('{9A436ECD-2217-46E4-A817-2B03100505CF}'))
                                    </Action>
                                    <Action XML_Guid="{CB40E7D2-C6A8-434A-8A1B-737625725089}">
                                        EventGhost.EnableExclusive(eg.GUID('{6C95DA09-59C4-425A-BCCF-9713DF21CE07}'))
                                    </Action>
                                    <Action Name="Check for standbytriggered=False" XML_Guid="{33384AEF-68DF-4D55-9C48-B2A78AB758AF}">
                                        EventGhost.PythonScript(u'if eg.globals.standbytriggered == 0:\n    eg.result = 1\nelse:\n    eg.result = 0')
                                    </Action>
                                    <Action XML_Guid="{44038EEE-81A0-47CC-884F-BC64B1102557}">
                                        EventGhost.NewJumpIf(eg.GUID('{B429E6D7-D5AF-4578-92FD-2382744B68FC}'), 0, True)
                                    </Action>
                                    <Action XML_Guid="{4E39623E-6AEE-474B-B0A2-F1222EA32007}">
                                        StandbyControl.InhibitStandbyByApplication(u'playing', False, 0, 1800, False, 180, False)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: pause" XML_Guid="{08DB9594-AB0D-4443-9E59-4D5F05EC1E3E}">
                                        StandbyControl.EnableStandbyByApplication(u'pause', True, 0, 900, 0, 900)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: tv_pause" XML_Guid="{A3066C7E-F27E-4406-B8A4-016DD78A5815}">
                                        StandbyControl.EnableStandbyByApplication(u'tv_pause', True, 0, 900, 0, 900)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: just started" XML_Guid="{E72C6C23-41BD-4568-B452-3A7A2F9A16C9}">
                                        StandbyControl.EnableStandbyByApplication(u'just_started', True, 0, 900, 0, 900)
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{171059F2-CB47-4ABC-96D9-00E7E082078B}">
                                        System.SetSystemIdleTimer(False)
                                    </Action>
                                </Macro>
                                <Macro Name="Set_Mode_Paused" XML_Guid="{F7350AC8-D8B6-45A8-A1B5-64EF52245877}">
                                    <Event Name="Main.sc.trigger_mode_paused" XML_Guid="{F361A7AF-9AFC-423A-ADF7-5D6BFB17A6AE}" />
                                    <Action Name="Check for htpcapp=mp" XML_Guid="{808C2EA9-D9B5-40A4-8421-8398325F4D53}">
                                        EventGhost.PythonScript(u'if not eg.globals.htpcapp == "mp":\n    eg.StopMacro()\n    print "htpcapp is not mp"\nelse:\n    pass')
                                    </Action>
                                    <Action XML_Guid="{82D59B12-1DCE-4D82-9059-6ED18578A284}">
                                        EventGhost.EnableExclusive(eg.GUID('{6C95DA09-59C4-425A-BCCF-9713DF21CE07}'))
                                    </Action>
                                    <Action Name="Check for standbytriggered" XML_Guid="{0A3CF363-3EE5-4BA0-B49F-3885705ED9E9}">
                                        EventGhost.PythonScript(u'if eg.globals.standbytriggered == 0:\n    eg.result = 1\nelse:\n    eg.result = 0')
                                    </Action>
                                    <Action XML_Guid="{C9967A2A-2042-42AB-8BC1-D96793B2BC2B}">
                                        EventGhost.NewJumpIf(eg.GUID('{B429E6D7-D5AF-4578-92FD-2382744B68FC}'), 0, True)
                                    </Action>
                                    <Action XML_Guid="{04601DF0-6305-4831-BB4A-932C074C826A}">
                                        StandbyControl.InhibitStandbyByApplication(u'pause', False, 0, 60, True, 30, False)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: playing" XML_Guid="{6A743534-8583-40CD-B9BB-5BD2C9E4E26B}">
                                        StandbyControl.EnableStandbyByApplication(u'playing', True, 0, 900, 0, 900)
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{6B7AA599-553B-41C8-89EB-D06A58FFF8CD}">
                                        System.SetSystemIdleTimer(False)
                                    </Action>
                                </Macro>
                                <Macro Name="Set_Mode_TVPaused" XML_Guid="{B1BCEC05-4D2B-4619-BF8A-4903541E0B47}">
                                    <Action Name="Check for htpcapp=mp" XML_Guid="{08117649-62C5-4CF4-A35B-19E3695C4696}">
                                        EventGhost.PythonScript(u'if not eg.globals.htpcapp == "mp":\n    eg.StopMacro()\n    print "htpcapp is not mp"\nelse:\n    pass')
                                    </Action>
                                    <Action XML_Guid="{54D3EC8B-6119-45D1-BDB2-21AD662F8D16}">
                                        EventGhost.EnableExclusive(eg.GUID('{9A436ECD-2217-46E4-A817-2B03100505CF}'))
                                    </Action>
                                    <Action Name="Check for standbytriggered" XML_Guid="{88385D17-51C7-466A-A779-DAA06EFD39EB}">
                                        EventGhost.PythonScript(u'if eg.globals.standbytriggered == 0:\n    eg.result = 1\nelse:\n    eg.result = 0')
                                    </Action>
                                    <Action XML_Guid="{907324AD-713C-4E24-87A6-510C37B10F99}">
                                        EventGhost.NewJumpIf(eg.GUID('{B429E6D7-D5AF-4578-92FD-2382744B68FC}'), 0, True)
                                    </Action>
                                    <Action XML_Guid="{77BB2083-375E-483A-9AE5-1AFADD8D0EE8}">
                                        StandbyControl.InhibitStandbyByApplication(u'tv_pause', False, 0, 60, True, 60, False)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: playing" XML_Guid="{19060F8F-6B7D-4023-B9B5-48B373F4A870}">
                                        StandbyControl.EnableStandbyByApplication(u'playing', True, 0, 900, 0, 900)
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{12149A4C-DDB1-4E6C-B5C0-1667808D0238}">
                                        System.SetSystemIdleTimer(False)
                                    </Action>
                                </Macro>
                                <Macro Name="SetMode_mp_off" XML_Guid="{204FE67C-1E2D-406E-96DE-B539CAFBD8F8}">
                                    <Action Name="Standby Control: Enable Standby: playing" XML_Guid="{C559A417-0BDA-46DA-91D2-3F0B8B8330F6}">
                                        StandbyControl.EnableStandbyByApplication(u'playing', True, 0, 900, 0, 900)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: tv_paused" XML_Guid="{0BE6BB8B-98EC-434F-85BD-8C36B42605B7}">
                                        StandbyControl.EnableStandbyByApplication(u'tv_pause', True, 0, 900, 0, 900)
                                    </Action>
                                    <Action Name="Standby Control: Enable Standby: pause" XML_Guid="{808E722D-6330-4BC5-AC75-8654822DC568}">
                                        StandbyControl.EnableStandbyByApplication(u'pause', True, 0, 900, 0, 900)
                                    </Action>
                                </Macro>
                            </Folder>
                            <Folder Name="kodi" XML_Guid="{39389F08-F228-4DAB-8311-F111E3254845}" Expanded="True">
                                <Macro Name="SC SetMode_kodi" XML_Guid="{30F3F7CB-E7B4-4191-9742-8CC54A55E2FC}" Expanded="True">
                                    <Event Name="Task.Activated.Kodi" XML_Guid="{F48AF43A-E91E-4E64-955B-7608BAF9318C}" />
                                    <Event Name="Main.sc.trigger_mode_kodi" XML_Guid="{D7ACE34F-7377-46F7-AFB5-F05083335B3E}" />
                                    <Event Name="XBMC2.Player.OnPlay.*" XML_Guid="{4F0B3B4E-514A-4832-BB84-0012E2D616F5}" />
                                    <Event Name="XBMC2.Player.OnPause.*" XML_Guid="{863B9A1F-76F2-41E9-84B8-CDFADCF95880}" />
                                    <Event Name="XBMC2.Player.OnStop.*" XML_Guid="{92F548A8-9022-41B0-B8C2-DC0F30B830DE}" />
                                    <Action Name="check if htpc==kodi" XML_Guid="{1EDEC330-CF0D-444F-A2CE-9F041ED905B8}">
                                        EventGhost.PythonScript(u'if not "kodi" in eg.globals.htpcapp:\n    eg.StopMacro()\n    print "htpcapp not kodi"\nelse:\n    pass')
                                    </Action>
                                    <Action XML_Guid="{63BC75FE-04EC-4FB7-86AF-330BA4D1789D}">
                                        EventGhost.EnableExclusive(eg.GUID('{CAE46870-16F6-42A8-B392-C37D9DE3684F}'))
                                    </Action>
                                    <Action Name="Check for not standbytriggered" XML_Guid="{048F108D-853F-494B-ADB8-5A9B0DAA5041}">
                                        EventGhost.PythonScript(u'if eg.globals.standbytriggered == 0:\n    eg.result = 1\nelse:\n    eg.result = 0')
                                    </Action>
                                    <Action XML_Guid="{1F89E5ED-722F-462B-BD7F-4FD787BD2C27}">
                                        EventGhost.NewJumpIf(eg.GUID('{B429E6D7-D5AF-4578-92FD-2382744B68FC}'), 0, True)
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{2CF28F23-8E1B-4437-A7AC-2F3F70B42874}">
                                        StandbyControl.EnableStandbyByApplication(u'just_started', True, 0, 60, 0, 600)
                                    </Action>
                                    <Action XML_Guid="{21222373-127D-4786-8A3F-1036C6CA0C13}">
                                        StandbyControl.InhibitStandbyByApplication(u'kodi', False, 0, 900, True, 150, False)
                                    </Action>
                                    <Action XML_Guid="{F73FE04E-85F9-4E09-8590-F3180B902EA4}">
                                        System.SetSystemIdleTimer(False)
                                    </Action>
                                </Macro>
                                <Macro Name="Standby Control: Inhibit Standby: playing" XML_Guid="{D1C48C3D-B5C0-4CCC-B8C1-F94A47745835}">
                                    <Event Name="XBMC2.Player.OnPlay.*" XML_Guid="{F691A244-492F-4F4C-AB3E-70074E87BFB9}" />
                                    <Action XML_Guid="{15D9EED9-A582-4210-99A5-3BF11A43BDBC}">
                                        StandbyControl.InhibitStandbyByApplication(u'playing', False, 0, 600, False, 0, True)
                                    </Action>
                                </Macro>
                                <Macro Name="Standby Control: Enable Standby: playing" XML_Guid="{83F2E869-1BA0-4493-A3B3-3E00AAA428AF}">
                                    <Event Name="XBMC2.Player.OnStop.*" XML_Guid="{F099F707-8B93-43F5-80D0-E311F5328BC9}" />
                                    <Event Name="XBMC2.Player.OnPause.*" XML_Guid="{AB622BD9-725F-4C61-A34D-E088D13FF722}" />
                                    <Action XML_Guid="{6B6ABCA6-C493-493D-946D-A877FF4F53C3}">
                                        StandbyControl.EnableStandbyByApplication(u'playing', True, 0, 60, 0, 600)
                                    </Action>
                                    <Action XML_Guid="{91382F8D-E338-4CCE-ADBF-C1A5E14F95AD}">
                                        StandbyControl.TriggerStandbyTimer(False, True, 600)
                                    </Action>
                                </Macro>
                            </Folder>
                        </Folder>
                        <Macro Name="SetMode_Sleep" XML_Guid="{5AC2DECD-23E0-473E-AB82-3502A4FBD225}">
                            <Action XML_Guid="{5C22F425-2A56-4E08-A375-DA59FCD38073}">
                                StandbyControl.CancelOSDCountDown()
                            </Action>
                            <Action Name="Standby Control: Enable Standby: playing" XML_Guid="{3311CC07-31A2-497C-AEFD-DE9C218F788F}">
                                StandbyControl.EnableStandbyByApplication(u'playing', True, 0, 900, 0, 900)
                            </Action>
                            <Action Name="Standby Control: Enable Standby: steaming" XML_Guid="{4E1636E4-0F79-4C60-9579-94DF6AD134BA}">
                                StandbyControl.EnableStandbyByApplication(u'streaming', True, 0, 900, 0, 900)
                            </Action>
                            <Action Name="Standby Control: Enable Standby: just started" XML_Guid="{08C90BBD-658E-4034-8CEE-EF0FC6E8CEF3}">
                                StandbyControl.EnableStandbyByApplication(u'just_started', True, 0, 900, 0, 900)
                            </Action>
                            <Action XML_Guid="{EDFDA78F-C35F-4001-B487-46F77BAA1D17}">
                                StandbyControl.EnableStandbyByApplication(u'kodi', True, 0, 60, 0, 600)
                            </Action>
                            <Action Name="Standby Control: Enable Standby: tv_paused" XML_Guid="{B7F1719F-99EE-46F4-897A-473DB8CCCF52}">
                                StandbyControl.EnableStandbyByApplication(u'tv_pause', True, 0, 900, 0, 900)
                            </Action>
                            <Action Name="Standby Control: Enable Standby: pause" XML_Guid="{A6BA5199-3D28-445A-93EC-9F4520004683}">
                                StandbyControl.EnableStandbyByApplication(u'pause', True, 0, 900, 0, 900)
                            </Action>
                            <Action XML_Guid="{013C1696-BE8F-44DE-81C1-FEC723D66D22}">
                                StandbyControl.InhibitStandbyByApplication(u'sleep', False, 0, 600, False, 20, True)
                            </Action>
                            <Action XML_Guid="{BD4C0130-04EE-4092-A44C-C562099C37DE}">
                                SchedulGhost.AbortEggTimer(u'WaitKodiSS')
                            </Action>
                            <Action Name="Enable system idle timer" XML_Guid="{206BB2B3-3B11-4D1D-A8B9-CF9BF962E7EE}">
                                EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.ffmpeg_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="ffmpeg.exe"\') ) &gt; 0\nif not eg.globals.ffmpeg_running:\n    eg.plugins.System.SetSystemIdleTimer(True)\n    print "ffmeg not running - enabling system standby timer"')
                            </Action>
                            <Action XML_Guid="{76A8E1C6-8368-41D5-AF25-044A45E4A357}">
                                EventGhost.DisableItem(eg.GUID('{47E618C2-EDDC-4C5A-A70D-21B45A6BBA9F}'))
                            </Action>
                        </Macro>
                        <Folder Name="set parallel; mode streaming" XML_Guid="{58A0DE62-CB6F-42EC-9461-21FC5AD2403E}">
                            <Macro Name="Start streaming" XML_Guid="{496C2D03-1FF0-4761-A46F-68DDB1C108B2}" Expanded="True">
                                <Event Name="Process.Created.ffmpeg" Enabled="False" XML_Guid="{592C79E8-F2D0-49B0-8295-20F78904FD11}" />
                                <Action XML_Guid="{B8E09A92-DA7B-4804-871B-4C39589E5C66}">
                                    StandbyControl.InhibitStandbyByApplication(u'streaming', False, 0, 180, True, 90, False)
                                </Action>
                                <Action Name="Command: Lightsout: Server aktiv halten" XML_Guid="{B4BDDCD4-107B-412C-A93C-22082B2BA9B5}">
                                    System.Execute(u'D:\\Programmdaten\\Lightsout\\Scripts\\enable_keep_alive.bat', u'', 3, False, 3, u'', True, False, u'', False, False, False, False)
                                </Action>
                                <Action XML_Guid="{777E7C61-5E5F-4FE1-80BE-5E11060D5D50}">
                                    System.SetSystemIdleTimer(False)
                                </Action>
                            </Macro>
                            <Macro Name="Stop streaming" Enabled="False" XML_Guid="{320276F1-831E-4CD9-9C61-32EF45374CE4}" Expanded="True">
                                <Event Name="Process.Destroyed.ffmpeg" Enabled="False" XML_Guid="{E01E84EF-A992-4819-A988-F1182FD49DB6}" />
                                <Action XML_Guid="{4528C300-F841-4828-8683-690F802DE8DA}">
                                    StandbyControl.EnableStandbyByApplication(u'streaming', True, 1, 60, 0, 600)
                                </Action>
                                <Action Name="Command: Lightsout: Server nicht mehr aktiv halten" XML_Guid="{E28CDE71-4C0B-4F07-B68A-B2BE21BDD5AF}">
                                    System.Execute(u'D:\\Programmdaten\\Lightsout\\Scripts\\disable_keep_alive.bat', u'', 3, False, 3, u'', True, False, u'', False, False, False, False)
                                </Action>
                                <Action XML_Guid="{1B138FC5-0214-4C62-B000-596BE1B970E4}">
                                    System.SetSystemIdleTimer(True)
                                </Action>
                            </Macro>
                        </Folder>
                        <Macro Name="Aktiviere exklusiv: OSD Count Down" XML_Guid="{B429E6D7-D5AF-4578-92FD-2382744B68FC}">
                            <Action XML_Guid="{7785A6E7-5228-4A50-A812-EF91E6B7D6A8}">
                                EventGhost.EnableExclusive(eg.GUID('{AF865C51-9B88-42F4-A3A9-720C42DE7FBC}'))
                            </Action>
                            <Action Name="wird wegen prüfung auf eg.globals.standbytriggered angesprungen" XML_Guid="{7D159C1E-40A5-4D6F-A2EB-DED707CEAFED}">
                                EventGhost.Comment()
                            </Action>
                        </Macro>
                    </Folder>
                    <Folder Name="Modes" XML_Guid="{B5F1874E-0586-4B8C-8835-AF9FE88ED1AE}">
                        <Folder Name="Standby mode MP" Enabled="False" XML_Guid="{9A436ECD-2217-46E4-A817-2B03100505CF}" Expanded="True">
                            <Folder Name="Menu" XML_Guid="{6C95DA09-59C4-425A-BCCF-9713DF21CE07}">
                                <Macro Name="mp_reset timer" XML_Guid="{A213BC48-0F92-4F74-BEEC-519090910829}" Expanded="True">
                                    <Event Name="Mediaportal.Window.Menu" XML_Guid="{1DA5040B-A477-402A-8BF9-32A86E543A42}" />
                                    <Action XML_Guid="{CAB5E5E8-8419-4BFD-B104-4342A3188E62}">
                                        StandbyControl.TriggerStandbyTimer(False, True, 540)
                                    </Action>
                                </Macro>
                            </Folder>
                        </Folder>
                        <Folder Name="Standby mode kodi" XML_Guid="{CAE46870-16F6-42A8-B392-C37D9DE3684F}">
                            <Macro Name="Screensaver activated" XML_Guid="{C35F3D90-9322-45F6-9DBC-D19E9BDCF97F}" Expanded="True">
                                <Event Name="XBMC2.GUI.OnScreensaverActivated" XML_Guid="{6AA47885-116A-465B-8C4B-31366FB08992}" />
                                <Action Name="Check for harm_Act" XML_Guid="{D6ABEB54-C9E6-4179-A9F6-E5168F52F94F}">
                                    EventGhost.PythonScript(u'if eg.globals.harm_act == "OFF":\n    eg.StopMacro\n    eg.Exit()\nelse:\n    pass')
                                </Action>
                                <Action Enabled="False" XML_Guid="{6A0F7E64-44A0-40F3-A5EE-A16528214CDC}">
                                    SchedulGhost.StartEggTimer((u'00:12:00', u'SchedulGhost', u'WaitKodiSS', u'', u'', (191, 191, 255), (64, 0, 128), u'0;-56;0;0;0;400;0;0;0;0;0;0;0;0;MS Shell Dlg 2', (10, 10), u'WaitKodiSS'))
                                </Action>
                                <Action Enabled="False" XML_Guid="{B8E11D38-8562-4DA8-AD5A-BB87A3706EEB}">
                                    SchedulGhost.ShowRunningEggTimers()
                                </Action>
                                <Action XML_Guid="{28D515C5-7F8D-41C1-A815-C61B1FBDD433}">
                                    StandbyControl.EnableStandbyByApplication(u'kodi', True, 0, 60, 0, 600)
                                </Action>
                                <Action XML_Guid="{20C2F92C-98E1-4369-BBB5-D17F4339BE0A}">
                                    StandbyControl.TriggerStandbyTimer(False, False, 1200)
                                </Action>
                            </Macro>
                            <Macro Name="Screensaver deactivated" XML_Guid="{7258A10B-F393-4219-8BD6-B82B399D442A}">
                                <Event Name="XBMC2.GUI.OnScreensaverDeactivated" XML_Guid="{F7EC319F-87F7-407F-A791-494F0CCEA5B5}" />
                                <Action Name="Check for Harmony action" XML_Guid="{C581EC3F-044E-4DF4-BD74-89290C359FDB}">
                                    EventGhost.PythonScript(u'if "OFF" in eg.globals.harm_act:\n    eg.StopMacro()\n    print "No Harmony action active - skipping macro"')
                                </Action>
                                <Action XML_Guid="{076E84F6-38F3-4690-800D-DFF787058152}">
                                    SchedulGhost.AbortEggTimer(u'WaitKodiSS')
                                </Action>
                                <Action XML_Guid="{B348F4A7-F990-4B02-87F9-C75A5EF60CD4}">
                                    StandbyControl.InhibitStandbyByApplication(u'kodi', False, 0, 600, False, 0, True)
                                </Action>
                                <Action XML_Guid="{39277644-F1DF-495D-B70D-822FF2B4DA51}">
                                    System.SetSystemIdleTimer(False)
                                </Action>
                            </Macro>
                        </Folder>
                    </Folder>
                    <Folder Name="Standby Control Countdown" XML_Guid="{5804177A-73EF-4C1C-AAA9-704E75047510}" Expanded="True">
                        <Macro Name="OSD Count Down" XML_Guid="{AF865C51-9B88-42F4-A3A9-720C42DE7FBC}" Expanded="True">
                            <Event Name="StandbyControl.Trigger" XML_Guid="{519A9302-E494-4892-8BEF-BF05CCE29C39}" />
                            <Event Name="SchedulGhost.WaitKodiSS" XML_Guid="{099BAE88-1D1E-426D-992A-9EC1B4AB0C29}" />
                            <Action XML_Guid="{B04976E5-1683-484E-AC2E-F4A2ECF75E76}">
                                SchedulGhost.AbortEggTimer(u'WaitKodiSS')
                            </Action>
                            <Action XML_Guid="{7A78F206-E881-4974-BD38-444B1E0AF360}">
                                EGAppControl.SaveConfiguration()
                            </Action>
                            <Action XML_Guid="{E0D3A3A4-87E8-46CC-8A1F-8C6A6560C921}">
                                EventGhost.EnableExclusive(eg.GUID('{3D7BDC59-646A-46A0-B01C-1A29D6348055}'))
                            </Action>
                            <Action XML_Guid="{4A791064-1BA1-412D-8675-DE67CFEED56E}">
                                StandbyControl.EnableStandbyByApplication(u'kodi', True, 0, 60, 0, 600)
                            </Action>
                            <Action XML_Guid="{CD770014-B565-45A3-A990-9E98C7C6D85D}">
                                EventGhost.DisableItem(eg.GUID('{ED7EEFC2-B9B6-40C5-AA3A-D109C65F33DD}'))
                            </Action>
                            <Action Enabled="False" XML_Guid="{D1EEAB66-2543-415F-9621-BFFB4709D168}">
                                StandbyControl.CountDownOSD(u'    Ausschalten in %c%s \n       OK f\xfcr sofort\n     Exit f\xfcr Abbruch     ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 4, (0, 0), 0, False, 1.0, 90.0, 1.0, 1.0, u'OSDCountDownFinished', False, u'')
                            </Action>
                            <Action Name="OSD Count Down Script" XML_Guid="{992E07A6-9483-4E04-9CAC-E0F4F979CDEE}">
                                EventGhost.PythonScript(u'#scriptstart\nscriptname = "OSD Count Down Script"\nimport time\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\ndebug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\nif (eg.globals.htpcapp == "OFF") or (eg.globals.harm_act=="OFF"):\n    eg.plugins.System.SetSystemIdleTimer(True)\n    print "eg.globals.htpcapp or eg.globals.harm_act == OFF detected, not going for standby"\n    eg.StopMacro()\n    #eg.Exit()\nelif eg.globals.standbytriggered:\n    print "Standby already triggered, not going for standby again"\n    eg.StopMacro()\n#elif eg.globals.firststandbyafterresume or eg.globals.playing:\nelif eg.globals.playing:\n    eg.globals.firststandbyafterresume = 0\n    eg.globals.failsaverestart = 1\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.firststandbyafterresume}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.firststandbyafterresume.txt\', 0, 0, True, False, False, \'cp1252\')\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.failsaverestart}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart.txt\', 0, 0, True, False, False, \'cp1252\')\n    eg.plugins.EGAppControl.SaveConfiguration()\n    eg.plugins.EGAppControl.RestartProgram()\n    eg.StopMacro()\nelse:\n    print "No fails detected, going for standby"\n    eg.plugins.System.DisplayImage(eg.globals.def_bg, 3, 1, False, False, 0, True, 0, 150, 0, 0, 0, 1920, 1080, (0, 0, 0), False, True, False, u\'off\')\n    if "AVR" in eg.globals.harm_act:\n        eg.globals.systemvolume_keep = 100.00\n    else:\n        eg.globals.systemvolume_keep = eg.globals.systemvolumelevel\n    eg.globals.standbytriggered = 1\n    eg.globals.failsaverestart = 0\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.failsaverestart}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart.txt\', 0, 0, True, False, False, \'cp1252\')\n    if not eg.globals.headset_active:\n        eg.plugins.System.SetMasterVolume(30.0, u\'Primary Sound Driver\')\n        time.sleep(0.5)\n        eg.plugins.System.PlaySound(u\'D:\\\\Programmdaten\\\\Eventghost\\\\sounds\\\\halfsec.mp3\', 0, False)\n        time.sleep(0.5)\n        eg.plugins.System.PlaySound(u\'C:\\\\Windows\\\\Media\\\\Alarm07.wav\', 1, False)\n    eg.plugins.NetworkSender.Map(u\'mmhtpc.{eg.eventString} [{eg.event.payload}]\')\n    eg.plugins.StandbyControl.CountDownOSD(u\'    Ausschalten in %c%s \\n       OK f\\xfcr sofort\\n     Exit f\\xfcr Abbruch     \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, 4, (0, 0), 0, False, 1.0, eg.globals.standby_osd_delay, 1.0, 1.0, u\'OSDCountDownFinished\', False, u\'\')\n#debug\nif debug:\n    from datetime import datetime\n    print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug')
                            </Action>
                        </Macro>
                        <Macro Name="Cancel OSD Count Down" Enabled="False" XML_Guid="{3D7BDC59-646A-46A0-B01C-1A29D6348055}">
                            <Event Name="MceRemote.Mce.*" XML_Guid="{2F4AA943-B18A-4C43-B063-CA16D802D6BA}" />
                            <Event Name="Task.Activated.EventGhost" Enabled="False" XML_Guid="{08171338-853A-493E-BFAA-6F6F3AF8FB4B}" />
                            <Event Name="System.DisplayImage.RightClick" XML_Guid="{931CCFFD-AEB5-4FE7-B369-E6C0B003F590}" />
                            <Action Name="Check for Ok - direct standby" XML_Guid="{2D3673C0-5E2E-415F-B1AD-E2306D275EE6}">
                                EventGhost.PythonScript(u'if "Ok" in eg.event.string:\n    #eg.result = 1\n    print "ok hit on standby - going to sleep..."\n    eg.TriggerEvent("OSDCountDownFinished_onOk", prefix = "StandbyControl")\n    eg.StopMacro()\nelse:\n    #eg.result = 0\n    pass')
                            </Action>
                            <Action XML_Guid="{B6DDAF55-FFBE-46F0-A49C-CC5118F11A91}">
                                NetworkSender.Map(u'mmhtpc.{eg.eventString} [{eg.event.payload}]')
                            </Action>
                            <Action XML_Guid="{ECCB623D-64A9-48BB-97AD-6ED27C13CD24}">
                                StandbyControl.CancelOSDCountDown()
                            </Action>
                            <Action XML_Guid="{1A99B5BB-66C0-4B5E-9A6F-B9B753A95B92}">
                                System.PlaySound(u'D:\\Programmdaten\\Eventghost\\sounds\\halfsec.mp3', 0, False)
                            </Action>
                            <Action XML_Guid="{20F3145A-5CE8-4822-B4DE-14C1CE3ED5CD}">
                                System.PlaySound(u'C:\\Windows\\Media\\Windows Default.wav', 0, False)
                            </Action>
                            <Action Name="Set vars" XML_Guid="{07DBC1B0-0319-4813-8B3D-32052178C50B}">
                                EventGhost.PythonScript(u'eg.globals.standbytriggered = 0\neg.globals.systemvolumelevel_set = eg.globals.systemvolume_keep')
                            </Action>
                            <Action XML_Guid="{253BED94-17BE-49EB-887B-612AC7176616}">
                                EventGhost.NewJumpIf(eg.GUID('{8A5136DA-8EA2-4647-A50A-B600CC9E763F}'), 2, True)
                            </Action>
                            <Action XML_Guid="{1CFC8EF1-BADA-42A6-B229-67F62D83EC6D}">
                                SchedulGhost.AbortEggTimer(u'WaitKodiSS')
                            </Action>
                            <Action Name="if htpcapp running reset Standby Control" XML_Guid="{677CC9D5-980A-48AC-84B4-3C421DDB1F74}">
                                EventGhost.PythonScript(u'if eg.globals.htpcapp == "kodi":\n    eg.TriggerEvent ("sc.trigger_mode_kodi")\nelif eg.globals.htpcapp == "mp":\n    eg.TriggerEvent ("sc.trigger_mode_menu")\nelse:\n    pass')
                            </Action>
                            <Action XML_Guid="{279149C3-6AA5-4742-AE90-BA1EB5CC79E6}">
                                EventGhost.Wait(0.2)
                            </Action>
                            <Action XML_Guid="{0C41DF70-61E2-4B86-BC7A-96914A0B05C0}">
                                EventGhost.ShowOSD()
                            </Action>
                            <Action XML_Guid="{015F5150-A549-4B91-861C-9273B6ACAB23}">
                                EventGhost.Wait(1.0)
                            </Action>
                            <Action XML_Guid="{22FEE7F2-C304-4023-A0D3-09D228C605B4}">
                                System.HideImage(u'off')
                            </Action>
                            <Action XML_Guid="{7D3A84B2-4BBE-41D7-97CE-5B9CB140481C}">
                                EventGhost.EnableExclusive(eg.GUID('{AF865C51-9B88-42F4-A3A9-720C42DE7FBC}'))
                            </Action>
                            <Action XML_Guid="{7262E958-CD27-4370-9528-EE8EB386C075}">
                                EventGhost.EnableItem(eg.GUID('{ED7EEFC2-B9B6-40C5-AA3A-D109C65F33DD}'))
                            </Action>
                            <Action XML_Guid="{54AC69C1-30A8-4373-B931-08C0F9BDFCD6}">
                                EventGhost.StopProcessing()
                            </Action>
                        </Macro>
                    </Folder>
                </Folder>
                <Macro Name="Failsafe / Restart EG after Resume" XML_Guid="{4BE80BDF-E092-4299-AF41-502A3E63ABAF}" Expanded="True">
                    <Event Name="WaitResumeAutomaticRestartEG.TimerEnd" XML_Guid="{049E2DC3-9515-49F1-B080-7549DAAD24A9}" />
                    <Action Name="Failsafe / Restart EG after Resume" XML_Guid="{67F8609A-AA5D-4F92-A920-060D0495EB5C}">
                        EventGhost.PythonScript(u"eg.globals.firststandbyafterresume = 0\neg.globals.failsaverestart = 1\neg.plugins.FileOperations.Write(2, u'{eg.globals.firststandbyafterresume}', u'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.firststandbyafterresume.txt', 0, 0, True, False, False, 'cp1252')\neg.plugins.FileOperations.Write(2, u'{eg.globals.failsaverestart}', u'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart.txt', 0, 0, True, False, False, 'cp1252')\neg.plugins.EGAppControl.SaveConfiguration()\neg.plugins.EGAppControl.RestartProgram()")
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="SystemDevices" XML_Guid="{19F2BEF7-C683-49C2-A443-ABE6A7BED409}">
                <Macro Name="Process Events" Enabled="False" XML_Guid="{285EDC3E-9B73-46E1-BE05-FB853065F641}">
                    <Event Name="System.DeviceRemoved" XML_Guid="{676D12DF-A143-4FB7-86AE-AC0E54598E27}" />
                    <Event Name="System.DeviceAttached" XML_Guid="{60CD84B8-7738-4C8B-A114-BC617FB310F0}" />
                    <Action Name="Process SystemDevices_old" Enabled="False" XML_Guid="{B9E15F9A-45B5-4820-BFB0-A252A83D3888}">
                        EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\n#debug = 1\n#eg.event.string = "DeviceAttached"\nif debug: print eg.event.payload\nif debug: print eg.event.payload[0]\n#/debug\n#\ndevicestring = eg.event.payload[0]\n#\n#def devices\namp = "\\\\\\\\?\\\\DISPLAY#ONK0865#5&amp;2bead00&amp;2&amp;UID4354#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}"\nheadsets = ["{0.0.0.00000000}.{9d2b252f-e305-4171-b4ad-bf5c44cb1972}", "\\\\\\\\?\\HID#BthHFPHID#a&amp;2e81c6a4&amp;0&amp;0000#{4d1e55b2-f16f-11cf-88cb-001111000030}", "{0.0.0.00000000}.{211d39dd-76eb-4d99-ba9c-0ac308f4eb4c}","\\\\\\\\?\\\\HID#{0000110e-0000-1000-8000-00805f9b34fb}_LOCALMFG&amp;000a&amp;Col01#9&amp;a2cc86e&amp;0&amp;0000#{4d1e55b2-f16f-11cf-88cb-001111000030}", "\\\\\\\\?\\\\HID#hfgCcDevice&amp;Col03#9&amp;8f20f31&amp;0&amp;0002#{4d1e55b2-f16f-11cf-88cb-001111000030}", "\\\\\\\\?\\\\HID#BthAvrcpDevice&amp;Col03#9&amp;30568ee9&amp;0&amp;0002#{4d1e55b2-f16f-11cf-88cb-001111000030}", "undefined2"]\nheadset2 = "\\\\?\\HID#BthHFPHID#a&amp;103dc62b&amp;0&amp;0000#{4d1e55b2-f16f-11cf-88cb-001111000030}"\n#set start vars\nheadsetaction = 0\nampaction = 0\nDeviceStatusChange = 0\n#\nif debug: print "for-loop for headsets (headset 1)"\nfor device in headsets:\n    if debug: print "Checking device run: "+str(device)\n    if devicestring == device:\n        if debug: print "Matching device: "+str(device)\n        devicestring = "headset1"\n        if debug: print "devicestring set to: "+str(devicestring)\n    else:\n        if debug: print "for-loop for headsets (headset 1) for "+str(device)+" not true, devicestring is still: "+str(devicestring)\nif amp in devicestring:\n    ampaction = 1\n    devicename = "Amp"\n    if debug: print "Amp action set"\nelif "headset1" in devicestring:\n    eg.globals.headset_no = 1\n    devicename = "Headset"\n    if debug: print "Headsetaction with "+str(devicename)+" set"\nelif headset2 in devicestring:\n    eg.globals.headset_no = 2\n    devicename = "Headset2"\n    if debug: print "Headsetaction with "+str(devicename)+" set"\nelse:\n    if debug: print "Device is unknown"\n    devicename = "Unknown"\nif "Headset" in devicename:\n    headsetaction = 1\nif headsetaction or ampaction:\n    #Attached\n    if ("DeviceAttached" in eg.event.string) or ("ACTIVE" in eg.event.string):\n        if debug: print devicename+" connected"\n        DeviceStatusChange = 1\n        eg.globals.audio_mode = devicename\n    #Removed\n    elif ("DeviceRemoved" in eg.event.string) or ("UNPLUGGED" in eg.event.string):\n        if debug: print devicename+" removed"\n        DeviceStatusChange = 0\nif headsetaction:\n    eg.globals.audio_headset = DeviceStatusChange\n    eg.globals.headset_connected = DeviceStatusChange\nelif ampaction:\n    eg.globals.amp_connected = DeviceStatusChange\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.amp_connected}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.amp_connected.txt\', 0, 0, True, False, False, \'cp1252\')\nprint str(devicename)+" has changed its state to "+str(DeviceStatusChange)\nif not devicename=="Unknown":\n    eg.TriggerEvent((devicename+"."+str(DeviceStatusChange)), prefix="System.Device")\n    def updatesystemvolume_var():\n        import time\n        time.sleep(2)\n        eg.TriggerEvent((devicename+"."+str(DeviceStatusChange)), prefix="System.SystemDevice_delayedaction")\n    eg.scheduler.AddTask(0.0, updatesystemvolume_var)')
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="Check process running" XML_Guid="{C4B77026-AA9D-4C85-98BD-08CE91B1CA22}">
                <Macro Name="MP" XML_Guid="{76FD26B9-D57E-4194-907C-E11F68AF6338}" Expanded="True">
                    <Action Name="Python Skript: Check MP running" XML_Guid="{7FEC2CEA-82D4-4362-8BCC-29FB5151E444}">
                        EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.result = len( WMI.ExecQuery(\'select * from Win32_Process where Name="mediaportal.exe"\') ) &gt; 0\neg.globals.mprunning = 1')
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="Images" XML_Guid="{62502874-A53F-4FBF-9983-9D60362C20FE}">
                <Macro Name="Display Image: Start" Enabled="False" XML_Guid="{1C71932E-E10A-44E7-B4CB-3D1BB0BA150A}" Expanded="True">
                    <Action XML_Guid="{D6DB6DFD-4130-4C46-824B-2C9055B9F3C0}">
                        System.DisplayImage(u'D:\\Programmdaten\\Eventghost\\pics\\bg_gradient2.jpg', 3, 0, True, False, 0, True, 4, 2, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u'hello')
                    </Action>
                </Macro>
                <Macro Name="Hide Images" XML_Guid="{AB8EBF9C-E265-472C-9642-E291380B5FB2}">
                    <Event Name='Mediaportal.Window."BasicHome"' XML_Guid="{746CFC1E-F453-45ED-8B9A-E7880E0DE46F}" />
                    <Event Name="WaitAfterHarmAct.TimerEnd" XML_Guid="{26BE5532-2D41-460E-938C-29BCDB396B47}" />
                    <Action XML_Guid="{E90F9D0B-6902-49A9-88CD-B5EB957F144D}">
                        System.HideImage(u'start')
                    </Action>
                    <Action XML_Guid="{E90F9D0B-6902-49A9-88CD-B5EB957F144D}">
                        System.HideImage(u'start')
                    </Action>
                    <Action XML_Guid="{97026617-90D9-40E0-96A3-23C33758E439}">
                        System.HideImage(u'off')
                    </Action>
                    <Action XML_Guid="{97026617-90D9-40E0-96A3-23C33758E439}">
                        System.HideImage(u'off')
                    </Action>
                    <Action XML_Guid="{F507A705-AFD9-4FB7-B194-0426AE392ACD}">
                        System.HideImage(u'error')
                    </Action>
                    <Action XML_Guid="{F507A705-AFD9-4FB7-B194-0426AE392ACD}">
                        System.HideImage(u'error')
                    </Action>
                </Macro>
                <Macro Name="LogLastImage" XML_Guid="{175B46A5-6201-4EC3-804F-40E821752B9D}" Expanded="True">
                    <Event Name="System.ImageDisplayed" XML_Guid="{B6FB16F4-EACB-46AB-89F9-A96952460607}" />
                    <Action Name="LogLastImageScript" XML_Guid="{C34E1666-465F-4BB0-99F7-860298490545}">
                        EventGhost.PythonScript(u'#scriptstart\nscriptname = "LogLastImage"\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\n\nimport time\neg.globals.lastImageDisplayed = eg.event.payload\nprint eg.globals.lastImageDisplayed\n#print eg.event.source\neg.Exit()\n#dump\nshowtime = 2\ntime.sleep(showtime)\nprint "showtime for displayed imeage is over"\neg.plugins.System.HideImage(eg.globals.lastImageDisplayed)')
                    </Action>
                    <Action XML_Guid="{17059698-864C-4318-9B96-1A91FA9AF8B7}">
                        FileOperations.Write(2, u'{eg.globals.lastImageDisplayed}', u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.lastImageDisplayed_log.txt', 2, 0, True, True, False, 'cp1252')
                    </Action>
                </Macro>
                <Macro Name="OnImageRightClick" XML_Guid="{93795C30-BAAF-4E57-8D35-A6F2D35A2538}" Expanded="True">
                    <Event Name="System.DisplayImage.RightClick" XML_Guid="{931CCFFD-AEB5-4FE7-B369-E6C0B003F590}" />
                    <Action Name="Interrupts" XML_Guid="{45A21C98-AE72-4F57-8600-A670744E17FF}">
                        EventGhost.PythonScript(u'eg.globals.interrupt = 1\neg.globals.endloop_interrupt = 1')
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="Windows" XML_Guid="{7B8F7D11-001A-4E4D-BEE6-BE4834ABA0A6}">
                <Macro Name="Close WerFault" XML_Guid="{F9C0950D-B809-4483-9E31-34408AFEBE73}">
                    <Event Name="Process.Created.cec-client" Enabled="False" XML_Guid="{472C37E4-F53A-400D-935F-661EBE2F2640}" />
                    <Event Name="Process.Created.WerFault" XML_Guid="{FF98013B-3ED6-4CAC-BEA1-1AA4C1891B70}" />
                    <Event Name="Task.Deactivated.WerFault" XML_Guid="{04699737-534E-4BF3-B9D9-CDBDD43CD175}" />
                    <Action XML_Guid="{A13E37EA-A4F5-4A04-AB61-47E9E41E44C0}">
                        Window.FindWindow(u'WerFault.exe', None, None, None, None, None, False, 1.5, 0)
                    </Action>
                    <Action XML_Guid="{8C59F272-02D1-46D1-ADAC-14CCF16B3BC9}">
                        Window.BringToFront()
                    </Action>
                    <Action XML_Guid="{7CBB62A8-FAC1-4795-9ECB-29043A78971F}">
                        Window.SendKeys(u'{Return}', False)
                    </Action>
                    <Action Enabled="False" XML_Guid="{21C3F0C9-2FCD-4CC2-B77B-73448BB79BA8}">
                        EventGhost.NewJumpIf(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 2, True)
                    </Action>
                </Macro>
                <Macro Name="Close Kodi Visual C++ Error" XML_Guid="{E1B249EF-A2E8-48BB-B49E-A66A002464D0}">
                    <Event Name="Task.Deactivated.Kodi" Enabled="False" XML_Guid="{AEC42341-3C63-43F0-9C35-B9BCD2E12644}" />
                    <Event Name="Task.Destroyed.Kodi" XML_Guid="{2CB16E5B-72AA-4775-8445-F24C67E86F2A}" />
                    <Event Name="Process.Destroyed.Kodi" XML_Guid="{5CD8D592-663C-4235-B67F-2B2BB362BB0C}" />
                    <Action XML_Guid="{225FE80F-4E20-40FE-94FB-2B857CB90BBA}">
                        Window.FindWindow(u'Kodi.exe', u'Microsoft Visual C++ Runtime Library', None, None, None, None, False, 0.0, 0)
                    </Action>
                    <Action XML_Guid="{FF78BE3C-CD83-4BFC-A718-14DBB603C62D}">
                        Window.BringToFront()
                    </Action>
                    <Action XML_Guid="{71DCC379-8CFE-4D0E-97F9-CBC5B7BD230A}">
                        Window.SendKeys(u'{Return}', False)
                    </Action>
                    <Action XML_Guid="{0D61E46E-F53C-4398-B78E-AF61E1F8ED7D}">
                        EventGhost.NewJumpIf(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 2, True)
                    </Action>
                </Macro>
                <Macro Name="Close window Lightsout" Enabled="False" XML_Guid="{29D839F7-D78A-4DEC-9ADA-3A8286224B4B}">
                    <Event Name="Process.Created.LightsOutClient.Commandline" XML_Guid="{CD3B003C-9D1A-47F5-A7A8-5DCD12E7368C}" />
                    <Action XML_Guid="{787F93A7-9836-4BDB-B406-F65328FAECF6}">
                        Window.FindWindow(u'WerFault.exe', u'LightsOutClient.Commandline', None, None, None, None, False, 1.0, 0)
                    </Action>
                    <Action XML_Guid="{33C2333B-5D29-4746-BF35-14E80FBD7273}">
                        Window.BringToFront()
                    </Action>
                    <Action XML_Guid="{9ABE3CE2-715D-497C-9871-FC5C9D3408F1}">
                        Window.SendKeys(u'{Return}', False)
                    </Action>
                    <Action XML_Guid="{4991E6B6-EC62-4EEE-AAEC-8765035FF02E}">
                        EventGhost.NewJumpIf(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 2, True)
                    </Action>
                </Macro>
                <Macro Name="Close window TeamViewer" XML_Guid="{A47BC3F8-8AA2-4ADD-AD69-EBCD6035E8CC}">
                    <Event Name="Process.Destroyed.TeamViewer_Desktop" XML_Guid="{37102365-EA03-42E8-AADE-D9CB080AE5D2}" />
                    <Event Name="Process.Created.TeamViewer_Desktop" XML_Guid="{F7751E31-7C97-4973-867D-89388A15C6BE}" />
                    <Event Name="Task.NewWindow.TeamViewer" XML_Guid="{992004FF-E199-4621-8F54-7CFF781D5097}" />
                    <Event Name="Task.Activated.TeamViewer" XML_Guid="{AECF77C5-ADDC-4D57-98D7-899BADCCD11E}" />
                    <Event Name="Task.Deactivated.TeamViewer" XML_Guid="{D68ABA70-4999-498F-A1CA-56390C606785}" />
                    <Action XML_Guid="{4B735B1A-4E0D-497C-97C3-C34724363320}">
                        Window.FindWindow(u'TeamViewer.exe', u'Gesponserte Sitzung', u'#32770', None, None, None, False, 1.0, 0)
                    </Action>
                    <Action XML_Guid="{1294A282-4799-4802-8894-1F27B25F0480}">
                        Window.BringToFront()
                    </Action>
                    <Action XML_Guid="{F6EDB2D6-8D36-4A7C-90AA-F11FDB2A4663}">
                        Window.SendKeys(u'{Return}', False)
                    </Action>
                    <Action Name="Check htpcapp / bring to front" XML_Guid="{C4DFF730-0B93-474F-A8C4-C92715DE4F77}">
                        EventGhost.PythonScript(u'if eg.globals.htpcapp == "mp":\n    eg.TriggerEvent ("mptofront", prefix = "routing.kodistarted")\nelif eg.globals.htpcapp == "kodi":\n    eg.TriggerEvent ("koditofront", prefix = "routing.kodistarted")\nelse:\n    print "No htpcapp defined - skiping..."')
                    </Action>
                </Macro>
                <Macro Name="Hide Eventghost" XML_Guid="{27C7073B-206F-4718-A197-11143CB0A3B6}">
                    <Action XML_Guid="{445643FC-DEE5-4840-ADE0-65B7E37A27AC}">
                        Window.FindWindow(u'eventghost.exe', u'EventGhost{*}', None, None, None, None, False, 1.0, 2)
                    </Action>
                    <Action XML_Guid="{4ABFB36F-905D-48ED-8192-6E28EB9D7123}">
                        Window.BringToFront()
                    </Action>
                    <Action XML_Guid="{D7105D13-67C8-4FDD-98B7-822AE35B99EA}">
                        Window.Minimize()
                    </Action>
                    <Action XML_Guid="{562B7C6A-E60A-477D-B76E-83DF6734E3F8}">
                        EventGhost.NewJumpIf(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 2, True)
                    </Action>
                </Macro>
                <Macro Name="OnStart tvuptodate.exe" XML_Guid="{7A1382EC-D894-4460-A890-B244CB685EE4}">
                    <Event Name="Process.Created.ArgusTV.GuideImporter" Enabled="False" XML_Guid="{83B89617-A1AF-47B6-9335-8861B872D6F6}" />
                    <Event Name="Process.Created.tvuptodate" XML_Guid="{38457016-B7A4-4C81-86C8-7EBE6B858FAC}" />
                    <Action XML_Guid="{060D76AF-A7EC-4414-8615-8D101DF426FA}">
                        EventGhost.Wait(2.0)
                    </Action>
                    <Action XML_Guid="{FC44EFAC-4923-4968-996E-8AFD58A86B9B}">
                        Window.FindWindow(u'tvuptodate.exe', u'Download Status', None, None, None, None, False, 3.0, 0)
                    </Action>
                    <Action XML_Guid="{C47D11D7-07F1-4AD5-A861-1F536BA80C46}">
                        Window.Minimize()
                    </Action>
                    <Action XML_Guid="{94F75A9E-E3A0-4AE6-A1E0-6C055E6A473D}">
                        EventGhost.NewJumpIf(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 2, False)
                    </Action>
                </Macro>
                <Macro Name="Hide explorer.exe" XML_Guid="{8FF137F9-15D9-4703-8757-782E5839DB66}">
                    <Action XML_Guid="{3FAEE57E-4EBA-4D29-B06B-90FCFB6B6E5E}">
                        Window.FindWindow(u'explorer.exe', None, u'CabinetWClass', None, None, None, False, 0.0, 0)
                    </Action>
                    <Action XML_Guid="{37920923-74A9-4F0C-BC55-80C3F4A74A63}">
                        Window.BringToFront()
                    </Action>
                    <Action XML_Guid="{DB4CB500-6DE4-40B2-9769-5F2EDAE1977A}">
                        Window.Minimize()
                    </Action>
                    <Action XML_Guid="{063047DF-41BE-4DBB-9B80-4C623C07EC54}">
                        EventGhost.NewJumpIf(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 2, True)
                    </Action>
                </Macro>
                <Macro Name="Check current_frontwindow" XML_Guid="{EDADDBAE-DCA0-4E95-85E6-1CFF11D87DD8}">
                    <Event Name="system.htpcapp.check_currentwindow" XML_Guid="{B9CBC2CA-BBA7-4474-A60E-09C828CF9411}" />
                    <Action Enabled="False" XML_Guid="{2AE3B6D6-E36B-46E1-941D-43824D230551}">
                        EventGhost.Wait(5.0)
                    </Action>
                    <Action XML_Guid="{2DA2A19F-BD26-41FD-A6C1-4F460A38851E}">
                        Window.FindWindow(None, None, None, None, None, None, None, None, None)
                    </Action>
                    <Action XML_Guid="{3D9948A0-C497-4C23-B004-720A3ED1A992}">
                        Window.GrabText(False)
                    </Action>
                    <Action Name="Set var / Print Result" XML_Guid="{166F1DD0-F2E1-4397-93EE-2D8A2F6D0445}">
                        EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\ndebug = 1\n#/debug\n\n#determine the window on top of the screen\neg.globals.current_frontwindow = eg.result[0]\nif debug: print "Current window on top is: "+eg.globals.current_frontwindow\n#set htpcapp\nif "Kodi" in eg.globals.current_frontwindow:\n    eg.globals.htpcapp = "kodi"\nelif "MediaPortal" in eg.globals.current_frontwindow:\n    eg.globals.htpcapp = "mp"\nelse:\n    print "Some other non media player app on top"')
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="MCE" XML_Guid="{AA100FC7-1222-498F-AB91-307D915AF4C2}">
                <Macro Name="Check MCE" XML_Guid="{6FCEBE9E-3CC8-423F-B751-6D345BA04CB4}" Expanded="True">
                    <Action Name="Python Skript: Check Mce running" XML_Guid="{ADC5F31E-D27D-4B4F-A36E-58579147B191}">
                        EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.result = len( WMI.ExecQuery(\'select * from Win32_Process where Name="AlternateMceIrService.exe"\') ) &gt; 0')
                    </Action>
                    <Action XML_Guid="{A9573A35-312F-4F7C-8145-CD44186E1120}">
                        EventGhost.ShowOSD()
                    </Action>
                </Macro>
                <Folder Name="Autorestart MCE" XML_Guid="{7F83EB4D-33B6-4BD5-A2B9-837DB6A1CCC0}">
                    <Macro Name="Autorestart MCE_Vista" XML_Guid="{44040479-B0CC-4AE8-89E1-E2E8110A9E54}" Expanded="True">
                        <Event Name="MceRemote.Disconnected" XML_Guid="{6E330191-F078-44EF-9E2C-A0945F6E8148}" />
                        <Action Name="Check for rerun" XML_Guid="{77D87B30-A62E-4868-8723-34263F7E29EE}">
                            EventGhost.PythonScript(u'if not eg.globals.restart_mce:\n    print "Macro should not be run - skipping"\n    eg.StopMacro()\nelse:\n    print "Macro is not blocked - restarting mce"')
                        </Action>
                        <Action Enabled="False" XML_Guid="{29933267-3133-4C58-A1E5-00942B7EE34F}">
                            EventGhost.ShowOSD()
                        </Action>
                        <Action XML_Guid="{42B15E62-44BD-455A-B94C-9CD7B3BEE530}">
                            EventGhost.EnableItem(eg.GUID('{E30F4178-45F4-458E-8D17-C502CCA0543B}'))
                        </Action>
                        <Action Name="Starte Anwendung: hstart.exe / restart mce bat" Enabled="False" XML_Guid="{9B70C53E-7D7A-41B3-975D-527F5CC52F95}">
                            System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\Hstart\\hstart.exe', u'/NOCONSOLE /RUNAS /WAIT "D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\restart_mceservice.bat"', 0, False, 3, u'', True, False, u'', False, False, False, False)
                        </Action>
                        <Action Name="Starte Anwendung: restart mce bat" XML_Guid="{9B70C53E-7D7A-41B3-975D-527F5CC52F95}">
                            System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\restart_mceservice.bat', u'', 3, False, 3, u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc', True, False, u'', False, False, False, True)
                        </Action>
                        <Action Name="reenable macro loop" XML_Guid="{60C587D1-12E4-4ABF-88F6-C6B344696B05}">
                            EventGhost.PythonScript(u'eg.globals.restart_mce = 0\ndef reenable_restart_mce():\n    import time\n    time.sleep(60)\n    print "reenable restart_mce"\n    eg.globals.restart_mce = 1\neg.scheduler.AddTask(0.0, reenable_restart_mce)\n')
                        </Action>
                    </Macro>
                    <Macro Name="Error Cleared" Enabled="False" XML_Guid="{E30F4178-45F4-458E-8D17-C502CCA0543B}">
                        <Event Name="MceRemote.Connected" XML_Guid="{5506A67A-D0B3-4A12-9F94-7C26DF228D88}" />
                        <Action Enabled="False" XML_Guid="{F23B40F4-A0A2-4C9A-B877-F7E33202485B}">
                            EventGhost.ShowOSD()
                        </Action>
                        <Action Enabled="False" XML_Guid="{6389363D-7A3C-4D1E-9922-89CBA1BF6F7D}">
                            EventGhost.Wait(1.0)
                        </Action>
                        <Action Enabled="False" XML_Guid="{2599245E-9504-41B3-8E53-F109799F1FE2}">
                            EventGhost.FlushEvents()
                        </Action>
                        <Action Enabled="False" XML_Guid="{AC8DA5EA-ED29-4CE9-882F-363A1E1B86FA}">
                            EventGhost.EnableExclusive(eg.GUID('{44040479-B0CC-4AE8-89E1-E2E8110A9E54}'))
                        </Action>
                    </Macro>
                </Folder>
                <Folder Name="Delay MCE" XML_Guid="{4D1F9F5A-0010-4D94-B0E1-32F1BE9A8F9B}">
                    <Macro Name="Enable: Delay MCE" Enabled="False" XML_Guid="{843CA1A3-39A0-4A45-8379-A3FEDEAA9698}">
                        <Event Name='Mediaportal.Window."BasicHome"' XML_Guid="{E90B0F5A-2C5A-4931-A2A9-16BB93E6BC05}" />
                        <Event Name="XBMC2.System.OnStart" XML_Guid="{32DEE8D0-AF9E-4601-869A-FFFDBACFE402}" />
                        <Action XML_Guid="{52F16F28-4706-4D56-B5DC-F511A459439A}">
                            EventGhost.EnableItem(eg.GUID('{A434218E-D2D5-44A8-AD9B-6A50C8B7EDC9}'))
                        </Action>
                    </Macro>
                    <Macro Name="Delay MCE" Enabled="False" XML_Guid="{A434218E-D2D5-44A8-AD9B-6A50C8B7EDC9}">
                        <Event Name="MceRemote.Mce.Play" XML_Guid="{53CCB994-4DD9-4412-90F5-04470EA6B088}" />
                        <Event Name="MceRemote.Mce.Pause" XML_Guid="{EDB18125-D387-4CF8-A5F9-C164431FB855}" />
                        <Event Name="MceRemote.Mce.Left" XML_Guid="{9B011047-362A-4806-8DAD-B5A018F932CD}" />
                        <Event Name="MceRemote.Mce.Right" XML_Guid="{2E9B305E-4D09-4E7B-9DB9-DC6921C5C050}" />
                        <Event Name="MceRemote.Mce.Down" XML_Guid="{0D96A069-FF1F-41AA-B729-DD9A1133B333}" />
                        <Event Name="MceRemote.Mce.Up" XML_Guid="{D4D24731-AB1A-47CC-A164-70CABF22F46D}" />
                        <Action Enabled="False" XML_Guid="{34EC6D49-5E78-41F3-A767-7B18C0F48789}">
                            EventGhost.Wait(0.1)
                        </Action>
                        <Action Enabled="False" XML_Guid="{4E8C7C1B-FC3E-4C76-B1CA-608046F9C961}">
                            EventGhost.FlushEvents()
                        </Action>
                    </Macro>
                </Folder>
            </Folder>
            <Folder Name="HDMICEC / libCEC" XML_Guid="{2090B4D7-C9B6-4A87-A1DE-A6E38861CFF1}">
                <Macro Name="Process cec traffic" XML_Guid="{3DA4D742-8F0E-459B-8B80-CD1BFB0665F2}">
                    <Event Name="CEC.traffic.*" XML_Guid="{97F188EC-B629-4A88-B8D9-8A93BFC948BE}" />
                    <Action Name="Process cec traffic" XML_Guid="{5ABDECFE-CA10-4C83-9252-03A9D7970BE2}">
                        EventGhost.PythonScript(u'#Basic\ncecstr = eg.event.string[13:]\n\n#Volume von AMP\nif "54:7a" in cecstr: \n\tif len(cecstr) &gt;= 7 :\n\t\tcecvalhex = cecstr[6:]\n\t\tprint "Hex: "+str(cecvalhex)\n\t\tcecvalint = int(cecvalhex,16)\n\t\tprint "Integer: "+str(cecvalint)\n\t\t#eg.globals.amp_volume_old2 = eg.globals.amp_volume_old\n\t\teg.globals.amp_volume_old = eg.globals.amp_volume\n\t\teg.globals.amp_volume = int(cecvalint * 0.79591836735 + 1)\n\t\tprint "Amp-Volume: "+str(eg.globals.amp_volume)\n\t\t#eg.plugins.EventGhost.ShowOSD(u\'   Debug: Avr.Volume updated to {str(eg.globals.amp_volume)}   \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 3, (20, 20), 0, 2.0, eg.globals.osd_skin)\n\t\teg.TriggerEvent ((str(eg.globals.amp_volume)), prefix="cecconv.ampvol", payload=eg.globals.amp_volume)\n\t\teg.result = eg.globals.amp_volume\n#Amp Powerstatus\nelif "50:90:" in eg.event.string:\n\tif len(cecstr) &gt;= 7 :\n\t\tamppowraw = cecstr[6:]\n\t\tif int(amppowraw) == 00:\n\t\t\teg.globals.amppowerstatus = 1\n\t\t\tamppow = "On"\n\t\telif int(amppowraw) == 01:\n\t\t\teg.globals.amppowerstatus = 0\n\t\t\tamppow = "Standby"\n\t\telse :\n\t\t\tamppow = "ERROR"\n\t\tprint "Amp-Power-Status: "+amppow\n\t\teg.TriggerEvent ((str(amppowraw)), prefix="cecconv.amppow", payload=amppow)\n\t\teg.result = amppow\nelse:\n\tprint cecstr')
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="LAV" XML_Guid="{B7232657-6271-4237-AEE7-0403CB1AFF56}">
                <Macro Name="LAV Bitstreaming on" XML_Guid="{D4B3307B-8C70-4522-998B-00A52D66E160}" Expanded="True">
                    <Action Name="Script bitstreaming on" XML_Guid="{A189E5F1-DD2E-47DD-A02F-8A8F8A108654}">
                        EventGhost.PythonScript(u'import time\nfor x in range(0, 2):\n\tprint "Run bitstreaming on: "+str(x)\n\teg.plugins.System.Execute(u\'C:\\\\Windows\\\\System32\\\\rundll32.exe\', u\'"C:\\\\Program Files (x86)\\\\LAV Filters\\\\x86\\\\LAVAudio.ax",OpenConfiguration\', 0, False, 2, u\'\', True, False, u\'\', False, False, False)\n\ttime.sleep(0.25)\n\teg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'Dolby Digital (AC-3)\', u\'Button\', 1, False, 3.0, 0)\n\teg.plugins.Window.SendKeys(u\'{Add}\', False)\n\teg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'Dolby Digital Plus (E-AC3)\', u\'Button\', 1, False, 3.0, 0)\n\teg.plugins.Window.SendKeys(u\'{Add}\', False)\n\teg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'Dolby TrueHD\', u\'Button\', 1, False, 3.0, 0)\n\teg.plugins.Window.SendKeys(u\'{Add}\', False)\n\teg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'DTS\', u\'Button\', 1, False, 3.0, 0)\n\teg.plugins.Window.SendKeys(u\'{Add}\', False)\n\teg.plugins.Window.SendKeys(u\'{Enter}\', False)\n\teg.globals.bitstreaming = 1\n\teg.plugins.FileOperations.Write(2, u\'{eg.globals.bitstreaming}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.bitstreaming.txt\', 0, 0, True, False, False, \'cp1252\')\n\ttime.sleep(1)')
                    </Action>
                </Macro>
                <Macro Name="LAV Bitstreaming off" XML_Guid="{FF95E29B-7A27-4918-B2DE-8B96C150C2BE}" Expanded="True">
                    <Action Name="Script bitstreaming off" XML_Guid="{A8FCD904-924B-4DCD-B538-0E874A5DEE01}">
                        EventGhost.PythonScript(u'import time\nfor x in range(0, 2):\n    print "Run bitstreaming off: "+str(x)\n    eg.plugins.System.Execute(u\'C:\\\\Windows\\\\System32\\\\rundll32.exe\', u\'"C:\\\\Program Files (x86)\\\\LAV Filters\\\\x86\\\\LAVAudio.ax",OpenConfiguration\', 0, False, 2, u\'\', True, False, u\'\', False, False, False)\n    time.sleep(.25)\n    eg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'Dolby Digital (AC-3)\', u\'Button\', 1, False, 3.0, 0)\n    eg.plugins.Window.SendKeys(u\'{Subtract}\', False)\n    eg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'Dolby Digital Plus (E-AC3)\', u\'Button\', 1, False, 3.0, 0)\n    eg.plugins.Window.SendKeys(u\'{Subtract}\', False)\n    eg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'Dolby TrueHD\', u\'Button\', 1, False, 3.0, 0)\n    eg.plugins.Window.SendKeys(u\'{Subtract}\', False)\n    eg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'DTS\', u\'Button\', 1, False, 3.0, 0)\n    eg.plugins.Window.SendKeys(u\'{Subtract}\', False)\n    eg.plugins.Window.SendKeys(u\'{Enter}\', False)\n    eg.globals.bitstreaming = 0\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.bitstreaming}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.bitstreaming.txt\', 0, 0, True, False, False, \'cp1252\')\n    time.sleep(1)')
                    </Action>
                </Macro>
                <Macro Name="LAV Mixing on" XML_Guid="{9A5B532A-7641-4108-A25D-8B0D0AE0E450}" Expanded="True">
                    <Action Name="Script mixing on" XML_Guid="{8432EEF2-06C6-4912-ACB3-A63777379E68}">
                        EventGhost.PythonScript(u'import time\nfor x in range(0, 2):\n\tprint "Run mixing on: "+str(x)\n\teg.plugins.System.Execute(u\'C:\\\\Windows\\\\System32\\\\rundll32.exe\', u\'"C:\\\\Program Files (x86)\\\\LAV Filters\\\\x86\\\\LAVAudio.ax",OpenConfiguration\', 0, False, 2, u\'\', True, False, u\'\', False, False, False)\n\ttime.sleep(0.25)\n\teg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'Dynamic Range Compression\', u\'Button\', 1, False, 3.0, 0)\n\teg.plugins.Window.SendKeys(u\'{Ctrl+Tabulator}\', False, 2)\n\teg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'Enable Mixing\', u\'Button\', 1, False, 3.0, 0)\n\teg.plugins.Window.SendKeys(u\'{Add}\', False)\n\teg.plugins.Window.SendKeys(u\'{Enter}\', False)\n\teg.globals.lav_mixing = 1\n\teg.plugins.FileOperations.Write(2, u\'{eg.globals.lav_mixing}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.lav_mixing.txt\', 0, 0, True, False, False, \'cp1252\')\n\ttime.sleep(1)')
                    </Action>
                </Macro>
                <Macro Name="LAV Mixing off" XML_Guid="{823E525F-CD17-4A8A-A227-0B151DD3F071}" Expanded="True">
                    <Action Name="Script mixing off" XML_Guid="{E19F573B-7C1A-4009-B86C-C4860A9B8E1B}">
                        EventGhost.PythonScript(u'import time\nfor x in range(0, 2):\n\tprint "Run mixing on: "+str(x)\n\teg.plugins.System.Execute(u\'C:\\\\Windows\\\\System32\\\\rundll32.exe\', u\'"C:\\\\Program Files (x86)\\\\LAV Filters\\\\x86\\\\LAVAudio.ax",OpenConfiguration\', 0, False, 2, u\'\', True, False, u\'\', False, False, False)\n\ttime.sleep(0.25)\n\teg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'Dynamic Range Compression\', u\'Button\', 1, False, 3.0, 0)\n\teg.plugins.Window.SendKeys(u\'{Ctrl+Tabulator}\', False, 2)\n\teg.plugins.Window.FindWindow(u\'rundll32.exe\', u\'Eigenschaften\', u\'#32770\', u\'Enable Mixing\', u\'Button\', 1, False, 3.0, 0)\n\teg.plugins.Window.SendKeys(u\'{Subtract}\', False)\n\teg.plugins.Window.SendKeys(u\'{Enter}\', False)\n\teg.globals.lav_mixing = 0\n\teg.plugins.FileOperations.Write(2, u\'{eg.globals.lav_mixing}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.lav_mixing.txt\', 0, 0, True, False, False, \'cp1252\')\n\ttime.sleep(1)')
                    </Action>
                </Macro>
            </Folder>
            <Macro Name="HDMI reset" XML_Guid="{88DAAEB3-40FF-4B74-8629-C7F729BBCD54}">
                <Event Name="MceRemote.Mce.Audio" Enabled="False" XML_Guid="{200ADD4A-DB01-4320-9612-B88244E20814}" />
                <Action XML_Guid="{BF289BE9-59B8-4D8C-B967-6E4452479316}">
                    Window.SendKeys(u'{Alt+F1}', False)
                </Action>
            </Macro>
            <Folder Name="Maintenance on/off" XML_Guid="{2192C56F-3F8F-479E-BD92-85859E39B4EA}">
                <Macro Name="Start Maintenance" XML_Guid="{8BFFDDC4-261E-4EFC-862B-5CAA40FBD3E1}" Expanded="True">
                    <Event Name="Main.maintenance.start" XML_Guid="{3FF5DEC5-F0A3-486B-9AF9-236EAD5739F9}" />
                    <Event Name="Process.Created.show_pointer" XML_Guid="{EFF50DC1-880E-496C-872F-4CE487360177}" />
                    <Action XML_Guid="{1030E61F-4783-41A7-BA00-2F1DA0E509D1}">
                        Taskbar.UnhideTaskBar()
                    </Action>
                    <Action XML_Guid="{21FDBAA7-265D-48A8-ABD5-FF1CADCBCE60}">
                        EventGhost.NewJumpIf(eg.GUID('{5E00741D-28FE-44AB-A692-559BCFC0DEC8}'), 2, True)
                    </Action>
                    <Action XML_Guid="{89295D19-6ADA-40EB-B4C2-C53330C991EB}">
                        EventGhost.Wait(1.0)
                    </Action>
                    <Action XML_Guid="{11405D97-E1E5-41AB-B189-FC1743EFE623}">
                        StandbyControl.InhibitStandbyByApplication(u'maintenance', False, 0, 600, False, 30, False)
                    </Action>
                    <Action XML_Guid="{7A6C0A3C-477E-4EC8-8038-2C0CDB3D7E70}">
                        System.Execute(u'D:\\Programmdaten\\01_Zentral\\AutoIT\\hide pointer mouse\\02_show_pointer.exe', u'', 0, False, 3, u'', False, False, u'', False, False, False, False)
                    </Action>
                </Macro>
                <Macro Name="End Maintenance" XML_Guid="{C20F5129-EBB0-4F0B-B111-2DCC62B84A36}" Expanded="True">
                    <Action Name="Check for open remotesession" XML_Guid="{B7765DD2-C7C5-4421-BBDD-C8F66E02BC18}">
                        EventGhost.PythonScript(u'if eg.globals.remotesession:\n    eg.StopMacro()\n    print "Remote session still active - skipping..."\nelse:\n    print "No Remote session active - proceeding..."')
                    </Action>
                    <Action Enabled="False" XML_Guid="{98F1197B-7C37-4C1E-B189-BE161CF57D1A}">
                        Window.FindWindow(u'TeamViewer.exe', u'TeamViewer Panel (minimiert)', u'TV_ControlWinMinimized', None, None, None, True, 0.0, 1)
                    </Action>
                    <Action Enabled="False" XML_Guid="{E18D3859-AE58-4066-ADB5-22C5064B45DF}">
                        Window.FindWindow(u'AnyDesk.exe', u'AnyDesk (MYUSERNAME)', u'ad_win#4\n', None, None, None, True, 0.0, 1)
                    </Action>
                    <Action XML_Guid="{8630D9A9-B0F1-4C5A-A637-F21BCE1EBBB4}">
                        Taskbar.HideTaskBar()
                    </Action>
                    <Action XML_Guid="{D9AA2A80-103B-4AE3-AFCA-27E5F3616063}">
                        EGAppControl.HideWindow()
                    </Action>
                    <Action XML_Guid="{A17BAD21-28DD-4DDE-8D2B-A61EA5E4B5FE}">
                        System.Execute(u'D:\\Programmdaten\\01_Zentral\\AutoIt\\hide pointer mouse\\01_hide_pointer.exe', u'', 0, False, 3, u'', False, False, u'', False, False, False, False)
                    </Action>
                    <Action Enabled="False" XML_Guid="{0148D921-D153-4D7C-9A4B-E03623B2B8BB}">
                        Mouse.MoveAbsolute(960, 1078, None, False, False)
                    </Action>
                    <Action XML_Guid="{22A4E16E-DCD7-4E6C-B5A2-F739892CB67E}">
                        StandbyControl.EnableStandbyByApplication(u'maintenance', True, 0, 60, 0, 600)
                    </Action>
                    <Action XML_Guid="{9A99DC14-B89A-4EBE-9566-57F0224BE736}">
                        StandbyControl.TriggerStandbyTimer(False, True, 600)
                    </Action>
                    <Action XML_Guid="{A5E2E954-15BE-472A-9836-E9DB62B7E940}">
                        Window.FindWindow(u'Taskmgr.exe', None, None, None, None, None, False, 0.0, 0)
                    </Action>
                    <Action XML_Guid="{F5637BF3-6E1A-449F-AB17-253C1DBDA376}">
                        Window.Close()
                    </Action>
                    <Action XML_Guid="{F7654AD9-4F94-4DAE-9D04-A8466EA549DF}">
                        Window.FindWindow(u'explorer.exe', None, None, None, None, None, False, 0.0, 0)
                    </Action>
                    <Action XML_Guid="{2E64406D-9737-40D1-87CE-F3674978D32A}">
                        Window.BringToFront()
                    </Action>
                    <Action XML_Guid="{6C38F445-3681-4927-881C-EE98E186119E}">
                        Window.Close()
                    </Action>
                </Macro>
                <Macro Name="Remote session opened" XML_Guid="{88C459BF-96CB-4C1B-A9B4-F010E25A84BF}" Expanded="True">
                    <Event Name="Process.Created.TeamViewer_Desktop" XML_Guid="{52527FD3-6D82-4FA1-8F03-F239D39E701C}" />
                    <Event Name="Process.Created.AnyDesk" XML_Guid="{E4B3A647-616F-4AD5-B08B-2FE504A8BE90}" />
                    <Action Name="Set var" XML_Guid="{EE3C7AFB-532D-4A67-9319-3CC3EF62D6AA}">
                        EventGhost.PythonScript(u"eg.globals.remotesession = 1\neg.plugins.FileOperations.Write(2, u'{eg.globals.remotesession}', u'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.remotesession.txt', 0, 0, True, False, False, 'cp1252')")
                    </Action>
                    <Action XML_Guid="{21EA3697-AE65-4B2C-862D-7E29EE170470}">
                        EventGhost.NewJumpIf(eg.GUID('{8BFFDDC4-261E-4EFC-862B-5CAA40FBD3E1}'), 2, False)
                    </Action>
                </Macro>
                <Macro Name="Remote session closed" XML_Guid="{13CBD802-39E5-4CAA-8D50-6B900490810F}" Expanded="True">
                    <Event Name="Process.Destroyed.TeamViewer_Desktop" XML_Guid="{6B1CE9EE-9DFA-48D7-935D-452B2DD0F1DD}" />
                    <Event Name="Task.Destroyed.AnyDesk" XML_Guid="{8410D859-802F-403B-8806-4A97101A6BFF}" />
                    <Action Name="Set var" XML_Guid="{EE3C7AFB-532D-4A67-9319-3CC3EF62D6AA}">
                        EventGhost.PythonScript(u"eg.globals.remotesession = 0\neg.plugins.FileOperations.Write(2, u'{eg.globals.remotesession}', u'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.remotesession.txt', 0, 0, True, False, False, 'cp1252')")
                    </Action>
                    <Action XML_Guid="{21EA3697-AE65-4B2C-862D-7E29EE170470}">
                        EventGhost.NewJumpIf(eg.GUID('{C20F5129-EBB0-4F0B-B111-2DCC62B84A36}'), 2, False)
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="Vpn_1" XML_Guid="{49686845-87D6-46AD-9979-63FC319AAFB5}">
                <Folder Name="start/stop" XML_Guid="{F66B8745-D3B4-4FD1-8FF7-6DCAF918C648}" Expanded="True">
                    <Macro Name="Check if openvpn running" XML_Guid="{447E4992-3E74-47D6-8E10-0ED50A4314FD}">
                        <Event Name="MceRemote.Mce.Star" XML_Guid="{691C4B92-7AFC-48C8-AC8B-840870C68029}" />
                        <Action Name="Check if openspn running" XML_Guid="{12BAF7D4-18A1-4776-8A05-33F80B62F398}">
                            EventGhost.PythonScript(u'#check if openvpn service is already running\nimport time\n#import proceses\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.ovpn_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="openvpnserv.exe"\') ) &gt; 0\n#set\nif eg.globals.ovpn_running:\n    eg.result = 1\nelif not eg.globals.ovpn_running:\n    eg.result = 0\nelse:\n    print "something is wrong with ovpn detection"')
                        </Action>
                        <Action XML_Guid="{B54337A3-0D06-4188-8E21-438069A65482}">
                            EventGhost.JumpIfElse(eg.GUID('{47EEBCEA-7855-46D2-ABA8-0E06306CBAEB}'), 1, False, eg.GUID('{29532503-B754-48BD-9898-D4B248D5B6AE}'), False)
                        </Action>
                    </Macro>
                    <Macro Name="start openvpn" XML_Guid="{47EEBCEA-7855-46D2-ABA8-0E06306CBAEB}" Expanded="True">
                        <Action Name="start service / osd" XML_Guid="{D3F5CD86-4DDF-4B88-B8AE-43C26BDB23F3}">
                            EventGhost.PythonScript(u'#check if openvpn service is running\nimport time\n#import proceses\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.ovpn_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="openvpnserv.exe"\') ) &gt; 0\n#stop service\nif not eg.globals.ovpn_running:\n    eg.plugins.System.Command(u\'net start openvpnservice\', False, True, u\'vpn_connect\', True, True, True, False, True)\n    eg.globals.osdtext = "Vpn-Verbindung wird hergestellt"\nelse:\n    eg.globals.osdtext = "Vpn-Verbindung war schon hergestellt"\nif eg.globals.htpcapp == "kodi":\n    eg.plugins.XBMC2.SendNotification(u\'System\', u\'{eg.globals.osdtext} \')\nelse:\n    eg.plugins.EventGhost.ShowOSD(u\'   {eg.globals.osdtext}   \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 7.0, eg.globals.osd_skin)')
                        </Action>
                    </Macro>
                    <Macro Name="stop openvpn" XML_Guid="{29532503-B754-48BD-9898-D4B248D5B6AE}" Expanded="True">
                        <Action Name="stop service / osd" XML_Guid="{34550280-DB81-4FF3-91E7-0A9C13D2F811}">
                            EventGhost.PythonScript(u'#check if openvpn service is running\nimport time\n#import proceses\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.ovpn_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="openvpnserv.exe"\') ) &gt; 0\n#stop service\nif eg.globals.ovpn_running:\n    eg.plugins.System.Command(u\'net stop openvpnservice\', False, True, u\'vpn_disconnect\', True, True, True, False, True)\n    eg.globals.osdtext = "Vpn-Verbindung wird beendet"\nelse:\n    eg.globals.osdtext = "Vpn-Verbindung war schon beendet"\nif eg.globals.htpcapp == "kodi":\n    eg.plugins.XBMC2.SendNotification(u\'System\', u\'{osdtext} \')\nelse:\n    eg.plugins.EventGhost.ShowOSD(u\'   {eg.globals.osdtext}   \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 7.0, eg.globals.osd_skin)')
                        </Action>
                    </Macro>
                </Folder>
                <Macro Name="Zeige OSD: Vpn" XML_Guid="{B8BDD65F-014B-4337-BE41-AB24523B1F4B}" Expanded="True">
                    <Event Name="System.WindowsCommand.vpn_connect" XML_Guid="{22CBBAD6-42E7-4C5E-B0E3-37C4A366287C}" />
                    <Event Name="System.WindowsCommand.vpn_disconnect" XML_Guid="{583164AD-8EA9-40B2-B16B-11E4F0547112}" />
                    <Action Name="Show OSD" XML_Guid="{C5FFDDA2-7FE3-414B-9363-54DCEFB06EBD}">
                        EventGhost.PythonScript(u'import time\n#debug\n#eg.event.string = "vpn_disconnect"\n#eg.event.string = "vpn_connect"\n#/debug\nwaittime = 10\nif "vpn_connect" in eg.event.string:\n    for x in range(0, waittime):\n        print x\n        y = waittime - x\n        print y\n        if eg.globals.htpcapp:\n            eg.plugins.XBMC2.SendNotification(u\'System\', u\'Vpn wird verbunden - Bitte warten \'+str(y))\n            #eg.plugins.XBMC2.SendNotification(u\'Headset angeschlossen:\', u\'Zur Aktivierung OK druecken    {y}\')\n        else:\n            eg.plugins.EventGhost.ShowOSD(u\'    Vpn wird verbunden - Bitte warten    \'+str(waittime-x)+"    ", eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 1.5, eg.globals.osd_skin)\n        time.sleep(1)\n    if eg.globals.htpcapp:\n        eg.plugins.XBMC2.SendNotification(u\'System\', u\'Vpn wird verbunden - Bitte warten 0\')\n        time.sleep(1.5)\n        eg.plugins.XBMC2.SendNotification(u\'System\', u\'Verbindung ist hergestellt\')\n    else:\n        eg.plugins.EventGhost.ShowOSD(u\'   Verbindung ist hergestellt   \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 1.5, eg.globals.osd_skin)\nelif "vpn_disconnect" in eg.event.string:\n    if eg.globals.htpcapp:\n        eg.plugins.XBMC2.SendNotification(u\'System\', u\'Vpn wurde beendet\')\n    else:\n        eg.plugins.EventGhost.ShowOSD(u\'    Vpn wurde beendet    \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 1.5, eg.globals.osd_skin)')
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="Vpn 2" Enabled="False" XML_Guid="{C7FE8117-4709-4861-9ABA-3E1FBA471933}">
                <Folder Name="start/stop" XML_Guid="{CAB82D53-D92F-4B8D-BEB0-DD375FB341BF}" Expanded="True">
                    <Macro Name="Check if openvpn running" XML_Guid="{A87E3DD7-B61A-4D73-8AEE-9FFB8A2C6756}" Expanded="True">
                        <Event Name="MceRemote.Mce.Star" XML_Guid="{16970111-A551-4B31-8AFC-87053F4E3BCF}" />
                        <Action Name="Check if openspn running" XML_Guid="{008417FF-4964-4BC3-96B9-EDF3FEE74A3B}">
                            EventGhost.PythonScript(u'\nif eg.globals.ovpn_currentconfig &lt;= (eg.globals.ovpn_configcount-1):\n    eg.globals.ovpn_currentconfig = eg.globals.ovpn_currentconfig+1\nelse:\n    eg.globals.ovpn_currentconfig = 1\nprint "eg.globals.ovpn_currentconfig = "+str(eg.globals.ovpn_currentconfig)\n#check if openvpn gui is already running\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.ovpn_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="openvpn-gui.exe"\') ) &gt; 0\n#set\nif eg.globals.ovpn_running:\n    eg.result = 1\n    print "OpenVpn is running"\n    eg.globals.osdtext = "Vpn-Verbindung wird beendet"\nelif not eg.globals.ovpn_running:\n    eg.result = 0\n    print "OpenVpn is not running"\n    eg.globals.osdtext = "Vpn-Verbindung wird hergestellt"\nelse:\n    print "something is wrong with ovpn detection"\nif eg.globals.htpcapp == "kodi":\n    eg.plugins.XBMC2.SendNotification(u\'System\', u\'{eg.globals.osdtext} \')\nelse:\n    eg.plugins.EventGhost.ShowOSD(u\'   {eg.globals.osdtext}   \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 7.0, eg.globals.osd_skin)\n\n\n\n\n###### Code dump\n#set system variables\neg.globals.ovpn_path = "C:\\\\Program Files\\\\OpenVPN\\\\bin\\\\openvpn-gui.exe"\neg.globals.ovpn_config_path = "D:\\\\Programmdaten\\\\openvpn\\\\configs\\\\active"\neg.globals.ovpn_configcount = 7\n#start gui\neg.plugins.System.Command(u\'eg.globals.ovpn_path --connect str(eg.globals.ovpn_currentconfig)+".ovpn" --config_dir eg.globals.ovpn_path\', True, False, u\'\', False, False, False, False, True)')
                        </Action>
                        <Action XML_Guid="{800715BD-D737-445A-AAD6-1E164BB2D3CA}">
                            EventGhost.JumpIfElse(eg.GUID('{F6448523-F31F-4FB8-BA2A-FF5873FE6095}'), 1, False, eg.GUID('{886AD197-7617-4958-AEE2-5ED8F22E732A}'), False)
                        </Action>
                    </Macro>
                    <Folder Name="Start VPN alternating" XML_Guid="{CAA476D2-4835-4A5C-8256-FC3F8428CDDB}" Expanded="True">
                        <Macro Name="Server 1" XML_Guid="{F6448523-F31F-4FB8-BA2A-FF5873FE6095}" Expanded="True">
                            <Action Name="start gui / osd" XML_Guid="{838783F0-1E11-4BDD-8436-18BA52EAD9AF}">
                                EventGhost.PythonScript(u'import time\n#start gui\neg.plugins.System.Command(u\'eg.globals.ovpn_path --connect str(eg.globals.ovpn_currentconfig)+".ovpn" --config_dir eg.globals.ovpn_path\', True, False, u\'\', False, False, False, False, True)\neg.globals.osdtext = "Vpn-Verbindung wird hergestellt"\nif eg.globals.htpcapp == "kodi":\n    eg.plugins.XBMC2.SendNotification(u\'System\', u\'{eg.globals.osdtext} \')\nelse:\n    eg.plugins.EventGhost.ShowOSD(u\'   {eg.globals.osdtext}   \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 7.0, eg.globals.osd_skin)')
                            </Action>
                        </Macro>
                    </Folder>
                    <Macro Name="stop openvpn" XML_Guid="{886AD197-7617-4958-AEE2-5ED8F22E732A}" Expanded="True">
                        <Action Name="stop gui / osd" XML_Guid="{B9710CB8-089E-4C7F-BA30-EE5AD327210D}">
                            EventGhost.PythonScript(u'import time\n#stop ovpn gui\n\n#eg.plugins.System.Command(u\'net stop openvpnservice\', False, True, u\'vpn_disconnect\', True, True, True, False, True)\neg.globals.osdtext = "Vpn-Verbindung wird beendet"\nif eg.globals.htpcapp == "kodi":\n    eg.plugins.XBMC2.SendNotification(u\'System\', u\'{osdtext} \')\nelse:\n    eg.plugins.EventGhost.ShowOSD(u\'   {eg.globals.osdtext}   \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 7.0, eg.globals.osd_skin)')
                        </Action>
                    </Macro>
                </Folder>
                <Macro Name="Zeige OSD: Vpn" XML_Guid="{CD5881F9-C308-4DC1-AF3E-EDBDF5421961}" Expanded="True">
                    <Event Name="System.WindowsCommand.vpn_connect" XML_Guid="{BF5F9354-C55D-4820-AA62-22AF13C8BE4F}" />
                    <Event Name="System.WindowsCommand.vpn_disconnect" XML_Guid="{286EA2DC-4D85-45D1-838C-958B1D52C113}" />
                    <Action Name="Show OSD" XML_Guid="{CE50E5DE-C924-4ACC-AFE7-9DC15AE013B7}">
                        EventGhost.PythonScript(u'import time\n#debug\n#eg.event.string = "vpn_disconnect"\n#eg.event.string = "vpn_connect"\n#/debug\nwaittime = 10\nif "vpn_connect" in eg.event.string:\n    for x in range(0, waittime):\n        print x\n        y = waittime - x\n        print y\n        if eg.globals.htpcapp:\n            eg.plugins.XBMC2.SendNotification(u\'System\', u\'Vpn wird verbunden - Bitte warten \'+str(y))\n            #eg.plugins.XBMC2.SendNotification(u\'Headset angeschlossen:\', u\'Zur Aktivierung OK druecken    {y}\')\n        else:\n            eg.plugins.EventGhost.ShowOSD(u\'    Vpn wird verbunden - Bitte warten    \'+str(waittime-x)+"    ", eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 1.5, eg.globals.osd_skin)\n        time.sleep(1)\n    if eg.globals.htpcapp:\n        eg.plugins.XBMC2.SendNotification(u\'System\', u\'Vpn wird verbunden - Bitte warten 0\')\n        time.sleep(1.5)\n        eg.plugins.XBMC2.SendNotification(u\'System\', u\'Verbindung ist hergestellt\')\n    else:\n        eg.plugins.EventGhost.ShowOSD(u\'   Verbindung ist hergestellt   \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 1.5, eg.globals.osd_skin)\nelif "vpn_disconnect" in eg.event.string:\n    if eg.globals.htpcapp:\n        eg.plugins.XBMC2.SendNotification(u\'System\', u\'Vpn wurde beendet\')\n    else:\n        eg.plugins.EventGhost.ShowOSD(u\'    Vpn wurde beendet    \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 6, (0, 20), 0, 1.5, eg.globals.osd_skin)')
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="ScheduledTasks" XML_Guid="{486F6D18-9F4F-42EA-9BBD-708796EBAB00}">
                <Macro Name="Daily Restart" XML_Guid="{FA18F90C-8133-4772-A663-86316FFE7074}" Expanded="True">
                    <Action XML_Guid="{AC92619D-129B-45B9-9B18-BBCF71CF3AA5}">
                        EventGhost.NewJumpIf(eg.GUID('{437742D9-FF01-4792-AE3F-8B0A9AB61EC9}'), 2, True)
                    </Action>
                    <Action XML_Guid="{2F793ACD-459F-4A34-8212-559B6A70C0B6}">
                        EGAppControl.SaveConfiguration()
                    </Action>
                    <Action XML_Guid="{FBC208E3-6F63-4F0D-819A-8CC12DABCE01}">
                        System.Reboot(True)
                    </Action>
                </Macro>
            </Folder>
        </Folder>
        <Folder Name="htpc" XML_Guid="{BE70CC3B-1CAD-411B-9CE6-97496ACE4857}" Expanded="True">
            <Folder Name="htpc Start / Audio Video" XML_Guid="{9385F4D8-1716-453E-B267-DF9107A5EF4A}">
                <Folder Name="Aktionen Routing" XML_Guid="{E00E1D22-2A7D-4B58-A2A3-C5968F1836A4}" Expanded="True">
                    <Folder Name="HarmonyAktionen" XML_Guid="{C8429847-2B16-4A88-88D7-63A52090459F}">
                        <Macro Name="All_Start" XML_Guid="{03837D9D-FC24-4F3B-B243-B6BAC6FAA68B}">
                            <Event Name="MceRemote.Mce.Videos" XML_Guid="{11CF1094-D57A-42E9-9A43-A425C9437AA8}" />
                            <Event Name="MceRemote.Mce.Pictures" XML_Guid="{68472159-49C2-4632-B21D-25A913FE3936}" />
                            <Event Name="MceRemote.Mce.Radio" XML_Guid="{4E72DB0B-9159-42BC-AF5C-559BA2757561}" />
                            <Event Name="MceRemote.Mce.TV" XML_Guid="{C8F563B5-FB2E-414D-BEAD-5F18D8B8BA93}" />
                            <Event Name="MceRemote.Mce.Pound" XML_Guid="{E920AF75-3105-469E-8AFE-0C56715D6E3D}" />
                            <Action Name="Set eg.globals.harm_act_triggered" XML_Guid="{0172616A-70C9-4BD2-8FE7-472A2517E050}">
                                EventGhost.PythonScript(u'#test\n#eg.event.string = "Videos"\n#print eg.event.string\n#/test\neg.globals.harm_act_last = eg.globals.harm_act\nif ("Videos" or "HTPC+AVR+TV") in eg.event.string:\n    eg.globals.harm_act_triggered = "HTPC+AVR+TV"\nelif ("Pictures" or "HTPC+AVR+Beamer") in eg.event.string:\n    eg.globals.harm_act_triggered = "HTPC+AVR+Beamer"\nelif ("Radio" or "HTPC+TV") in eg.event.string:\n    eg.globals.harm_act_triggered = "HTPC+TV"\nelif ("Pound" or "Streaming") in eg.event.string:\n    eg.globals.harm_act_triggered = "Streaming"\nelse:\n    eg.globals.harm_act_triggered = "ELSEfucked"\nprint "-------- New Hamony Routing: "+str(eg.globals.harm_act_triggered)\ndef reenable_harmony_routing():\n    import time\n    time.sleep(60)\n    eg.globals.harm_act_active = 1\neg.scheduler.AddTask(0.0, reenable_harmony_routing)\nif eg.globals.harm_act_active:\n    eg.globals.harm_act = eg.globals.harm_act_triggered\n    eg.globals.forcedrestartkodi = 0\n    eg.globals.forcedrestartmp = 0\n    eg.TriggerEvent(eg.globals.harm_act,prefix="cust_eg",payload=eg.globals.harm_act)\nelse:\n    print "Skip because of repeat"\n    eg.StopMacro()')
                            </Action>
                            <Action XML_Guid="{811C19FB-169F-4DBE-834B-1C30A090D291}">
                                FileOperations.Write(2, u'{eg.globals.harm_act_last}', u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.harm_act_last.txt', 0, 0, False, False, False, 'cp1252')
                            </Action>
                            <Action XML_Guid="{98913962-26F3-4A89-B738-143DF35DC148}">
                                EventGhost.DisableItem(eg.GUID('{A434218E-D2D5-44A8-AD9B-6A50C8B7EDC9}'))
                            </Action>
                            <Action XML_Guid="{CB3A8ED0-FA34-4091-B865-DA576A3994E7}">
                                EventGhost.NewJumpIf(eg.GUID('{5E00741D-28FE-44AB-A692-559BCFC0DEC8}'), 2, True)
                            </Action>
                            <Action Enabled="False" XML_Guid="{61E1E477-E716-4C2D-8018-219BF48D0469}">
                                EventGhost.NewJumpIf(eg.GUID('{44040479-B0CC-4AE8-89E1-E2E8110A9E54}'), 2, True)
                            </Action>
                            <Action XML_Guid="{532ABDEA-5EF4-47C9-A301-B6BE3011287E}">
                                SchedulGhost.RunScheduleImmediately(u'routing_delayedactions', True)
                            </Action>
                            <Action XML_Guid="{F614A2F8-4808-45E7-B5E8-13FE494445B2}">
                                EventGhost.PythonCommand(u"eg.plugins.SSH.AddHost(u'mmrp01', 22, u'MYUSERNAME', u'MYPASSW', u'mmrp01', u'Log', True, True)")
                            </Action>
                        </Macro>
                        <Macro Name="Streaming" XML_Guid="{2AD18683-1601-4E03-A98C-07842F5BE305}">
                            <Event Name="cust_eg.Streaming" XML_Guid="{D1E0577F-AC9F-4D8E-8EB7-4F442FDB4567}" />
                            <Action XML_Guid="{8C56C3AC-EF14-40F6-8B79-930DB57513A0}">
                                EventGhost.NewJumpIf(eg.GUID('{496C2D03-1FF0-4761-A46F-68DDB1C108B2}'), 2, True)
                            </Action>
                            <Action XML_Guid="{5319514B-00FB-45BB-B8F9-8F081278E82A}">
                                EventGhost.NewJumpIf(eg.GUID('{D26BD586-F0B3-413D-BF41-600E8B631EFE}'), 2, True)
                            </Action>
                            <Action XML_Guid="{09A1333D-EB86-4CC9-8793-362E83B78AC5}">
                                SchedulGhost.RunScheduleImmediately(u'routing_delayedactions_noavr', True)
                            </Action>
                        </Macro>
                        <Macro Name="HTPC+" XML_Guid="{B310F914-21AF-4B26-A18D-68AE29531948}">
                            <Event Name="cust_eg.HTPC+AVR+TV" XML_Guid="{367E5AA5-982D-48A0-8BBB-C849EBDD6703}" />
                            <Event Name="cust_eg.HTPC+AVR+Beamer" XML_Guid="{B89A16C3-FD93-48C7-95E4-847A64C31C74}" />
                            <Event Name="cust_eg.HTPC+TV" XML_Guid="{3E0CEAEB-3105-4BC7-A811-FBB7469E5C30}" />
                            <Action Name="Set htpc harm act start variables" XML_Guid="{442E2B67-8C3A-475B-A6D1-DB1179280C10}">
                                EventGhost.PythonScript(u'eg.globals.fullscreen = 0\neg.globals.dimension = "2D"\neg.globals.standby_osd_delay = 90.0')
                            </Action>
                            <Action XML_Guid="{D46C37AF-5EA9-48BD-89EA-64AE73A64FCA}">
                                FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.htpcapp_last.txt', 0, 0, 'cp1252', 1, False, 1)
                            </Action>
                            <Action Name="Process htpcapp_last from file" XML_Guid="{648D4A17-CBEE-40C0-B443-D96D729AE8AB}">
                                EventGhost.PythonScript(u'#eg.plugins.FileOperations.Read(0, u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.htpcapp_last.txt\', 0, 0, \'cp1252\', 1, False, 1)\n#print type(eg.result)\nprint "eg.result = "+str(eg.result)\neg.globals.htpcapp_last = str(eg.result)\n#print eg.globals.htpcapp_last\n#print type(eg.globals.htpcapp_last)\nif not eg.globals.htpcapp_last == "kodi":\n    if not eg.globals.htpcapp_last == "mp":\n        print "Warning: Last htpcapp not logged propperly"\neg.globals.htpcapp = eg.globals.htpcapp_last\ndef setosd():\n    eg.TriggerEvent ("setosd."+eg.globals.htpcapp, prefix="htpc")\neg.scheduler.AddTask(0.0, setosd)\neg.TriggerEvent ("htpcapp_last."+eg.globals.htpcapp_last, prefix="logfile")')
                            </Action>
                            <Action Name="Startloop" XML_Guid="{7FDBBD20-E7B0-400D-917A-69E35EE4721C}">
                                EventGhost.PythonScript(u'#interrupt if failsaverestart\nif eg.globals.failsaverestart:\n    print "This is a falesave restart - skipping start loop"\n    #eg.StopMacro()\n    eg.Exit()\nimport time\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\nif eg.globals.kodi_running or eg.globals.mp_running:\n    eg.globals.htpcapp_running = 1\nelse:\n    eg.globals.htpcapp_running = 0\n#\nstarttext = "Starte"\nosd_position_x = 4\nosd_position_y = 0\ndef setosd():\n    eg.TriggerEvent ("setosd."+eg.globals.htpcapp, prefix="htpc")\neg.scheduler.AddTask(0.0, setosd)\neg.globals.endloop_interrupt = 1\neg.globals.preendloop_interrupt = 1\neg.globals.startloop_interrupt = 0\n# check app / start image\neg.plugins.System.DisplayImage(eg.globals.def_bg, 3, 1, False, False, 0, True, 4, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'act_start\')\nif eg.globals.htpcapp_last == "kodi":\n    if not eg.globals.kodi_running:\n        eg.plugins.System.Execute(u\'C:\\\\Program Files (x86)\\\\Kodi\\\\Kodi.exe\', u\'\', 0, False, 2, u\'\', False, False, u\'\', False, False, False)\nelif eg.globals.htpcapp_last == "mp":\n    if not eg.globals.mp_running:\n        eg.plugins.System.Execute(u\'C:\\\\Program Files (x86)\\\\Team MediaPortal\\\\MediaPortal\\\\MediaPortal.exe\', u\'\', 0, False, 2, u\'C:\\\\Program Files (x86)\\\\Team MediaPortal\\\\MediaPortal\', False, False, u\'\', False, False, False)\n# kill off image\neg.plugins.System.HideImage(u\'off\')\n#\nif not eg.globals.harm_act == "OFF":\n    eg.globals.harm_act_switch = 1\n    print "eg.globals.harm_act_switch = "+str(eg.globals.harm_act_switch)\n    eg.globals.starttext = "Neues AV-ROUTING:  "+str(eg.globals.harm_act)+" mit "+str(eg.globals.htpcapp)\nelse:\n    eg.globals.harm_act_switch = 0\n    eg.globals.starttext = "STARTE:  "+str(eg.globals.harm_act)+" mit "+eg.globals.htpcapp\ndef startloop():\n    import time\n    if eg.globals.htpcapp_running:\n        outer_loop_max = 3\n        inner_loop_max = 5\n    else:\n        outer_loop_max = 4\n        inner_loop_max = 5\n    if not eg.globals.startloop_interrupt:\n        for y in range (0, outer_loop_max):\n            if not eg.globals.startloop_interrupt:\n                print "OUTER startloop eg.globals.starttext, run "+str(y+1)+"/"+str(inner_loop_max)\n                for x in range(0, inner_loop_max):\n                    print "inner startloop eg.globals.starttext, run "+str(y+1)+"-"+str(x+1)\n                    if not eg.globals.startloop_interrupt:\n                        eg.plugins.EventGhost.ShowOSD(u\'{starttext} \'+x*"."+(inner_loop_max-x)*" ", eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_vol_pos_startscreen, (eg.globals.osd_vol_startscreen_x, eg.globals.osd_vol_startscreen_y), 0, 1.0, False)\n                        time.sleep(.500)\n                    else:\n                        x = inner_loop_max\n                        eg.plugins.EventGhost.ShowOSD(u\' \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, 5, (0, 200), 0, 0.1, False)\n                        print "inner startloop: eg.globals.preendloop_interrupt ="+str(eg.globals.preendloop_interrupt)\n                        print "inner startloop interrupted"\n                #time.sleep(.500)\n            else:\n                        y = outer_loop_max\n                        eg.plugins.EventGhost.ShowOSD(u\' \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, 5, (0, 200), 0, 0.1, False)\n                        print "outer startloop: eg.globals.preendloop_interrupt ="+str(eg.globals.preendloop_interrupt)\n                        print "outer startloop interrupted"\n        time.sleep(.500)\n        eg.plugins.System.HideImage(u\'act_start\')\n    else:\n        eg.plugins.System.HideImage(u\'act_start\')\n    time.sleep(.500)\n    eg.plugins.System.HideImage(u\'act_start\')\neg.scheduler.AddTask(0.0, startloop)\neg.globals.failsaverestart = 1\ndef reset_failsaverestart():\n    import time\n    time.sleep(10)\n    eg.globals.failsaverestart = 0\neg.scheduler.AddTask(0.0, reset_failsaverestart)')
                            </Action>
                            <Action Name="Command: Lightsout: Server wecken" XML_Guid="{8BA951CD-9A35-4493-A0CB-0D625DE70579}">
                                System.Execute(u'D:\\Programmdaten\\Lightsout\\Scripts\\wake.bat', u'-w', 3, False, 2, u'C:\\Program Files\\Windows Server\\Bin', False, False, u'', False, False, False, False)
                            </Action>
                            <Action XML_Guid="{975EA820-5AF4-4C60-A022-F5770FB3C167}">
                                EventGhost.EnableExclusive(eg.GUID('{C30E7D4D-488F-405A-84F7-7840E24E3D79}'))
                            </Action>
                            <Action XML_Guid="{3BC34255-1B9D-4504-B276-5BE6C90B02E7}">
                                EventGhost.EnableExclusive(eg.GUID('{44040479-B0CC-4AE8-89E1-E2E8110A9E54}'))
                            </Action>
                            <Action XML_Guid="{C868B576-366A-413E-91DE-CB7D30B42718}">
                                EventGhost.EnableItem(eg.GUID('{90A300C7-F157-4CE2-BE5A-93DDF0A63CE9}'))
                            </Action>
                            <Action XML_Guid="{7CC38B33-4C0A-4CEB-B8B1-A838390CC13E}">
                                EventGhost.NewJumpIf(eg.GUID('{83E66E69-EAE7-4F27-AE5C-560640B8AD15}'), 2, True)
                            </Action>
                            <Action XML_Guid="{FDD37FA4-3B03-4972-A44C-9924542214CE}">
                                EventGhost.EnableItem(eg.GUID('{ED7EEFC2-B9B6-40C5-AA3A-D109C65F33DD}'))
                            </Action>
                            <Action XML_Guid="{2222AAD9-95C7-4FDD-A3B5-1A3A204E18F7}">
                                EventGhost.EnableItem(eg.GUID('{371C5200-2251-4C37-8A27-2869CAF438CF}'))
                            </Action>
                            <Action Enabled="False" XML_Guid="{4C1927C3-47E1-40D4-BF30-EC4A463AA980}">
                                System.HideImage(u'off')
                            </Action>
                            <Action XML_Guid="{BE8F68F1-96EE-4CA0-A97B-D265CCCFCA40}">
                                SchedulGhost.RunScheduleImmediately(u'routing_delayedactions_htpc', True)
                            </Action>
                        </Macro>
                        <Macro Name="HTPC+AVR+TV" XML_Guid="{A20146FA-30CE-4C9F-9F39-8FC3114CE57D}">
                            <Event Name="cust_eg.HTPC+AVR+TV" XML_Guid="{CD4755DC-1E52-4AC4-A240-9943BF63C96C}" />
                            <Action XML_Guid="{79584952-A2AC-483B-94D8-429C6EB6D88C}">
                                EventGhost.NewJumpIf(eg.GUID('{96298C76-1A72-4248-95A4-7CD1168D3859}'), 2, True)
                            </Action>
                            <Action XML_Guid="{5C2F5E0C-B39D-4AF8-A019-1DC866F13A85}">
                                EventGhost.NewJumpIf(eg.GUID('{A4F48E52-D6FA-4A71-A84D-7E483F1EC1A4}'), 2, True)
                            </Action>
                        </Macro>
                        <Macro Name="HTPC+AVR+Beamer" XML_Guid="{9E2075B3-1661-4808-9BCC-A9990B834A3B}">
                            <Event Name="cust_eg.HTPC+AVR+Beamer" XML_Guid="{5E93EDA8-D48C-4959-82B0-4BFE1C45D845}" />
                            <Action XML_Guid="{A0E07F9F-825F-4B9F-9035-7D87CD90ED0B}">
                                SchedulGhost.ForceScheduleImmediately(u'BeamerStartPhase', True)
                            </Action>
                            <Action XML_Guid="{5C0C0AF0-D8CE-487F-B8B1-F63B454090C6}">
                                EventGhost.NewJumpIf(eg.GUID('{96298C76-1A72-4248-95A4-7CD1168D3859}'), 2, True)
                            </Action>
                            <Action XML_Guid="{0C6BDC43-300D-4B36-99A3-D710772B0A9D}">
                                EventGhost.NewJumpIf(eg.GUID('{44D4F852-11F4-477C-80BF-A9856A09141F}'), 2, True)
                            </Action>
                        </Macro>
                        <Macro Name="HTPC+TV" XML_Guid="{B2331156-74E1-40A0-AF0D-F7E41B6EC901}">
                            <Event Name="cust_eg.HTPC+TV" XML_Guid="{44A64375-C74B-4E00-8262-93E2105559B0}" />
                            <Action XML_Guid="{8167AEA8-9563-4AB1-B7B7-8B9FD9BE3682}">
                                EventGhost.NewJumpIf(eg.GUID('{578A4DE3-8B77-4E73-AEEE-EB1DA145CCF8}'), 2, True)
                            </Action>
                            <Action XML_Guid="{8DA89AA4-4C60-4FE2-AD8E-6E767CA19FD9}">
                                EventGhost.NewJumpIf(eg.GUID('{A4F48E52-D6FA-4A71-A84D-7E483F1EC1A4}'), 2, True)
                            </Action>
                            <Action XML_Guid="{B5E77E98-6EB0-40F3-A908-66D19190726D}">
                                SchedulGhost.RunScheduleImmediately(u'routing_delayedactions_noavr', True)
                            </Action>
                        </Macro>
                        <Macro Name="Externe Aktion" XML_Guid="{A5D4F788-E760-41AA-9DBE-0429C3D3BC86}">
                            <Event Name="cust_eg.ELSE" XML_Guid="{1E9CE42F-196E-45E2-9A21-F415F94C834E}" />
                        </Macro>
                        <Macro Name="All_End" XML_Guid="{52EE1B14-0C1D-4EE5-A840-99F2ED94A2B8}">
                            <Event Name="cust_eg.*" XML_Guid="{F7B4750C-A5D9-42A9-97BB-4AA9C939D1D0}" />
                            <Action Name="Log HarmonyAction" XML_Guid="{68CA5D1E-5FF6-4166-99D2-836F8E6826F0}">
                                FileOperations.Write(2, u'{eg.globals.harm_act}', u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.harm_act.txt', 0, 0, True, False, False, 'cp1252')
                            </Action>
                            <Action XML_Guid="{93AE3B6A-F209-4A64-8155-FE7A7519DC84}">
                                StandbyControl.EnableStandbyByApplication(u'sleep', True, 0, 60, 0, 600)
                            </Action>
                            <Action Name="Check iMon" XML_Guid="{591198A1-389F-4EBD-89EA-F3CA91637982}">
                                EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.iMon_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="iMon.exe"\') ) &gt; 0\nprint eg.globals.iMon_running\nif not eg.globals.iMon_running:\n    print "iMon has to be started"\n    eg.plugins.System.Execute(u\'C:\\\\Program Files (x86)\\\\SoundGraph\\\\iMON\\\\iMON.exe\', u\'\', 0, False, 2, u\'C:\\\\Program Files (x86)\\\\SoundGraph\\\\iMON\', False, False, u\'\', False, False, False)\nelse:\n    print "iMon was running"')
                            </Action>
                            <Action XML_Guid="{F429681A-9265-4B79-8186-ACF26B5746A1}">
                                EventGhost.DisableItem(eg.GUID('{C8429847-2B16-4A88-88D7-63A52090459F}'))
                            </Action>
                            <Action XML_Guid="{039DE52A-1D6B-4378-A3CC-545EF30BA404}">
                                SchedulGhost.RunScheduleImmediately(u'routing_delayedactions_reenable', True)
                            </Action>
                            <Action XML_Guid="{8E8863D2-F4EE-4A4C-9412-BF1BEE207767}">
                                System.HideImage(u'off')
                            </Action>
                        </Macro>
                    </Folder>
                    <Folder Name="AudioVideoRouting" XML_Guid="{C79BCDBC-43B2-412E-B692-EEEB202CEDF7}" Expanded="True">
                        <Folder Name="Anzeige-Profile" XML_Guid="{DBD9DE5A-5695-475A-858E-CAD74D36CAF2}">
                            <Folder Name="Startaktionen" XML_Guid="{0DFE3EB4-D66A-44EB-B145-C6C07A069018}">
                                <Macro Name="Startaktion Bild auf Beamer" XML_Guid="{44D4F852-11F4-477C-80BF-A9856A09141F}">
                                    <Action XML_Guid="{D69CD15D-FC8E-4A0E-8A1E-95D7F3793DD7}">
                                        EventGhost.NewJumpIf(eg.GUID('{9E6ACE32-D392-4D17-8349-B993DAF6F505}'), 2, True)
                                    </Action>
                                    <Action XML_Guid="{ECC20DD4-8F36-4F45-AC38-7A067D332E66}">
                                        EventGhost.EnableItem(eg.GUID('{AC74D827-3996-4873-BEB4-8A4F4A3C9062}'))
                                    </Action>
                                    <Action XML_Guid="{25BF4A47-9214-49E4-BE31-3B54C0FFEC51}">
                                        EventGhost.DisableItem(eg.GUID('{670272D8-8967-44F3-96F1-3D3718A4BB62}'))
                                    </Action>
                                </Macro>
                                <Macro Name="Startaktion Bild auf TV" XML_Guid="{A4F48E52-D6FA-4A71-A84D-7E483F1EC1A4}" Expanded="True">
                                    <Action XML_Guid="{FD3DEA67-AEF9-4B83-9129-7541FACD583B}">
                                        EventGhost.DisableItem(eg.GUID('{AC74D827-3996-4873-BEB4-8A4F4A3C9062}'))
                                    </Action>
                                    <Action XML_Guid="{AF41BD05-6002-40BE-9AE2-835BCB2B3954}">
                                        EventGhost.EnableItem(eg.GUID('{670272D8-8967-44F3-96F1-3D3718A4BB62}'))
                                    </Action>
                                    <Action XML_Guid="{8D209B38-2331-4FCE-8BD5-E10E21CE250B}">
                                        EventGhost.PythonCommand(u'eg.globals.dimension = "2D"')
                                    </Action>
                                </Macro>
                            </Folder>
                            <Folder Name="Modi" XML_Guid="{42344ADB-4B89-47B0-B9A3-C7938BB11987}" Expanded="True">
                                <Folder Name="Alle" XML_Guid="{50F76E80-6ECB-4890-960F-98E7A20F316A}" Expanded="True">
                                    <Macro Name="Show Volume OSD generic" XML_Guid="{35FA2B7C-ADF3-42AE-8EC3-4DB7BD4D7379}">
                                        <Event Name="avr_control.sc_AVR_Volume_up_down.show_osd_generic" XML_Guid="{B72CF32B-B792-482C-A1B1-0A2C1F9FC290}" />
                                        <Event Name="avr_control.sc_AVR_Volume_up_down.show_osd_generic_preOSD" XML_Guid="{05FC02CC-1CD4-48C4-85ED-F9A37A2E6162}" />
                                        <Event Name="system_control_volume.sc_SystemVolumeControlUpDown.show_osd_generic" XML_Guid="{8C052A1E-E071-4280-813B-C1F4FD2C2E02}" />
                                        <Event Name="system_control_volume.sc_SystemVolumeControlUpDown.show_osd_generic_preOSD" XML_Guid="{051C063B-9272-4F08-8F93-FFCD3162FDAD}" />
                                        <Event Name="system_control_volume.sc_SystemVolumeControl UpDown.show_osd_generic_preOSD" XML_Guid="{99B324B3-6AF0-41CB-A9FE-E4845ECF9B2D}" />
                                        <Event Name="avr_control.sc_HandleDirectAVRVolumeControl.show_osd_generic" XML_Guid="{3AB2078E-8CBA-41FB-B615-41706F829CA4}" />
                                        <Action Name="Show Volume OSD generic" XML_Guid="{8AA86138-4918-4D07-8662-547913C48C53}">
                                            EventGhost.PythonScript(u'#show osd for the different audio and screen modes and htpc apps\nscriptname = "show OSD generic"\nimport time\nfrom datetime import datetime\n#\n#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug: #ein Wert muss immer aktiv sein\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    print "!!!!!!!!!!!!!!!!!!!!------------- Debug aktiv -------------!!!!!!!!!!!!!!!!!!!"\n    #test\n    #eg.globals.fullscreen = 1\n    #/test\n#/debug\n#\n#set vars\neg.globals.vol_direction_control = 1\n#set modes\nif "preOSD" in eg.event.string:\n    preOSD = 1\nelse:\n    preOSD = 0\n## audio devices\nif eg.globals.headset_active:\n    eg.globals.audiomode = "headset"\n    eg.globals.pretext = "Audio Headset"\n    eg.globals.volume = eg.globals.systemvolumelevel\n    eg.globals.systemvolumelevel_set = eg.globals.systemvolumelevel\nelif not "AVR" in eg.globals.harm_act:\n    eg.globals.audiomode = "system"\n    eg.globals.pretext = "Audio TV"\n    eg.globals.volume = eg.globals.systemvolumelevel\n    eg.globals.systemvolumelevel_set = eg.globals.systemvolumelevel \nelif "AVR" in eg.globals.harm_act:\n    eg.globals.audiomode = "avr"\n    eg.globals.pretext = "Audio Amp"\n    eg.globals.volume = eg.globals.amp_volume\nelse:\n    print "Can\'t determine audiomode - something wrong?"\nif eg.globals.volume &gt;= eg.globals.volmax:\n    eg.globals.volume = str(eg.globals.volume)+ "(Max)"\nif "Beamer" in eg.globals.harm_act:\n    beamer = 1\nelse:\n    beamer = 0\n\n#set osd vars\nif eg.globals.avr_action:\n    show_osd_duration = 1.5\nelse:\n    show_osd_duration = 3.0\neg.globals.osd_font_string = \'0;%d;0;0;0;%d;0;0;0;0;3;2;1;34;%s\' % (eg.globals.osd_vol_font_size, eg.globals.osd_vol_font_bold_weight, eg.globals.osd_font) \nif not eg.globals.fullscreen:\n    OSDText = eg.globals.pretext+":  "+str(eg.globals.volume)\n    osd_skin = None\n    osd_x = eg.globals.osd_vol_x\n    osd_y = eg.globals.osd_vol_y\n    osd_vol_pos = eg.globals.osd_vol_pos \nelse:\n    OSDText = "    "+eg.globals.pretext+":   "+"|"*int(eg.globals.volume)+" "+str(eg.globals.volume)+" "+"."*(eg.globals.volmaxcalc-eg.globals.volume)+"    "\n    osd_skin = eg.globals.osd_skin\n    osd_x = eg.globals.osd_vol_fscreen_x\n    osd_y = eg.globals.osd_vol_fscreen_y\n    osd_vol_pos = eg.globals.osd_vol_pos_fscreen     \n#\n#log\nif debug:\n    print "preOSD = "+str(preOSD)\n    print "audiomode = "+str(eg.globals.audiomode)\n    print "eg.globals.pretext = "+str(eg.globals.pretext)\n    print "eg.globals.volume = "+str(eg.globals.volume)\n    print "eg.globals.volmax = "+str(eg.globals.volmax)\n    print "eg.globals.volmaxcalc = "+str(eg.globals.volmaxcalc)\n    print "eg.globals.harm_act = "+str(eg.globals.harm_act)\n    print "htpc app = "+str(eg.globals.htpcapp)\n    print "beamer = "+str(beamer)\n    print "screen dimension = "+eg.globals.dimension\n    print "fullscreen = "+str(eg.globals.fullscreen)\n    print "eg.globals.osd_skin: "+eg.globals.osd_skin\n    print "eg.globals.osd_font: "+eg.globals.osd_font\n    print "eg.globals.osd_vol_font_size: "+str(eg.globals.osd_vol_font_size)\n    print "eg.globals.osd_vol_font_size_fscreen: "+str(eg.globals.osd_vol_font_size_fscreen)\n    print "eg.globals.osd_vol_x: "+str(eg.globals.osd_vol_x)\n    print "eg.globals.osd_vol_y: "+str(eg.globals.osd_vol_y)\n    print "eg.globals.osd_vol_fscreen_x: "+str(eg.globals.osd_vol_fscreen_x)\n    print "eg.globals.osd_vol_fscreen_y: "+str(eg.globals.osd_vol_fscreen_y)\n#\n#showing OSD\n#\nif debug: print "Showing OSD with Volume: "+str(eg.globals.volume)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#\nif eg.globals.dimension == "2D":\n    eg.plugins.EventGhost.ShowOSD(OSDText, eg.globals.osd_font_string, eg.globals.osd_font_color, None, osd_vol_pos, (osd_x, osd_y), 0, show_osd_duration, osd_skin)\nelif eg.globals.dimension == "3D":\n    if eg.globals.volume &gt;= eg.globals.volmax:\n        eg.plugins.MediaPortal.Ok()\n        eg.plugins.MPMessageSender.SendMessage(u\'{eg.globals.pretext}: \', u\'Maximum erreicht\', u\'\', 1, u\'D:\\\\Programmdaten\\\\Eventghost\\\\Icons\\\\607.png\')\n    else:\n        eg.plugins.MediaPortal.Ok()\n        eg.plugins.MPMessageSender.SendMessage(u\'{eg.globals.volume}\', u\'{eg.globals.pretext}: \', u\'\', 1, u\'D:\\\\Programmdaten\\\\Eventghost\\\\Icons\\\\607.png\')\n#\ndef disable_vol_direction_control():\n    import time\n    debug = eg.globals.debug\n    if debug: from datetime import datetime\n    time.sleep(3)\n    eg.globals.show_pre_osd = 1\n    eg.globals.vol_direction_control = 0\n    if debug: print "Reseting eg.globals.show_pre_osd to "+str(eg.globals.show_pre_osd)+" and eg.globals.vol_direction_control to "+str(eg.globals.vol_direction_control)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\nif not preOSD:\n    eg.scheduler.AddTask(0.0, disable_vol_direction_control)\n# Script end\nif debug:\n    print "!!!!!!!!!!!!!!!!!!!!------------- Debug aktiv -------------!!!!!!!!!!!!!!!!!!!"\n    from datetime import datetime\n    print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])')
                                        </Action>
                                        <Action Enabled="False" XML_Guid="{F4D4EEC4-1048-41B4-A825-ED1BE78971EC}">
                                            EventGhost.ShowOSD(u'Fuck off', u'0;-35;0;0;0;400;0;0;0;0;3;2;1;34;MC360', (255, 255, 255), None, 1, (120, 10), 0, 3.0, u'mp')
                                        </Action>
                                        <Action XML_Guid="{5E4F71C7-19DD-4048-9DA5-19C5CAA92DE6}">
                                            EventGhost.EnableExclusive(eg.GUID('{08B527D5-7AA2-4D86-9DA6-EB8AC99ABF19}'))
                                        </Action>
                                        <Action XML_Guid="{2F090524-F0DD-4891-8071-852F804840A4}">
                                            EventGhost.EnableExclusive(eg.GUID('{2BBC7956-3BB7-44E3-B940-D8589AD6439D}'))
                                        </Action>
                                        <Action XML_Guid="{A3C12A82-2F4C-4EDE-B2B4-F60363C211DC}">
                                            EventGhost.EnableExclusive(eg.GUID('{E624B92A-391B-4747-82A7-46FA1FCB9C35}'))
                                        </Action>
                                    </Macro>
                                </Folder>
                                <Folder Name="Bild auf TV" XML_Guid="{670272D8-8967-44F3-96F1-3D3718A4BB62}">
                                    <Folder Name="Mute Anzeige TV " XML_Guid="{702565BE-D8A4-4976-BF12-62C463D9FF46}">
                                        <Folder Name="Mute Toggle" XML_Guid="{67DC608C-2712-40A9-9F53-7DB2D1CB29FE}" Expanded="True">
                                            <Macro Name="Mute on" XML_Guid="{08B527D5-7AA2-4D86-9DA6-EB8AC99ABF19}">
                                                <Event Name="System.Mute" XML_Guid="{59396742-3596-4225-AF5B-1404FEC3800A}" />
                                                <Event Name="avr.control.mute_toggle" XML_Guid="{3C68D16C-9B99-41A7-9C21-87EEB98E017C}" />
                                                <Event Name="avr_control.sc_HandleDirectAVRVolumeControl.show_osd_mute" XML_Guid="{643BDFE8-8FF8-4FEC-8013-ED8CA3BFC138}" />
                                                <Action XML_Guid="{42218050-90BA-4E46-992F-B75FFC89A128}">
                                                    EventGhost.ShowOSD()
                                                </Action>
                                                <Action XML_Guid="{E716B853-E4DE-4DEB-8FF6-8CE022DD0497}">
                                                    EventGhost.EnableExclusive(eg.GUID('{14F0D4F9-56A5-42FA-8520-60AD94DDF044}'))
                                                </Action>
                                            </Macro>
                                            <Macro Name="Mute off" Enabled="False" XML_Guid="{14F0D4F9-56A5-42FA-8520-60AD94DDF044}">
                                                <Event Name="System.UnMute" XML_Guid="{6A862ECA-0416-4804-ABC0-0DFB6FC1063D}" />
                                                <Event Name="avr.control.mute_toggle" XML_Guid="{4FF41D66-F1B1-4721-A5ED-5A0DA8A403FC}" />
                                                <Event Name="MceRemote.Mce.VolumeUp" XML_Guid="{60D4C375-2FD1-4CF0-8F25-C5948E1748BD}" />
                                                <Event Name="MceRemote.Mce.VolumeDown" XML_Guid="{C49975E0-5987-4512-8BE9-8CBE22C6A83C}" />
                                                <Event Name="avr_control.sc_HandleDirectAVRVolumeControl.show_osd_mute" XML_Guid="{03C10B36-C8E8-4172-BCA9-C63D42F5862A}" />
                                                <Action XML_Guid="{40178736-B571-42B2-8CF7-E164071DEB2C}">
                                                    EventGhost.ShowOSD()
                                                </Action>
                                                <Action XML_Guid="{E5F28D39-DA8F-4FB8-BFC6-79461E5CF33D}">
                                                    EventGhost.EnableExclusive(eg.GUID('{08B527D5-7AA2-4D86-9DA6-EB8AC99ABF19}'))
                                                </Action>
                                            </Macro>
                                        </Folder>
                                    </Folder>
                                </Folder>
                                <Folder Name="Bild auf Beamer" Enabled="False" XML_Guid="{AC74D827-3996-4873-BEB4-8A4F4A3C9062}">
                                    <Folder Name="Dimension" XML_Guid="{DBDB501F-B96E-445D-BC02-F7069A6C2304}" Expanded="True">
                                        <Macro Name="2D" XML_Guid="{9E6ACE32-D392-4D17-8349-B993DAF6F505}">
                                            <Event Name="Main.Auto3D.Fmt2D" XML_Guid="{AD0852A3-E169-403B-BBAE-2BEECC716CB0}" />
                                            <Action XML_Guid="{594EE94C-9CFB-4900-A360-46576BEDB498}">
                                                EventGhost.EnableExclusive(eg.GUID('{7D9CA5F3-0FC9-4F0D-BE2D-712247D4B439}'))
                                            </Action>
                                            <Action XML_Guid="{6D356693-105C-4F7B-B501-46F342A53D84}">
                                                EventGhost.PythonCommand(u'eg.globals.dimension = "2D"')
                                            </Action>
                                            <Action XML_Guid="{9002D291-6358-4716-B33B-E786B4938AEA}">
                                                EventGhost.EnableExclusive(eg.GUID('{A2CADF01-0690-47B4-B36D-529056751394}'))
                                            </Action>
                                        </Macro>
                                        <Macro Name="3D" XML_Guid="{EFC9B66B-20A1-4494-9017-939A9315E998}">
                                            <Event Name="Main.Auto3D.Fmt3DSBS" XML_Guid="{357920C7-AE4F-48D7-87F1-297FAA43959B}" />
                                            <Action XML_Guid="{293A7249-CE0B-44F6-8CA9-CDEFBC1A4B81}">
                                                System.DisplayImage()
                                            </Action>
                                            <Action XML_Guid="{21D50837-DC48-462B-8C76-4F3BA4524AE1}">
                                                EventGhost.ShowOSD()
                                            </Action>
                                            <Action XML_Guid="{19BCCAA2-62BB-4FC7-ADE3-40106E8CD0F4}">
                                                EventGhost.Wait(3.0)
                                            </Action>
                                            <Action XML_Guid="{E29BC416-9B8B-4AC7-94BB-6B80259B10E4}">
                                                EventGhost.NewJumpIf(eg.GUID('{7D4B0AC3-8C7D-4B72-905B-4A4E8C866309}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{F18D522B-8DDB-414A-B36B-1305C3CC3C88}">
                                                EventGhost.EnableExclusive(eg.GUID('{2930D7D6-DB37-4A8E-A8B4-1EAC9D524D79}'))
                                            </Action>
                                            <Action XML_Guid="{ACEA05ED-CC58-4598-A398-572E70A7868A}">
                                                EventGhost.EnableExclusive(eg.GUID('{2BF5B403-8935-46D1-840A-BFFE34D10920}'))
                                            </Action>
                                            <Action XML_Guid="{AAD0473F-3933-4E16-80D6-0B49E3C9BF79}">
                                                EventGhost.PythonCommand(u'eg.globals.dimension = "3D"')
                                            </Action>
                                        </Macro>
                                        <Folder Name="Dimension Modes" XML_Guid="{F0EB113C-CE81-4040-BD71-9094D37D778A}">
                                            <Folder Name="2D" XML_Guid="{A2CADF01-0690-47B4-B36D-529056751394}" Expanded="True">
                                                <Folder Name="Handle Pause" XML_Guid="{1F58D175-F80B-40E9-BD52-31CBEB2AC901}" Expanded="True">
                                                    <Macro Name="Pause" XML_Guid="{4A64E33F-71E2-426C-A782-9C3D9879F90A}" Expanded="True">
                                                        <Event Name="Mediaportal.Pause" XML_Guid="{B382F3F8-95D5-494B-8713-11D99C6F6C02}" />
                                                        <Event Name="XBMC2.Player.OnPause.*" XML_Guid="{18A415DA-BFC2-4EF9-AC1C-55A20FBD1188}" />
                                                        <Action Enabled="False" XML_Guid="{719B25C6-BC14-4A54-88C1-10BEDEB48F14}">
                                                            EventGhost.PythonCommand(u"eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command 22977625 EcoBlank', u'mmrp01', False, False, False)")
                                                        </Action>
                                                        <Action XML_Guid="{34CE5FC0-5B79-412F-AB39-98D8069E40C4}">
                                                            EventGhost.EnableExclusive(eg.GUID('{1BB59776-AD27-4C3F-B86A-BA3B0C1AC68E}'))
                                                        </Action>
                                                    </Macro>
                                                    <Macro Name="Resume" Enabled="False" XML_Guid="{1BB59776-AD27-4C3F-B86A-BA3B0C1AC68E}" Expanded="True">
                                                        <Event Name="Mediaportal.Resume" XML_Guid="{0A7C034F-1780-4DC6-9F19-9B6E5FE596A9}" />
                                                        <Event Name="Mediaportal.Play" XML_Guid="{7766E3AA-4326-4B40-B5AC-E9F8AB70E5C1}" />
                                                        <Event Name="Mediaportal.Stop" XML_Guid="{0F9AE5FE-B6C0-43D5-91D7-A8CE29D5B913}" />
                                                        <Event Name="XBMC2.Player.OnStop.*" XML_Guid="{D6C11B64-A26B-426D-A729-9F1B94B954B2}" />
                                                        <Event Name="XBMC2.Player.OnPlay.*" XML_Guid="{5703E803-687A-4BD1-8C3F-B4BBE6724725}" />
                                                        <Event Name="XBMC2.GUI.OnScreensaverDeactivated" XML_Guid="{B0BBA02C-147B-4084-9E2B-A2BA6037B456}" />
                                                        <Action Enabled="False" XML_Guid="{62FA538A-9FD5-49C8-91F5-CD978C3E1A75}">
                                                            EventGhost.PythonCommand(u"eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command 22977625 EcoBlank', u'mmrp01', False, False, False)")
                                                        </Action>
                                                        <Action XML_Guid="{C0B19C84-BA5B-493B-80B3-AE00BC5E4256}">
                                                            EventGhost.EnableExclusive(eg.GUID('{4A64E33F-71E2-426C-A782-9C3D9879F90A}'))
                                                        </Action>
                                                    </Macro>
                                                </Folder>
                                            </Folder>
                                            <Folder Name="3D" Enabled="False" XML_Guid="{2BF5B403-8935-46D1-840A-BFFE34D10920}" />
                                        </Folder>
                                    </Folder>
                                    <Folder Name="Mute-Anzeige Beamer" XML_Guid="{88E9692A-35B9-4D54-B70D-8DB79AE160B3}">
                                        <Folder Name="Mute 2D" XML_Guid="{7D9CA5F3-0FC9-4F0D-BE2D-712247D4B439}" Expanded="True">
                                            <Folder Name="Mute Toggle" XML_Guid="{89315B9F-259F-424B-B9C4-DA70C24052A6}" Expanded="True">
                                                <Macro Name="Mute on" XML_Guid="{2BBC7956-3BB7-44E3-B940-D8589AD6439D}">
                                                    <Event Name="MceRemote.Mce.Mute" XML_Guid="{0CBB1E8E-B731-48F1-BB7C-E1778996629F}" />
                                                    <Event Name="avr_control.sc_HandleDirectAVRVolumeControl.show_osd_mute" XML_Guid="{81B872BB-BD39-4CC4-B5F6-A30AA15C875C}" />
                                                    <Action XML_Guid="{9E665AE3-F9D6-4A33-B465-A4BDD78BDEFA}">
                                                        EventGhost.ShowOSD()
                                                    </Action>
                                                    <Action XML_Guid="{31D2C21B-A91D-48D4-91BC-15177F6F92E7}">
                                                        EventGhost.EnableExclusive(eg.GUID('{E5942EAD-A1C5-4D92-B677-D2A6D30C795D}'))
                                                    </Action>
                                                </Macro>
                                                <Macro Name="Mute off" Enabled="False" XML_Guid="{E5942EAD-A1C5-4D92-B677-D2A6D30C795D}">
                                                    <Event Name="MceRemote.Mce.Mute" XML_Guid="{3C999D58-2321-4634-9156-985CD7DD9562}" />
                                                    <Event Name="MceRemote.Mce.VolumeUp" XML_Guid="{241DEB9D-B8FC-4FE7-B316-905E75E49659}" />
                                                    <Event Name="MceRemote.Mce.VolumeDown" XML_Guid="{7D688846-1801-4EA3-949E-227B05DA4F31}" />
                                                    <Event Name="avr_control.sc_HandleDirectAVRVolumeControl.show_osd_mute" XML_Guid="{1C54524A-D2F4-4C79-AE95-D47AEFAECFBC}" />
                                                    <Action XML_Guid="{01A3B0B7-31C7-412A-8B81-01385101ABD3}">
                                                        EventGhost.ShowOSD()
                                                    </Action>
                                                    <Action XML_Guid="{0A08DAE6-9C9A-46CE-A3F4-9410EA27EDE7}">
                                                        EventGhost.EnableExclusive(eg.GUID('{2BBC7956-3BB7-44E3-B940-D8589AD6439D}'))
                                                    </Action>
                                                </Macro>
                                            </Folder>
                                        </Folder>
                                        <Folder Name="Mute 3D" Enabled="False" XML_Guid="{2930D7D6-DB37-4A8E-A8B4-1EAC9D524D79}" Expanded="True">
                                            <Folder Name="Mute Toggle" XML_Guid="{DB29258F-CB6C-4C72-9608-159862E82954}" Expanded="True">
                                                <Macro Name="Mute on" XML_Guid="{E624B92A-391B-4747-82A7-46FA1FCB9C35}" Expanded="True">
                                                    <Event Name="MceRemote.Mce.Mute" XML_Guid="{B22358D9-2099-40AA-948D-1B125BC47B47}" />
                                                    <Event Name="avr_control.sc_HandleDirectAVRVolumeControl.show_osd_mute" XML_Guid="{27DC131A-DA8F-4462-B3A4-AE577C890454}" />
                                                    <Action XML_Guid="{E23B5A86-905C-41AF-B2AF-A3901DDE1653}">
                                                        MPMessageSender.SendMessage(u'Amp', u'Stumm gestellt', u'', 3, u'')
                                                    </Action>
                                                    <Action XML_Guid="{B4D29669-9CFA-4A67-B58B-C1C45EECBB10}">
                                                        EventGhost.EnableExclusive(eg.GUID('{A51071F8-2078-4520-B1E0-92EB92799437}'))
                                                    </Action>
                                                </Macro>
                                                <Macro Name="Mute off" Enabled="False" XML_Guid="{A51071F8-2078-4520-B1E0-92EB92799437}" Expanded="True">
                                                    <Event Name="MceRemote.Mce.Mute" XML_Guid="{178DC408-3595-4508-A152-E7E89FB1752C}" />
                                                    <Event Name="MceRemote.Mce.VolumeUp" XML_Guid="{E503200A-B463-4A91-802C-5093D49C0DC7}" />
                                                    <Event Name="MceRemote.Mce.VolumeDown" XML_Guid="{523AF792-72E1-4B03-8A0E-CAEDA347C120}" />
                                                    <Action XML_Guid="{6B8916C6-9208-42E3-BD70-F063E815C845}">
                                                        EventGhost.EnableExclusive(eg.GUID('{E624B92A-391B-4747-82A7-46FA1FCB9C35}'))
                                                    </Action>
                                                    <Event Name="avr_control.sc_HandleDirectAVRVolumeControl.show_osd_mute" XML_Guid="{DAC34287-C1AC-41E5-90C9-29A71AFCEB82}" />
                                                </Macro>
                                            </Folder>
                                        </Folder>
                                    </Folder>
                                </Folder>
                            </Folder>
                        </Folder>
                        <Folder Name="Audio-Profile" XML_Guid="{6B5F0D63-D479-4022-AE10-7A529EE4119F}" Expanded="True">
                            <Folder Name="Startaktionen" XML_Guid="{8A482B75-7142-4A1A-8986-C8C44ABF9899}" Expanded="True">
                                <Macro Name="Startaktion Audioausgabe TV" XML_Guid="{578A4DE3-8B77-4E73-AEEE-EB1DA145CCF8}">
                                    <Action Name="Block beacause of Headset active / jump to headset action" XML_Guid="{A1B49A40-A94B-4A67-A9FA-63F402AA3BC7}">
                                        EventGhost.PythonScript(u'scriptname = "Block_TV_Audio_Routing"\nif eg.globals.headset_active and eg.globals.headset_connected:\n    eg.plugins.EventGhost.ShowOSD(u\'    Audio auf Headset aktiviert    \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, 4, (0, 400), 0, 6, False)\n    eg.TriggerEvent ("activate_headset", prefix="audiorouting.sc_"+scriptname)\n    eg.StopMacro()\nelse:\n    eg.globals.headset_active = 0')
                                    </Action>
                                    <Action XML_Guid="{55A9FC4F-EE34-496F-8F69-7AE82F3A2A82}">
                                        Window.SendKeys(u'{Shift+Ctrl+Alt+O}', False, 2)
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{A288A8C4-A90E-48A8-B439-3A0CFE709C75}">
                                        EventGhost.Wait(0.5)
                                    </Action>
                                    <Action XML_Guid="{07901DB9-9AEE-455C-A093-40C4D82F79FD}">
                                        EventGhost.EnableItem(eg.GUID('{6A019378-2E02-4625-B3D5-118E1B1AC8D9}'))
                                    </Action>
                                    <Action XML_Guid="{2E885092-4354-4FC2-94DB-B04EDF250C56}">
                                        EventGhost.EnableItem(eg.GUID('{35FA2B7C-ADF3-42AE-8EC3-4DB7BD4D7379}'))
                                    </Action>
                                    <Action XML_Guid="{2A918B0E-793F-4F2C-8971-FF0915074FF6}">
                                        EventGhost.DisableItem(eg.GUID('{8361FC12-A318-4E38-97EB-D7B41FFCFC17}'))
                                    </Action>
                                    <Action XML_Guid="{A9BDBE6D-0157-4557-A60A-D3D469A32116}">
                                        EventGhost.NewJumpIf(eg.GUID('{5E5D1DE3-0EC5-44E5-8338-ECE9343C551B}'), 2, True)
                                    </Action>
                                    <Action XML_Guid="{B2EEEC92-D143-4328-A0B2-358083185C3D}">
                                        EventGhost.Wait(1.0)
                                    </Action>
                                    <Action XML_Guid="{ED3EF0C4-78ED-42CB-92CF-D2166AE91E9D}">
                                        EventGhost.NewJumpIf(eg.GUID('{96D41A4A-E107-4585-A248-C1CB4F32A31A}'), 2, True)
                                    </Action>
                                    <Action Name="Check if bitstreaming on" XML_Guid="{0E75D267-B1A5-4152-9DAC-6A772C1D644C}">
                                        EventGhost.PythonScript(u'#eg.globals.bitstreaming = eg.result\n#print "Logged bitstreaming status was: "+str(eg.globals.bitstreaming)\nif eg.globals.bitstreaming:\n    eg.result = 1\n    print "Bitstreaming was on"\nelse:\n    eg.result = 0\n    print "Bitstreaming was off"')
                                    </Action>
                                    <Action XML_Guid="{78D0430C-D39E-4925-9CF8-E0A2338159AA}">
                                        EventGhost.NewJumpIf(eg.GUID('{FF95E29B-7A27-4918-B2DE-8B96C150C2BE}'), 0, True)
                                    </Action>
                                    <Action Name="Check if mixing on" XML_Guid="{8FAA2C86-3E5B-40DF-989B-056539A619F7}">
                                        EventGhost.PythonScript(u'#eg.globals.lav_mixing = eg.result\n#print "Logged lav mixing status was: "+str(eg.globals.lav_mixing)\nif eg.globals.lav_mixing:\n    eg.result = 1\n    print "lav_mixing was on"\nelse:\n    eg.result = 0\n    print "lav_mixing was off"')
                                    </Action>
                                    <Action XML_Guid="{113F4609-A86A-4CD0-BF07-C63396D360E5}">
                                        EventGhost.NewJumpIf(eg.GUID('{823E525F-CD17-4A8A-A227-0B151DD3F071}'), 0, True)
                                    </Action>
                                    <Action Name="Set vars + volume + kodi audio settings" XML_Guid="{41E04067-9A92-4CB2-B8FB-E50FE968A473}">
                                        EventGhost.PythonScript(u'eg.globals.avr_action = 0\ndef Setvarsplusvolume():\n    import time\n    localtime = time.localtime()\n    #\n    scriptname = "Set vars + volume"\n    if eg.globals.debug: print "Running script: "+str(scriptname)\n    eg.globals.audiomode = "TV"\n    #volume\n    eg.globals.volmax = 100\n    eg.globals.volmaxcalc = eg.globals.volmax\n    daystart = 8\n    dayend = 22\n    dayvol = 50\n    nightvol = 35\n    if daystart &lt; localtime.tm_hour &lt; dayend:\n        eg.globals.systemvolumelevel_set = dayvol\n        print "Dayvolume set ("+str(eg.globals.systemvolumelevel_set)+"%)"\n    else:\n        eg.globals.systemvolumelevel_set = nightvol\n        print "Nightvolume set ("+str(eg.globals.systemvolumelevel_set)+"%)"\n    time.sleep(6)\n    eg.TriggerEvent ("Set_VolumeLevel_var", prefix="system.audiorouting")\neg.scheduler.AddTask(0.0, Setvarsplusvolume)\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\nkodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\nif kodi_running:\n    def kodiaudiosettings():\n        import time\n        time.sleep(2)\n        for x in range(0, 2):            \n            eg.TriggerEvent("setkodiaudio_amp", prefix = "system.audiorouting")\n            eg.TriggerEvent("kodisetting_channels_2_0", prefix = "system.audiorouting")\n            eg.TriggerEvent("kodisetting_outputconf_3", prefix = "system.audiorouting")\n            eg.TriggerEvent("bitstreaming_kodi_off", prefix = "system.audiorouting")\n            time.sleep(4)\n    eg.scheduler.AddTask(0.0, kodiaudiosettings)')
                                    </Action>
                                </Macro>
                                <Macro Name="Startaktion Audioausgabe AMP" XML_Guid="{96298C76-1A72-4248-95A4-7CD1168D3859}">
                                    <Action XML_Guid="{D185697F-6CC4-466B-B15F-749E7C50D327}">
                                        AudioEndpoint.GetDefaultDevice(0, 0)
                                    </Action>
                                    <Action Name="Block Headset if active / jump to disable headset" XML_Guid="{214F1B75-20E0-4E7E-9118-97D16784121F}">
                                        EventGhost.PythonScript(u'#scriptstart\nscriptname = "AVRRouting_Prechecks"\nimport time\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\neg.globals.audiodevice_status = eg.result\nif not eg.globals.audiodevice_status:\n        eg.globals.audiodevice_status = "broken"\n        print "System audio is broken - going to check audio"\n        eg.TriggerEvent("check", prefix = "errorhandling.audiocheck", payload=scriptname)\n        eg.StopMacro()\n        eg.Exit()\nif eg.globals.headset_active:\n    eg.plugins.EventGhost.ShowOSD(u\'    Audio auf Headset aktiviert - Wird deaktiviert    \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, 4, (0, 400), 0, 6, False)\n    eg.TriggerEvent ("deactivate_headset", prefix="audiorouting.sc_"+scriptname)\n    eg.StopMacro()\nelse:\n    print "Headset nicht aktiv - Keine Aktion notwendig"')
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{4D21F28A-1482-4CFC-9259-4F91256D49DD}">
                                        Window.SendKeys(u'{Shift+Ctrl+Alt+O}', False, 2)
                                    </Action>
                                    <Action XML_Guid="{EA879480-8210-4F46-B68F-88C6DA1483FB}">
                                        AudioEndpoint.SetDefaultDevice(u'{0.0.0.00000000}.{15acab82-6989-44d2-845d-c2520d80055d}', 1)
                                    </Action>
                                    <Action Name="Check for bitstreaming on" XML_Guid="{3226BD8B-173B-4746-9738-64DC1DEB7952}">
                                        EventGhost.PythonScript(u'if eg.globals.bitstreaming:\n    eg.result = 1\n    print "Bitstreaming was already on"\nelse:\n    eg.result = 0\n    print "Bitstreaming was off"')
                                    </Action>
                                    <Action XML_Guid="{D00B1910-3798-4335-B197-1B1BF934823B}">
                                        EventGhost.NewJumpIf(eg.GUID('{D4B3307B-8C70-4522-998B-00A52D66E160}'), 1, True)
                                    </Action>
                                    <Action Name="Check if mixing on" XML_Guid="{407A060A-8322-49E2-A7B1-C1DCD4ACC8AB}">
                                        EventGhost.PythonScript(u'#eg.globals.lav_mixing = eg.result\n#print "Logged lav mixing status was: "+str(eg.globals.lav_mixing)\nif eg.globals.lav_mixing:\n    eg.result = 1\n    print "lav_mixing was on"\nelse:\n    eg.result = 0\n    print "lav_mixing was off"')
                                    </Action>
                                    <Action XML_Guid="{1728CC83-6763-4385-BFB1-BC38CFF4BDE0}">
                                        EventGhost.NewJumpIf(eg.GUID('{823E525F-CD17-4A8A-A227-0B151DD3F071}'), 0, True)
                                    </Action>
                                    <Action XML_Guid="{69AE48AB-6101-48BE-8CE9-1A4AFD322197}">
                                        EventGhost.EnableItem(eg.GUID('{8361FC12-A318-4E38-97EB-D7B41FFCFC17}'))
                                    </Action>
                                    <Action XML_Guid="{17856F7F-9D0A-496B-827E-E47CF6AA9BC3}">
                                        EventGhost.EnableItem(eg.GUID('{35FA2B7C-ADF3-42AE-8EC3-4DB7BD4D7379}'))
                                    </Action>
                                    <Action XML_Guid="{D988A2E6-EA8B-4489-950B-8DB73C19CC4B}">
                                        EventGhost.DisableItem(eg.GUID('{6A019378-2E02-4625-B3D5-118E1B1AC8D9}'))
                                    </Action>
                                    <Action XML_Guid="{F399F91C-4021-45A1-99FD-C56996D0060E}">
                                        EventGhost.Wait(0.5)
                                    </Action>
                                    <Action XML_Guid="{E125BF13-0A54-43B4-9BEF-9FF7B000FBD8}">
                                        System.SetMasterVolume(100.0, u'Primary Sound Driver')
                                    </Action>
                                    <Action XML_Guid="{5080708B-BA45-4616-9317-88E6D5F05B60}">
                                        EventGhost.NewJumpIf(eg.GUID('{261ECF9F-0D1C-4568-924E-C36A94073CF7}'), 2, True)
                                    </Action>
                                    <Action Name="Set AVR vars / kodi settings" XML_Guid="{83E56A8A-AD97-4209-ABAF-FB8DB5E04F1B}">
                                        EventGhost.PythonScript(u'debug = eg.globals.debug\n#debug = 1\n\ndef Setvarsplusvolume():\n    import time\n    scriptname = "Set vars + volume"\n    if debug: print "Running script: "+str(scriptname)\n    eg.globals.avr_action = 1\n    eg.globals.avr_first_play = 1\n    eg.globals.vol_direction_control = 0\n    eg.globals.volmax = 70\n    eg.globals.volmaxcalc = 76\n    if not "AVR" in eg.globals.harm_act_last:\n        eg.globals.amp_volume = 25\n        eg.globals.amp_volume_old = eg.globals.amp_volume-1\n        eg.globals.amp_volume_old2 = eg.globals.amp_volume_old-2\n    eg.globals.systemvolumelevel_set = 100\n    time.sleep(6)\n    eg.TriggerEvent ("Set_VolumeLevel_var", prefix="system.audiorouting")\neg.scheduler.AddTask(0.0, Setvarsplusvolume)\n#set kodi audio settings\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\nkodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\ndef kodiaudiosettings():\n    import time\n    time.sleep(2)\n    for x in range(0, 2):\n        eg.TriggerEvent("setkodiaudio_amp", prefix = "system.audiorouting")\n        eg.TriggerEvent("kodisetting_channels_5_1", prefix = "system.audiorouting")\n        eg.TriggerEvent("kodisetting_outputconf_3", prefix = "system.audiorouting")\n        time.sleep(1)\n        eg.TriggerEvent("bitstreaming_kodi_on", prefix = "system.audiorouting")       \n        time.sleep(4)\nif kodi_running:\n    eg.scheduler.AddTask(0.0, kodiaudiosettings)')
                                    </Action>
                                </Macro>
                                <Folder Name="Headsets" XML_Guid="{3BF601F4-3410-4600-861C-0D56D333AE71}">
                                    <Macro Name="Headset connected" XML_Guid="{41F61FDD-EB01-4E0F-ABD4-3C93C76A602E}">
                                        <Event Name="System.Device.Headset.1" XML_Guid="{A039EA76-A455-49C8-B8D8-78615D8E7765}" />
                                        <Event Name="System.Device.Headset 1.1" XML_Guid="{2DFF441F-61DC-42CC-A21A-5A0480249D61}" />
                                        <Event Name="System.Device.Headset 2.1" XML_Guid="{2DFF441F-61DC-42CC-A21A-5A0480249D61}" />
                                        <Action Name="Set var / run OK script" XML_Guid="{C81D604F-00A1-4E7B-B1C5-99ABA81EED2C}">
                                            EventGhost.PythonScript(u'#on connect of headset: Ask for activation\n#debug\ndebug = eg.globals.debug\n#debug = 1\nscriptname = "HeadsetConnected"\nfrom datetime import datetime\nif debug: print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\neg.globals.headset_connected = 1\nprint "eg.globals.headset_connected: "+str(eg.globals.headset_connected)\neg.globals.headset_activateonok = 1\nif debug: print "eg.globals.headset_activateonok: "+str(eg.globals.headset_activateonok)\ndef offer_headset():\n    import time\n    from datetime import datetime\n    eg.globals.timewait_s = 10\n    eg.globals.interval_s = 1\n    eg.globals.run_max = eg.globals.timewait_s / eg.globals.interval_s\n    #print eg.globals.run_max\n    eg.globals.run = 0\n    if eg.globals.debug: print "function offer_headset: stating loop - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    while ((eg.globals.run &lt;= eg.globals.run_max) and (eg.globals.headset_activateonok)):\n        if eg.globals.htpcapp == "kodi":\n            #if eg.globals.debug: print "mode kodi"\n            eg.plugins.XBMC2.SendNotification(u\'Headset angeschlossen:\', u\'Zur Aktivierung OK druecken    {eg.globals.run_max - eg.globals.run}\')\n        else:\n            #if eg.globals.debug: print "mode mp"\n            eg.plugins.EventGhost.ShowOSD(u\'    Headset angeschlossen    \\n      OK f\\xfcr Aktivierung {eg.globals.run_max - eg.globals.run}\', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 1.1, eg.globals.osd_skin)\n        eg.globals.run = eg.globals.run+1\n        if eg.globals.debug: print "run: "+str(eg.globals.run)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n        time.sleep(eg.globals.interval_s)\n    if eg.globals.htpcapp == "kodi":\n        eg.plugins.XBMC2.SendNotification(u\'\', u\'\')\n    else:\n        eg.plugins.EventGhost.ShowOSD(u\' \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 0.1, eg.globals.osd_skin)\n    eg.globals.headset_activateonok = 0\n    if eg.globals.debug: print "function offer_headset ended - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\neg.scheduler.AddTask(0.0, offer_headset)\nif debug: print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])')
                                        </Action>
                                        <Action XML_Guid="{D96445CF-A990-4826-8E7B-458F45C7E14C}">
                                            FileOperations.Write(2, u'{eg.globals.headset_connected}', u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.headset_connected.txt', 0, 0, True, False, False, 'cp1252')
                                        </Action>
                                        <Action XML_Guid="{9B52A65C-4532-4D4E-8B63-F2B0DA745150}">
                                            EventGhost.DisableItem(eg.GUID('{41F61FDD-EB01-4E0F-ABD4-3C93C76A602E}'))
                                        </Action>
                                        <Action XML_Guid="{F25D7315-DF90-4D10-A1C2-43FD13F02D2A}">
                                            EventGhost.DisableItem(eg.GUID('{3AD37018-F919-43DB-926F-DB473240CE51}'))
                                        </Action>
                                        <Action XML_Guid="{789E92DB-AF10-4A8E-98E7-18618F5F9A94}">
                                            SchedulGhost.RunScheduleImmediately(u'ReenableHeadphoneConnect', False)
                                        </Action>
                                    </Macro>
                                    <Macro Name="Startaktion Audioausgabe Headset" XML_Guid="{8DAF8143-FDEB-4EF9-8F5B-0A1919C53A96}">
                                        <Event Name="audiorouting.sc_Block_TV_Audio_Routing.activate_headset" XML_Guid="{08BB48FA-47C1-46EB-A299-6B477EAA0DEB}" />
                                        <Event Name="MceRemote.Mce.Ok" XML_Guid="{DA6DDF18-1740-4A60-B708-DFFEEDA5A389}" />
                                        <Action Name="on_headphones_check" XML_Guid="{E06C4F20-E1DB-49B0-A27F-CC2C2030360C}">
                                            EventGhost.PythonScript(u'#check the system for steps needed when headphones are activated. Change harmony action and restart apps if needed.\n#\nscriptname = "on_headphones_check"\neg.globals.scriptname = scriptname\n#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    from datetime import datetime\n    print "   !!! --- Debug is active --- !!!   "\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\n#test\ntest = 0\nif test:\n        eg.event.string = "Ok"\n        eg.globals.headset_connected = 1\n        eg.globals.headset_activateonok = 1\n#/test    \nimport time\nif "Ok" in eg.event.string:\n    if not eg.globals.headset_activateonok:\n        print "headset_activateonok not true - skip"\n        eg.StopMacro()\n        eg.Exit()\n    else:\n        print "Ok was hit and headset_activateonok = 1 - proceeding with headset"\n        eg.plugins.XBMC2.SendNotification(u\'Headset angeschlossen:\', u\'OK\')\n        eg.globals.headset_activateonok = 0\n        eg.globals.headset_active = 1\n        eg.plugins.FileOperations.Write(2, u\'{eg.globals.headset_active}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.headset_active.txt\', 0, 0, True, False, False, \'cp1252\')\n        time.sleep(1)\n        eg.plugins.EventGhost.StopProcessing()\nif not eg.globals.headset_connected:\n    print "Headset not connected - skipping ..."\n    eg.plugins.EventGhost.ShowOSD(u\'    Abbruch: Headset ist noch nicht angeschlossen    \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 4.0, eg.globals.osd_skin)\n    eg.StopMacro()\n    eg.Exit()\n#\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\n#\neg.globals.headset_activateonok = 0\n#volume\nlocaltime = time.localtime()\neg.globals.volmax = 100\neg.globals.volmaxcalc = eg.globals.volmax\ndaystart = 8\ndayend = 21\ndayvol = 40\nnightvol = 30\nif daystart &lt;= localtime.tm_hour &lt; dayend:\n    eg.globals.systemvolumelevel_set = dayvol\n    if debug: print "Dayvolume set ("+str(eg.globals.systemvolumelevel_set)+"%)"\nelse:\n    eg.globals.systemvolumelevel_set = nightvol\n    if debug: print "Nightvolume set ("+str(eg.globals.systemvolumelevel_set)+"%)"\nif eg.globals.headset_no == 1:\n    if debug: print "setting sys audio to headset 1"\n    eg.TriggerEvent("triggersysaudiodevicechange_H1", prefix = "system.audiorouting")\nelif eg.globals.headset_no == 2:\n    if debug: print "setting sys audio to headset 2"\n    eg.TriggerEvent("triggersysaudiodevicechange_H2", prefix = "system.audiorouting")\ndef kodiaudiosettings():\n    import time\n    time.sleep(2)\n    eg.TriggerEvent("kodi_audio_set", prefix = "system.appchange", payload=scriptname)\nif eg.globals.kodi_running:\n    eg.scheduler.AddTask(0.0, kodiaudiosettings)\ndef headsetactivateactions():\n    import time\n    scriptname = eg.globals.scriptname\n    if eg.globals.htpcapp == "kodi":\n        #\n        restartkodi_active = 1\n        #\n        if eg.globals.playing:\n            eg.plugins.XBMC2.RemoteStop()\n            time.sleep(1)\n        eg.plugins.System.DisplayImage(eg.globals.def_bg, 3, 1, False, False, 0, True, 4, 5, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'start\')\n        time.sleep(.250)\n        eg.plugins.EventGhost.ShowOSD(u\'    Audio auf Headset wird aktiviert   \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 10, False)\n        """\n        if "AVR+TV" in eg.globals.harm_act:\n            print eg.globals.harm_act+" aktiv - Wechsel der Harmony Aktion"\n            eg.plugins.EventGhost.ShowOSD(u\'    Audio auf Headset aktiviert - Wechsel der Harmony Aktion    \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 6, False)\n            time.sleep(1)\n            eg.TriggerEvent ("goto_HTPC+TV", prefix="audiorouting.sc_"+scriptname)\n            eg.StopMacro()\n            eg.Exit()\n        """\n        if restartkodi_active:\n            time.sleep(.5)\n            eg.plugins.EventGhost.ShowOSD(u\'    Audio auf Headset wird aktiviert - kodi wird neu gestartet    \', eg.globals.osd_font_string, eg.globals.osd_font_color, None,  5, (0, 185), 0, 15, False)\n            eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Scripts\\\\mmhtpc\\\\Pskill\\\\pskill_kodi.bat\', u\'\', 3, False, 3, u\'\', False, False, u\'\', False, False, False)\n            time.sleep(1)\n            eg.plugins.System.Execute(u\'C:\\\\Program Files (x86)\\\\Kodi\\\\Kodi.exe\', u\'\', 0, False, 2, u\'\', False, False, u\'\', False, False, False)\n            time.sleep(4)\n            eg.scheduler.AddTask(0.0, kodiaudiosettings)\n            eg.plugins.EventGhost.ShowOSD(u\'    Audio auf Headset wird aktiviert - kodi wurde neu gestartet   \', eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 1, False)\n        else:\n            time.sleep(3)\n    elif eg.globals.htpcapp == "mp":\n        eg.plugins.System.DisplayImage(eg.globals.def_bg, 3, 1, False, False, 0, True, 0, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, False, u\'start\')\n        time.sleep(.5)\n        eg.plugins.EventGhost.ShowOSD(u\'    Audio auf Headset wird aktiviert    \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 5.0, False)\n        eg.plugins.MediaPortal.Stop()\n        time.sleep(1)\n        if eg.globals.headset_no == 1:\n            eg.TriggerEvent("triggersysaudiodevicechange_H1", prefix = "system.audiorouting")\n        elif eg.globals.headset_no == 2:\n            eg.TriggerEvent("triggersysaudiodevicechange_H2", prefix = "system.audiorouting")\n        """\n        if "AVR+TV" in eg.globals.harm_act:\n            eg.plugins.System.DisplayImage(eg.globals.mp_bg, 3, 1, False, False, 0, True, 0, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, False, u\'headsetimage\')\n            time.sleep(.5)\n            eg.plugins.EventGhost.ShowOSD(u\'    Audio auf Headset aktiviert - Wechsel der Harmony Aktion    \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 10, False)\n            time.sleep(1)\n            eg.TriggerEvent ("goto_HTPC+TV", prefix="audiorouting.sc_"+scriptname)\n            eg.StopMacro()\n            eg.Exit()\n        """\n        eg.plugins.EventGhost.ShowOSD(u\'    Audio auf Headset ist aktiviert    \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 2.0, False)\n    time.sleep(2)\n    eg.plugins.EventGhost.ShowOSD(u\'\', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 0, (0, 0), 0, 0.01, False)\n    time.sleep(.250)\n    eg.plugins.System.HideImage(u\'start\')\nif eg.globals.kodi_running or eg.globals.mp_running:\n    eg.scheduler.AddTask(0.0, headsetactivateactions)\n"""\nelse:\n    if "AVR+TV" in eg.globals.harm_act:\n            eg.plugins.EventGhost.ShowOSD(u\'    Audio auf Headset aktiviert - Wechsel der Harmony Aktion    \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 6, False)\n            eg.TriggerEvent ("goto_HTPC+TV", prefix="audiorouting.sc_"+scriptname)\n            eg.StopMacro()\n            #eg.Exit()\n"""\n#scriptend\nif debug: print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])')
                                        </Action>
                                        <Action XML_Guid="{1438C11B-BE5C-49E5-A7F0-F9FF5DF4DDCA}">
                                            FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.bitstreaming.txt', 0, 0, 'cp1252', 1, False, 1)
                                        </Action>
                                        <Action Name="Check if bitstreaming on" XML_Guid="{FA7B6899-8DA0-4034-8190-DF163907EE4C}">
                                            EventGhost.PythonScript(u'eg.globals.bitstreaming = eg.result\nprint "Logged bitstreaming status was: "+str(eg.globals.bitstreaming)\nif eg.globals.bitstreaming:\n    eg.result = 1\n    print "Bitstreaming was on"\nelse:\n    eg.result = 0\n    print "Bitstreaming was off"')
                                        </Action>
                                        <Action XML_Guid="{16E1522C-C99A-4626-A735-FF522B63639A}">
                                            EventGhost.NewJumpIf(eg.GUID('{FF95E29B-7A27-4918-B2DE-8B96C150C2BE}'), 0, True)
                                        </Action>
                                        <Action Name="Check if mixing on" XML_Guid="{556D8BA3-A383-4787-8D8E-7B72F4D257FA}">
                                            EventGhost.PythonScript(u'#eg.globals.lav_mixing = eg.result\n#print "Logged lav mixing status was: "+str(eg.globals.lav_mixing)\nif eg.globals.lav_mixing:\n    eg.result = 1\n    print "lav_mixing was on"\nelse:\n    eg.result = 0\n    print "lav_mixing was off"')
                                        </Action>
                                        <Action XML_Guid="{31ADF27C-9EFC-4B59-A0E7-57C78367C543}">
                                            EventGhost.NewJumpIf(eg.GUID('{9A5B532A-7641-4108-A25D-8B0D0AE0E450}'), 1, True)
                                        </Action>
                                        <Action XML_Guid="{F174C096-6DD7-40D1-BE47-C94862D4A759}">
                                            EventGhost.DisableItem(eg.GUID('{8361FC12-A318-4E38-97EB-D7B41FFCFC17}'))
                                        </Action>
                                        <Action XML_Guid="{AAC204D7-CFC1-4BA4-892E-2BE16D991424}">
                                            EventGhost.EnableItem(eg.GUID('{35FA2B7C-ADF3-42AE-8EC3-4DB7BD4D7379}'))
                                        </Action>
                                        <Action XML_Guid="{CA0E7724-72F4-4D55-9682-5FEAD0AE1E15}">
                                            EventGhost.EnableItem(eg.GUID('{6A019378-2E02-4625-B3D5-118E1B1AC8D9}'))
                                        </Action>
                                        <Action XML_Guid="{9B9FB737-DD92-4A30-B577-EF175D6B9AB0}">
                                            EventGhost.NewJumpIf(eg.GUID('{8A5136DA-8EA2-4647-A50A-B600CC9E763F}'), 2, True)
                                        </Action>
                                        <Action XML_Guid="{C8F4C97A-A6E1-489F-8A84-17E1F3B1AED2}">
                                            EventGhost.EnableItem(eg.GUID('{3AD37018-F919-43DB-926F-DB473240CE51}'))
                                        </Action>
                                        <Action XML_Guid="{67EB7687-0492-4A2E-AC35-3A4DBF091242}">
                                            SchedulGhost.RunScheduleImmediately(u'ReenableHeadphoneConnect', False)
                                        </Action>
                                        <Action XML_Guid="{9F03AA86-743C-43CE-BA31-7C8BE54F32E6}">
                                            EventGhost.DisableItem(eg.GUID('{8DAF8143-FDEB-4EF9-8F5B-0A1919C53A96}'))
                                        </Action>
                                    </Macro>
                                    <Macro Name="Endeaktion Audioausgabe Headset / disconnect Headset" XML_Guid="{3AD37018-F919-43DB-926F-DB473240CE51}">
                                        <Event Name="audiorouting.sc_Disable_Headset_Routing_if_AVR.deactivate_headset" XML_Guid="{B7069736-61E4-435C-BCC3-B349D7C24DD4}" />
                                        <Event Name="htpc_endaction.sc_htpcsys_endactions.end_mode_headset" XML_Guid="{BB5552C2-9076-458E-B68F-7B77AC8481DB}" />
                                        <Event Name="System.Device.Headset.0" XML_Guid="{9C028768-812D-47E4-AFDC-AB9358330B18}" />
                                        <Event Name="System.Device.Headset 1.0" XML_Guid="{134BABE0-83E3-43C9-B11E-77EAEFFD6A27}" />
                                        <Event Name="System.Device.Headset 2.0" XML_Guid="{36B896C6-5952-41B8-9D0A-1C23845324A1}" />
                                        <Action Enabled="False" XML_Guid="{C9AFEF64-AF9A-4C74-AB14-F7EE15CCF0CB}">
                                            EventGhost.ShowOSD()
                                        </Action>
                                        <Action Name="set/log vars / Endloop" XML_Guid="{618DE018-C009-42FF-9B38-EB75EF900C85}">
                                            EventGhost.PythonScript(u'if not eg.globals.headset_active:\n\tprint "headset not active - skip"\n\teg.StopMacro()\n\teg.Exit()\nimport time\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\n#\neg.globals.headset_connected = 0\neg.globals.headset_active = 0\neg.plugins.FileOperations.Write(2, u\'{eg.globals.headset_connected}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.headset_connected.txt\', 0, 0, True, False, False, \'cp1252\')\neg.plugins.FileOperations.Write(2, u\'{eg.globals.headset_active}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.headset_active.txt\', 0, 0, True, False, False, \'cp1252\')\n#\ndef headsetdisconnectactions():\n\tif eg.globals.htpcapp == "kodi":\n\t\t#\n\t\trestartkodi_active = 0\n\t\t#\n\t\teg.plugins.System.DisplayImage(eg.globals.kodi_bg, 3, 1, False, False, 0, True, 4, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'headsetimage\')\n\t\teg.plugins.XBMC2.RemoteStop()\n\t\ttime.sleep(.250)\n\t\tif restartkodi_active:\n\t\t\teg.plugins.EventGhost.ShowOSD(u\'\tAudio auf Headset wird deaktiviert - kodi wird neu gestartet\t\', eg.globals.osd_font_string, eg.globals.osd_font_color, None,  5, (0, 185), 0, 15, False)\n\t\t\teg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Scripts\\\\mmhtpc\\\\Pskill\\\\pskill_kodi.bat\', u\'\', 3, False, 3, u\'\', False, False, u\'\', False, False, False)\n\t\t\ttime.sleep(1)\n\t\t\teg.plugins.System.Execute(u\'C:\\\\Program Files (x86)\\\\Kodi\\\\Kodi.exe\', u\'\', 0, False, 2, u\'\', False, False, u\'\', False, False, False)\n\t\t\ttime.sleep(3)\n\t\t\teg.plugins.EventGhost.ShowOSD(u\'\tAudio auf Headset wurde deaktiviert - kodi neu gestartet   \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 1, False)\n\t\telse:\n\t\t\teg.plugins.EventGhost.ShowOSD(u\'\tAudio auf Headset wird deaktiviert   \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 10, False)\n\t\t\ttime.sleep(4)\n\t\t\teg.plugins.EventGhost.ShowOSD(u\'\tAudio auf Headset wurde deaktiviert   \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 10, False)\n\t\t\ttime.sleep(1)\n\telif eg.globals.htpcapp == "mp":\n\t\teg.plugins.System.DisplayImage(eg.globals.mp_bg, 3, 1, False, False, 0, True, 0, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, False, u\'headsetimage\')\n\t\teg.plugins.MediaPortal.Stop()\n\t\ttime.sleep(.25)\n\t\teg.plugins.EventGhost.ShowOSD(u\'\tAudio auf Headset wird deaktiviert\t\', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 5.0, eg.globals.osd_skin)\n\t\ttime.sleep(4)\n\t\teg.plugins.EventGhost.ShowOSD(u\'\tAudio auf Headset wurde deaktiviert\t\', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 2.0, eg.globals.osd_skin)\n\t\ttime.sleep(1)\n\teg.plugins.EventGhost.ShowOSD(u\'\', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), 0, (0, 0), 0, 0.01, False)\n\ttime.sleep(.250)\n\teg.plugins.System.HideImage(u\'headsetimage\')\nif eg.globals.kodi_running or eg.globals.mp_running:\n\teg.scheduler.AddTask(0.0, headsetdisconnectactions)')
                                        </Action>
                                        <Action Name="Check for audio profile in harm_action" XML_Guid="{4A2CA080-76ED-42DE-9767-F9DAED842781}">
                                            EventGhost.PythonScript(u'if "AVR" in eg.globals.harm_act:\n    eg.result = 1\nelse:\n    eg.result = 0')
                                        </Action>
                                        <Action XML_Guid="{ABE44185-6761-42C3-A14B-5596288E6CDC}">
                                            EventGhost.JumpIfElse(eg.GUID('{96298C76-1A72-4248-95A4-7CD1168D3859}'), 0, True, eg.GUID('{578A4DE3-8B77-4E73-AEEE-EB1DA145CCF8}'), True)
                                        </Action>
                                        <Action XML_Guid="{F607AB73-C3BF-4314-94BD-17B716D95D84}">
                                            SchedulGhost.RunScheduleImmediately(u'ReenableHeadphoneConnect', False)
                                        </Action>
                                        <Action XML_Guid="{68895989-483D-4960-A11D-1470371E7D30}">
                                            EventGhost.DisableItem(eg.GUID('{3AD37018-F919-43DB-926F-DB473240CE51}'))
                                        </Action>
                                    </Macro>
                                    <Macro Name="Aktiviere: Startaktion Audioausgabe Headset" XML_Guid="{C8956DCA-174B-4564-AF2E-1DAEF3E2A81B}">
                                        <Event Name="SchedulGhost.ReenableHeadphoneConnect.stop" XML_Guid="{5BC70D1C-B1A6-4198-A836-10D48986D0D9}" />
                                        <Action XML_Guid="{8A4479D0-7180-40FE-82D0-63ABD40DDC10}">
                                            EventGhost.EnableItem(eg.GUID('{8DAF8143-FDEB-4EF9-8F5B-0A1919C53A96}'))
                                        </Action>
                                        <Action XML_Guid="{59903D01-073A-44D0-83A5-92D7B91FC3E9}">
                                            EventGhost.EnableItem(eg.GUID('{41F61FDD-EB01-4E0F-ABD4-3C93C76A602E}'))
                                        </Action>
                                        <Action XML_Guid="{47F19163-32B8-4F48-96ED-D71C4B278D95}">
                                            EventGhost.EnableItem(eg.GUID('{3AD37018-F919-43DB-926F-DB473240CE51}'))
                                        </Action>
                                    </Macro>
                                </Folder>
                            </Folder>
                            <Folder Name="Modi" XML_Guid="{2FF7FAD5-1C7F-4CDB-9051-06CB792C7715}" Expanded="True">
                                <Folder Name="Alle" XML_Guid="{6D106DEC-F985-4226-886D-030AB2B1D880}" Expanded="True">
                                    <Folder Name="SystemVolumeControl active" XML_Guid="{6A019378-2E02-4625-B3D5-118E1B1AC8D9}">
                                        <Macro Name="SysVolumeUpDown" XML_Guid="{9561D3C7-0781-4BA9-BF29-2D1D05E2B7C4}" Expanded="True">
                                            <Event Name="MceRemote.Mce.VolumeUp" XML_Guid="{C4CD5869-B886-42FD-8E2B-94C8F10FE56D}" />
                                            <Event Name="MceRemote.Mce.VolumeDown" XML_Guid="{FB0EC591-6F1A-45E1-B0B7-C03766B31B63}" />
                                            <Event Name="HandleDirectAVRVolumeControl.VolumeDown" XML_Guid="{3EAC0839-7A88-46FF-99A0-8E5E85CC7E54}" />
                                            <Event Name="HandleDirectAVRVolumeControl.VolumeUp" XML_Guid="{B0F63946-93AF-40F7-8F85-E0D7EC854DD0}" />
                                            <Action Name="PreOSD" XML_Guid="{6B4D9D5E-4F46-4328-BB17-0643E2D193E2}">
                                                EventGhost.PythonScript(u'#show pre osd\nscriptname = "show pre osd"\n#debug\ndebug = eg.globals.debug\n#debug = 1\n#/debug\nimport time\nfrom datetime import datetime\nif debug:\n    print "Script "+scriptname+" started"+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\nif eg.globals.show_pre_osd:\n    scriptname = eg.globals.scriptname_sysvol\n    eg.TriggerEvent ("show_osd_generic_preOSD", prefix="system_control_volume.sc_"+scriptname)\n    print "pre osd triggered:"+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    #time.sleep(1)\n    #print "showing pre osd"\nelse:\n    print "skipping pre osd" ')
                                            </Action>
                                            <Action Name="SystemVolumeControl UpDown" XML_Guid="{0E308607-55AA-4A98-A355-3D10A517A7EA}">
                                                EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    from datetime import datetime\n    print "Volume change script started - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    print "eg.globals.show_pre_osd = "+str(eg.globals.show_pre_osd)\n#eg.event.string = "Up"\n#eg.event.string = "Down"\n#eg.globals.show_pre_osd = 0\n#/debug\neg.globals.vol_change_direction_sysvol = eg.event.string\ndef SystemVolumeControlUpDown():\n    import time\n    debug = eg.globals.debug\n    scriptname = "SystemVolumeControlUpDown"\n    eg.globals.scriptname_sysvol = scriptname    \n    if debug: from datetime import datetime\n    if eg.globals.show_pre_osd:\n        eg.globals.show_pre_osd = 0\n        time.sleep(.350)\n        if debug: print "pre osd wait over - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    else:\n        print "no preOSD, no wait..."\n    if debug: print "Old Volume: "+str(eg.globals.systemvolumelevel)\n    if debug: print "start control - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    direction = eg.globals.vol_change_direction_sysvol    \n    if "Up" in direction:\n        if eg.globals.systemvolumelevel &gt;= 20:\n            schrittweite = 5\n        else:\n            schrittweite = 1\n    elif "Down" in direction:\n        if eg.globals.systemvolumelevel &gt;= 25:\n            schrittweite = -5\n        elif 21 &lt;= eg.globals.systemvolumelevel &lt;= 24:\n            schrittweite = -(eg.globals.systemvolumelevel-20)\n        else:\n            schrittweite = -1\n    else:\n        print "Something is wrong @mce"\n    if debug: print "Doing volume change by "+str(schrittweite)+"%:"+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])    \n    eg.plugins.System.ChangeMasterVolumeBy(schrittweite, u\'Primary Sound Driver\')\n    print "New Volume: "+str(eg.globals.systemvolumelevel)\n    eg.TriggerEvent ("show_osd_generic", prefix="system_control_volume.sc_"+scriptname)\n    if debug: print "after osd trigger:"+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\ndef reenable_show_pre_osd():\n    import time\n    time.sleep(4)\n    eg.globals.show_pre_osd = 1\n    if debug:\n        from datetime import datetime\n        print "show_pre_osd reset to 1 - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\neg.scheduler.AddTask(0.0, SystemVolumeControlUpDown)\neg.scheduler.AddTask(0.0, reenable_show_pre_osd)')
                                            </Action>
                                        </Macro>
                                        <Folder Name="Mute" XML_Guid="{C8356B4B-DEAF-420D-8164-1EB4711CFEE0}">
                                            <Macro Name="Stummschaltung anschalten" XML_Guid="{B5C9344E-D68B-4C46-9BFD-A0D6D79A246C}">
                                                <Event Name="MceRemote.Mce.Mute" XML_Guid="{C4436291-FF1D-4F8B-9BC8-CDB5207CDF47}" />
                                                <Event Name="HandleDirectAVRVolumeControl.Mute" XML_Guid="{BDA5DA4B-A261-4FA6-BD85-E3E410C7E813}" />
                                                <Action XML_Guid="{950AF265-F0CB-42F2-9377-9D40E984928C}">
                                                    System.MuteOn(u'Primary Sound Driver')
                                                </Action>
                                                <Action XML_Guid="{F96DADBD-C73A-4648-A3FD-3CA88AD90CA7}">
                                                    EventGhost.EnableExclusive(eg.GUID('{F3D21031-55C7-4DA6-A3C9-369C838F3B4B}'))
                                                </Action>
                                            </Macro>
                                            <Macro Name="Stummschaltung ausschalten" Enabled="False" XML_Guid="{F3D21031-55C7-4DA6-A3C9-369C838F3B4B}" Expanded="True">
                                                <Event Name="HandleDirectAVRVolumeControl.Mute" XML_Guid="{03DF3D60-405B-44E9-8461-24154C82B54E}" />
                                                <Event Name="MceRemote.Mce.Mute" XML_Guid="{0845FC31-8805-41F1-AE39-6A4388926CE2}" />
                                                <Event Name="MceRemote.Mce.VolumeUp" XML_Guid="{1448E64A-BA0F-4D3B-B3C4-FFA71BA30D2B}" />
                                                <Event Name="MceRemote.Mce.VolumeDown" XML_Guid="{27FF8F08-BCF8-44E7-869E-F850C8F528C9}" />
                                                <Event Name="HandleDirectAVRVolumeControl.VolumeDown" XML_Guid="{F1EB8165-958B-4C4E-A136-7A5565F4DD4A}" />
                                                <Event Name="HandleDirectAVRVolumeControl.VolumeUp" XML_Guid="{4F1ACF65-1415-4F00-853C-FAC11113965C}" />
                                                <Action XML_Guid="{15594D85-C68C-4C12-9458-908E3E609282}">
                                                    System.MuteOff(u'Primary Sound Driver')
                                                </Action>
                                                <Action XML_Guid="{BE66863B-B608-489D-A15E-4E3F27C3C916}">
                                                    EventGhost.EnableExclusive(eg.GUID('{B5C9344E-D68B-4C46-9BFD-A0D6D79A246C}'))
                                                </Action>
                                            </Macro>
                                        </Folder>
                                    </Folder>
                                </Folder>
                            </Folder>
                        </Folder>
                    </Folder>
                    <Folder Name="DelayedActions/Check/Failsafe" XML_Guid="{A97CB097-9B43-4A3D-B313-F544D77F3298}">
                        <Macro Name="Routing_DelayedActions ALL" XML_Guid="{4B8B0F95-9791-48CC-93CA-395D57E5A264}" Expanded="True">
                            <Event Name="SchedulGhost.routing_delayedactions_stop" XML_Guid="{D5F62F7E-5A8A-4A6F-85F2-8F091C68A468}" />
                            <Action Enabled="False" XML_Guid="{89BBFA16-D62D-4B60-B700-97909F3014E6}">
                                EventGhost.NewJumpIf(eg.GUID('{44040479-B0CC-4AE8-89E1-E2E8110A9E54}'), 2, True)
                            </Action>
                            <Action Name="Check for AVR in Harm Action" XML_Guid="{EA907F07-B24C-4A8B-9098-D30C34BE12F9}">
                                EventGhost.PythonScript(u'if "AVR" in eg.globals.harm_act:\n    eg.result = 1\n    eg.StopMacro()\nelse:\n    eg.result = 0\nprint eg.result')
                            </Action>
                        </Macro>
                        <Macro Name="Routing_DelayedActions HTPC" XML_Guid="{5EC1AD7D-D49C-46E6-AF49-9688AEE2D4BE}" Expanded="True">
                            <Event Name="SchedulGhost.routing_delayedactions_htpc_stop" XML_Guid="{6F9048F6-6E63-4AF7-B41A-6C174FC27B58}" />
                            <Action XML_Guid="{532964B3-0A90-4038-8B9C-0CFE9536FB66}">
                                System.MuteOff(u'Primary Sound Driver')
                            </Action>
                            <Action Name="Interrupt Startloop" XML_Guid="{138A4385-EEAE-4914-BAD1-C7F01E1A3E3D}">
                                EventGhost.PythonScript(u"eg.globals.startloop_interrupt = 1\neg.plugins.System.HideImage(u'kodioff')\n#eg.plugins.System.HideImage(u'mpstart')\n#eg.plugins.System.HideImage(u'kodi_start')\neg.plugins.System.HideImage(u'off')\n#eg.plugins.System.HideImage(u'act_start')\n")
                            </Action>
                            <Action Name="Check Audio" Enabled="False" XML_Guid="{CDC43174-DB82-4E3D-BC1D-4E157D42264B}">
                                EventGhost.PythonScript(u'def Check_system_audio_status():\n    import time\n    wait = 5\n    print "Checking system audio status in "+str(wait)+"s"\n    time.sleep(wait)\n    print "Triggering check system audio status"\n    eg.TriggerEvent("Check_system_audio_status", prefix = "AVRouting_delayed")\neg.scheduler.AddTask(0.0, Check_system_audio_status)')
                            </Action>
                            <Action Name="check htpcapps" Enabled="False" XML_Guid="{1BF2B9C0-004F-4BB1-9EC7-ECE6F20DD133}">
                                EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\n#dump1_insert\nif eg.globals.htpcapp == "mp":\n    eg.result = 1\nelif eg.globals.htpcapp == "kodi":\n    eg.result = 0\nelse:\n    print "Error: No htpcapp"\n    eg.StopMacro()\n#dump\neg.Exit()')
                            </Action>
                            <Action Enabled="False" XML_Guid="{908E734C-AF55-44AD-A53B-4F301DAF0BE9}">
                                EventGhost.JumpIfElse(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 0, False, eg.GUID('{EDADDBAE-DCA0-4E95-85E6-1CFF11D87DD8}'), False)
                            </Action>
                            <Action Enabled="False" XML_Guid="{0FB68FE1-40E1-42FE-91E2-F19411659E76}">
                                EventGhost.ShowOSD()
                            </Action>
                        </Macro>
                        <Macro Name="Routing_DelayedActions NO AVR" XML_Guid="{6E132C67-2BD0-48F9-85E8-22DA1D011C8F}" Expanded="True">
                            <Event Name="SchedulGhost.routing_delayedactions_noavr_stop" XML_Guid="{ABFDAFB2-E2B4-4AEB-9BD8-BE6E65958760}" />
                            <Action XML_Guid="{D095225E-9120-47A2-8520-DACEEBDA0DCC}">
                                EventGhost.NewJumpIf(eg.GUID('{48001D2B-D212-413D-9997-6ADE9D9D7595}'), 2, True)
                            </Action>
                            <Action Name="check kodi" XML_Guid="{72E47591-F0D7-468F-8AFD-398A9AA6FC38}">
                                EventGhost.PythonScript(u'if eg.globals.htpcapp == "mp":\n    eg.result = 0\nelif eg.globals.htpcapp == "kodi":\n    eg.result = 1\nelse:\n    print "Error: No htpcapp"\n    eg.StopMacro()\n    eg.result = 0')
                            </Action>
                            <Action XML_Guid="{909AA5B0-08BC-4739-9FB8-D101A3C29F8A}">
                                EventGhost.NewJumpIf(eg.GUID('{DF0CECC7-C51F-405D-8118-13406BE7BF42}'), 0, True)
                            </Action>
                        </Macro>
                        <Macro Name="Reenable HarmonyRouting" XML_Guid="{7C9B952C-1971-4832-8B3A-548F9A5953FA}" Expanded="True">
                            <Event Name="SchedulGhost.routing_delayedactions_reenable_stop" XML_Guid="{52E1D0D9-3E74-4088-AF12-9689A4A16B27}" />
                            <Action XML_Guid="{8CC30E6C-FFFB-4F01-B16F-C53235CDC4F6}">
                                EventGhost.EnableItem(eg.GUID('{C8429847-2B16-4A88-88D7-63A52090459F}'))
                            </Action>
                        </Macro>
                    </Folder>
                </Folder>
            </Folder>
            <Folder Name="HTPC Apps" XML_Guid="{587E2467-7C9E-4A85-8ACB-39AAAE131D38}">
                <Folder Name="App Starts" XML_Guid="{A8E73B3C-D631-461A-A4BA-B3B344BEA4AA}">
                    <Macro Name="Any App start" XML_Guid="{F190B115-3B61-488F-B200-A3EA440513FA}">
                        <Event Name="MceRemote.Mce.Power" XML_Guid="{F9210E05-0E8F-42C7-BD14-C39D8486353F}" />
                        <Event Name="MceRemote.Mce.Music" XML_Guid="{E771A844-4482-4234-A49C-73B3A71958E5}" />
                        <Event Name="logfile.htpcapp_last.*" XML_Guid="{6DD9CFEE-2253-4AC7-BBA4-E8C94C2C55E5}" />
                        <Action XML_Guid="{6BE12B6C-49BC-4574-A11D-2FF5ADC5806E}">
                            System.HideImage(u'off')
                        </Action>
                        <Action Name="Check for rerun" XML_Guid="{65327C7B-284E-41EC-ABE0-7DBA50DB283A}">
                            EventGhost.PythonScript(u'if not "MceRemote.Mce" in eg.event.string:\n    if not eg.globals.htpcappstart_active:\n        print "Macro should not be run - skipping"\n        eg.plugins.EventGhost.StopProcessing()\n        eg.StopMacro()\nelse:\n    print "Macro is not blocked - starting htpcapp"\n    def systemresume_active():\n        import time\n        if eg.globals.debug: eg.globals.htpcappstart_active = 0\n        time.sleep(60)\n        print "reenable start htpcapp"\n        eg.globals.htpcappstart_active = 1\n    eg.scheduler.AddTask(0.0, systemresume_active)')
                        </Action>
                        <Action Enabled="False" XML_Guid="{4330B265-590B-4F38-B006-43C1B58668AB}">
                            FileOperations.Read(0, u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.htpcapp_last.txt', 0, 0, 'cp1252', 1, False, 1)
                        </Action>
                        <Action Name="Process htpcapp_last from file" Enabled="False" XML_Guid="{3F3F96A1-CD12-460B-A34D-8C1DF7B853F9}">
                            EventGhost.PythonScript(u'#eg.plugins.FileOperations.Read(0, u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.htpcapp_last.txt\', 0, 0, \'cp1252\', 1, False, 1)\nprint type(eg.result)\nprint "eg.result = "+str(eg.result)\neg.globals.htpcapp_last = str(eg.result)\nprint eg.globals.htpcapp_last\nprint type(eg.globals.htpcapp_last)\nif not eg.globals.htpcapp_last == "kodi":\n    if not eg.globals.htpcapp_last == "mp":\n        print "Warning: Last htpcapp not logged propperly"\neg.globals.htpcapp = eg.globals.htpcapp_last\neg.TriggerEvent ("htpcapp_last."+eg.globals.htpcapp_last, prefix="logfile")')
                        </Action>
                        <Action XML_Guid="{6E87CA52-613D-41F4-9A59-B9A8BB4B06C8}">
                            Mouse.MoveAbsolute(960, 1078, None, False, False)
                        </Action>
                        <Action XML_Guid="{4DF8D6D8-84AA-43F3-AA85-CA7A25B29DCD}">
                            EventGhost.EnableItem(eg.GUID('{ED7EEFC2-B9B6-40C5-AA3A-D109C65F33DD}'))
                        </Action>
                        <Action XML_Guid="{931558B4-5E70-4AD5-828B-C01EF2AE33BA}">
                            EventGhost.NewJumpIf(eg.GUID('{EDADDBAE-DCA0-4E95-85E6-1CFF11D87DD8}'), 2, True)
                        </Action>
                        <Action XML_Guid="{C1616827-D859-4FA0-8357-8B6392C53F7D}">
                            EventGhost.EnableItem(eg.GUID('{A8DD9848-E8D2-461D-BEDC-9035188CE921}'))
                        </Action>
                        <Action XML_Guid="{AF51FFB8-EE09-4C06-9994-A458F1C03250}">
                            EventGhost.EnableItem(eg.GUID('{CAD15444-BB3F-4794-B24B-8DB380AF852C}'))
                        </Action>
                        <Action XML_Guid="{679F4074-A047-4BAD-9464-FEDAA7A4E258}">
                            StandbyControl.InhibitStandbyByApplication(u'just_started', False, 0, 600, True, 15, True)
                        </Action>
                        <Action Name="SchedulGhost: Start egg timer:HtpcAppStarted" XML_Guid="{369591EE-3702-4E65-9E7B-7A7E259271BC}">
                            SchedulGhost.StartEggTimer((u'00:00:10', u'SchedulGhost', u'HtpcAppStarted', u'', u'', (191, 191, 255), (64, 0, 128), u'0;-56;0;0;0;400;0;0;0;0;0;0;0;0;MS Shell Dlg 2', (10, 10), u'HtpcAppStarted'))
                        </Action>
                    </Macro>
                    <Folder Name="Start MP" XML_Guid="{C187C94F-78AF-4BA8-8DF3-DFDA1E43C4BB}">
                        <Macro Name="Check MP" XML_Guid="{DA6C6C55-E56C-4D72-84E4-08ED745FE5CC}" Expanded="True">
                            <Event Name="MceRemote.Mce.Power" XML_Guid="{86F49A8F-CABD-4932-B43D-425A0C21F416}" />
                            <Event Name="AutoRemote.Message.m8.startmp" XML_Guid="{488E9298-091C-4F46-9657-D26322F06574}" />
                            <Event Name="logfile.htpcapp_last.mp" XML_Guid="{98ECA949-0A0C-4D01-888B-33693E403A07}" />
                            <Event Name="eg_startactions.start_mp" XML_Guid="{B8D4A15A-DA54-4507-8CF2-A20F8EA4CB18}" />
                            <Action XML_Guid="{9CEF6393-5E91-4AFE-8097-148115EABF79}">
                                EventGhost.EnableExclusive(eg.GUID('{6788C14A-AC1B-4122-A89D-BAB8909729A1}'))
                            </Action>
                            <Action Name="Check MP" XML_Guid="{E10247BB-07B6-4A85-91F7-476E6B350E99}">
                                EventGhost.PythonScript(u'scriptname = "check_mp"\n#########test########\n#eg.globals.htpcapp_last = "kodi"\n#eg.event.string = "MceRemote.Mce.Power"\n########\\\\test#########\n#debug\ndebug = eg.globals.debug\ndebug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\n#\n#set variables\n#previous app\neg.globals.htpcapp_last = eg.globals.htpcapp\nif debug: "eg.globals.htpcapp_last is now: "+str(eg.globals.htpcapp_last)\n#new app\neg.globals.htpcapp = "mp"\nif debug: "eg.globals.htpcapp is now: "+str(eg.globals.htpcapp)\n##OSD\ndef setosd():\n    eg.TriggerEvent ("setosd."+eg.globals.htpcapp, prefix="htpc")\n#\ndef bringmp2front():\n    eg.TriggerEvent("mp2front", prefix = "system.appchange")\n#\ndef reset_forcedrestartmp():\n    import time\n    time.sleep(10)\n    eg.globals.forcedrestartmp = 0\n    eg.globals.mp_forced_restart_onok = 0\n#eg.scheduler.AddTask(0.0, reset_forcedrestartmp)\n### Check ###\n#check for manual switch\nif ("MceRemote.Mce.Power" in eg.event.string) and not (eg.globals.htpcapp == eg.globals.htpcapp_last):\n    manualswitch2mp = 1\nelse:\n    manualswitch2mp = 0\n#check for forced restart\nif eg.globals.forcedrestartmp and ("MceRemote.Mce.Power" in eg.event.string):\n    print "Forced restart requested"\n    eg.globals.manualswitch2mp_loop_interrupt = 1\n    def showosdforcedrestartmp():\n        import time\n        eg.globals.timewait_s = 10\n        eg.globals.interval_s = 1\n        eg.globals.run_max = eg.globals.timewait_s / eg.globals.interval_s\n        eg.globals.run = 0\n        if eg.globals.debug: print "This loop will run for: "+str(eg.globals.run_max)+" seconds"\n        eg.globals.forcedrestartmp = 1\n        eg.globals.mp_forced_restart_onok = 1\n        eg.scheduler.AddTask(0.0, setosd)\n        while ((eg.globals.run &lt;= eg.globals.run_max) and (eg.globals.mp_forced_restart_onok)):\n            eg.plugins.EventGhost.ShowOSD(u\'         MediaPortal l\xe4uft schon         \\n         OK f\\xfcr Neustart {eg.globals.run_max - eg.globals.run}\', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 1.1, eg.globals.osd_skin)\n            eg.globals.run = eg.globals.run+1\n            if eg.globals.debug: print "run: "+str(eg.globals.run)\n            time.sleep (1)\n        eg.plugins.EventGhost.ShowOSD(u\' \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 0.1, eg.globals.osd_skin)\n        eg.globals.mp_forced_restart_onok = 0\n        eg.globals.forcedrestartmp = 0\n    eg.scheduler.AddTask(0.0, showosdforcedrestartmp)\n    eg.StopMacro()\n    eg.Exit()\nif "MceRemote.Mce.Power" in eg.event.string:\n    eg.globals.forcedrestartmp = 1\n    if eg.globals.debug: print "eg.globals.forcedrestartmp is now: "+str(eg.globals.forcedrestartmp)\n    eg.scheduler.AddTask(0.0, reset_forcedrestartmp)\nif ("MediaPortal" in eg.globals.current_frontwindow) and ("MceRemote.Mce.Power" in eg.event.string) and (eg.globals.mp_loaded==1):\n    if debug: print "MediaPortal seems to be already running and on top - exiting script"\n    eg.scheduler.AddTask(0.0, bringmp2front)\n    eg.plugins.EventGhost.ShowOSD(u\'     {eg.globals.htpcapp} ist schon die aktive Anwendung        \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 3.0, eg.globals.osd_skin)\n    eg.StopMacro()\n    eg.Exit()\nelse:\n    print "Macro is not blocked - starting MediaPortal"\nimport time\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\n#previous app actions\nif eg.globals.kodi_running and eg.globals.playing:\n        eg.plugins.XBMC2.RemoteStop()\n        #time.sleep(.5)\n#get audio focus\neg.plugins.System.PlaySound(u\'D:\\\\Programmdaten\\\\Eventghost\\\\sounds\\\\point1sec.mp3\', 0, False)\n#move mouse pointer\n#eg.plugins.Mouse.MoveAbsolute(960, 1078, None, False, False)\n#check for manual switch\nif not eg.globals.mp_running:\n    eg.plugins.System.Execute(u\'C:\\\\Program Files (x86)\\\\Team Mediaportal\\\\Mediaportal\\\\Mediaportal.exe\', u\'\', 0, False, 2, u\'\', False, False, u\'\', False, False, False)\n    eg.globals.outerrange = 3\n    eg.globals.innerrange = 4\nelse:\n    print "Mediaportal was already running"\n    #eg.plugins.MediaPortal.Stop()\n    #time.sleep(.5)\n    #eg.plugins.MediaPortal.LiveTV()\n    eg.globals.outerrange = 1\n    eg.globals.innerrange = 2\ndef manualswitch2mp_loop():\n    import time\n    eg.globals.manualswitch2mp_loop_interrupt = 0\n    outerrange = eg.globals.outerrange\n    innerrange = eg.globals.innerrange\n    eg.plugins.System.DisplayImage(eg.globals.kodi_bg, 3, 1, False, False, 0, True, 4, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'kodi_off\')\n    if eg.globals.kodi_running:\n        eg.plugins.XBMC2.RemoteStart()\n    def bringmp2front():\n        eg.TriggerEvent("mp2front", prefix = "system.appchange")\n    #time.sleep(.500)\n    for y in range(outerrange):\n        if eg.globals.manualswitch2mp_loop_interrupt==0:\n            if eg.globals.debug: print "outer manualswitch2mp loop start, run "+str(y+1)+"/"+str(outerrange)\n            for x in range(innerrange):\n                if eg.globals.manualswitch2mp_loop_interrupt==0:\n                    eg.plugins.EventGhost.ShowOSD(u\'Wechsel zu Mediaportal \'+x*".",  eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 3.0, eg.globals.osd_skin)\n                    if eg.globals.debug: print "inner manualswitch2mp loop start, run "+str(x+1)+"/"+str(innerrange)\n                    time.sleep(.500)\n                else:\n                    if eg.globals.debug: print "inner manualswitch2mploop interrupted@run "+str(x+1)+"."+str(y+1)\n                    #if eg.globals.mp_loaded: eg.scheduler.AddTask(0.0, bringmp2front)\n        else:\n            if eg.globals.debug: print "outer manualswitch2mploop interrupted@run "+str(y+1)\n            eg.plugins.EventGhost.ShowOSD(u\'\', eg.globals.osd_font_string, eg.globals.osd_font_color, None, 4, (0, 70), 0, 0.1, False)\n    eg.plugins.System.DisplayImage(eg.globals.mp_bg, 3, 1, False, False, 0, True, 4, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'mp_start\')\n    eg.plugins.System.HideImage(u\'kodi_off\')    \n    eg.plugins.System.PlaySound(u\'C:\\\\Windows\\\\Media\\\\Windows Shutdown.wav\', 1, False)\n    for y in range(outerrange):\n        if eg.globals.manualswitch2mp_loop_interrupt==0:\n            if eg.globals.debug: print "outer manualswitch2mp loop start, run "+str(y+1)+"/"+str(outerrange)\n            for x in range(innerrange):\n                if eg.globals.manualswitch2mp_loop_interrupt==0:\n                    eg.plugins.EventGhost.ShowOSD(u\'Wechsel zu Mediaportal \'+x*".",  eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 3.0, eg.globals.osd_skin)\n                    if eg.globals.debug: print "inner manualswitch2mp loop start, run "+str(x+1)+"/"+str(innerrange)\n                    time.sleep(.500)\n                else:\n                    if eg.globals.debug: print "inner manualswitch2mploop interrupted@run "+str(x+1)+"."+str(y+1)\n        else:\n            if eg.globals.debug: print "outer manualswitch2mploop interrupted@run "+str(y+1)\n    eg.plugins.EventGhost.ShowOSD(u\'\', eg.globals.osd_font_string, eg.globals.osd_font_color, None, 4, (0, 70), 0, 0.1, False)\n    eg.scheduler.AddTask(0.0, bringmp2front)\n    time.sleep(1.0)\n    eg.scheduler.AddTask(0.0, setosd)\n    eg.plugins.System.HideImage(u\'mp_start\')\nif manualswitch2mp:\n    eg.scheduler.AddTask(0.0, manualswitch2mp_loop)\nif eg.globals.mp_loaded: eg.scheduler.AddTask(0.0, bringmp2front)\neg.scheduler.AddTask(0.0, reset_forcedrestartmp)\neg.globals.fullscreen = 0\n#log\nif debug: print "Last htpcapp: "+str(eg.globals.htpcapp_last)\nif debug: print "New htpcapp: "+str(eg.globals.htpcapp)\neg.globals.htpcapp_last = eg.globals.htpcapp\nif debug: print "Logging to file:"\neg.plugins.FileOperations.Write(2, u\'{eg.globals.htpcapp_last}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.htpcapp_last.txt\', 0, 0, True, False, False, \'cp1252\')\n#_______________________Scriptend\nif debug:\n    from datetime import datetime\n    print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])')
                            </Action>
                        </Macro>
                        <Macro Name="On Start MP" XML_Guid="{783C23F3-4AB2-4377-967C-823AD1CA6036}" Expanded="True">
                            <Event Name="Process.Created.MediaPortal" XML_Guid="{144690B4-2EC2-4813-BE31-56738438CFF7}" />
                            <Event Name="system.htpcapp.onstartmp_manual" XML_Guid="{015843E7-7346-4F66-826C-63AC04D603BF}" />
                            <Action Name="Set htpcapp" XML_Guid="{57D0DEA6-9C89-4BB4-8AB0-12FFCD619DAD}">
                                EventGhost.PythonScript(u'#import time\neg.globals.htpcapp = "mp"\neg.globals.htpcapp_last = eg.globals.htpcapp\nprint "eg.globals.htpcapp_last: "+str(eg.globals.htpcapp_last)\nif eg.globals.htpcapp_last == "mp" or "kodi":\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.htpcapp_last}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.htpcapp_last.txt\', 0, 0, True, False, False, \'cp1252\')')
                            </Action>
                            <Action XML_Guid="{56695FEF-9749-4E09-96E5-005F7B4F8830}">
                                EventGhost.NewJumpIf(eg.GUID('{58FE89CA-6102-4A13-B348-DA91D19C27DA}'), 2, False)
                            </Action>
                        </Macro>
                        <Macro Name="MP Settings" XML_Guid="{58FE89CA-6102-4A13-B348-DA91D19C27DA}" Expanded="True">
                            <Event Name="eg.appactions.mp_settings_activate" XML_Guid="{28642130-F464-47CC-9D93-C3B627F86D20}" />
                            <Action XML_Guid="{DD5AD257-9E45-423B-BC33-3671B146D67A}">
                                EventGhost.EnableExclusive(eg.GUID('{6788C14A-AC1B-4122-A89D-BAB8909729A1}'))
                            </Action>
                            <Action XML_Guid="{022BBCB7-6EBE-4A5D-8A69-CF6F754464E6}">
                                EventGhost.EnableExclusive(eg.GUID('{9A436ECD-2217-46E4-A817-2B03100505CF}'))
                            </Action>
                            <Action XML_Guid="{84C2D55F-68D3-4A13-BF98-D379788488F7}">
                                EventGhost.EnableExclusive(eg.GUID('{6C95DA09-59C4-425A-BCCF-9713DF21CE07}'))
                            </Action>
                            <Action XML_Guid="{8F3D4673-9CAB-4431-AD5D-6AD950427515}">
                                System.SetWallpaper()
                            </Action>
                            <Action XML_Guid="{4B17F3A3-17C2-42BD-9764-825E9AF8C6B2}">
                                EventGhost.NewJumpIf(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 2, True)
                            </Action>
                        </Macro>
                        <Macro Name="Starte: MediaPortal" XML_Guid="{16DB3A44-320B-40AC-880D-E2D927CC7AC4}">
                            <Action Name="Starte MediaPortal.exe" XML_Guid="{7FB1D22A-0487-4A25-9D4E-FBA6F6137229}">
                                System.Execute(u'C:\\Program Files (x86)\\Team MediaPortal\\MediaPortal\\MediaPortal.exe', u'', 0, False, 2, u'C:\\Program Files (x86)\\Team MediaPortal\\MediaPortal', False, False, u'', False, False, False, False)
                            </Action>
                            <Action XML_Guid="{29E92C44-740B-4E15-B1A1-37A9CC1B8805}">
                                EventGhost.Wait(0.5)
                            </Action>
                            <Action XML_Guid="{A13AE3A8-ED56-42AD-A55F-A01C31EC3503}">
                                EventGhost.ShowOSD()
                            </Action>
                        </Macro>
                    </Folder>
                    <Folder Name="Start kodi" XML_Guid="{4A303156-C96B-446D-BA8D-77A3D93EBBAE}" Expanded="True">
                        <Macro Name="Check Kodi" XML_Guid="{F17B52FA-4F8C-4E7B-A721-74B4B482C5F6}">
                            <Event Name="MceRemote.Mce.Music" XML_Guid="{5CC34C0E-D055-4FBF-87EE-6FBDD6F875B8}" />
                            <Event Name="logfile.htpcapp_last.kodi" XML_Guid="{8786B6B4-5162-4F79-BFF8-35CBF3FB8C5B}" />
                            <Event Name="eg_startactions.start_kodi" XML_Guid="{FEECFB25-4ED6-47FB-8A51-DD02EB67F1AE}" />
                            <Action XML_Guid="{D310A768-D473-4F67-8DBD-0A704FF08F72}">
                                EventGhost.EnableExclusive(eg.GUID('{CAD1CAC8-CCB1-4A5D-B4F5-AF08C87F1EEC}'))
                            </Action>
                            <Action Name="Check kodi" XML_Guid="{95B7D68B-94AD-4937-8282-EA6AF8F3B8D7}">
                                EventGhost.PythonScript(u'scriptname = "check_kodi"\n#########test########\n#eg.globals.htpcapp_last = "kodi"\n#eg.event.string = "MceRemote.Mce.Music"\n########\\\\test#########\n#debug\ndebug = eg.globals.debug\ndebug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\n#\nimport time\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\n#set variables\n#previous app\neg.globals.htpcapp_last = eg.globals.htpcapp\nif debug: "eg.globals.htpcapp_last is now: "+str(eg.globals.htpcapp_last)\n#new app\neg.globals.htpcapp = "kodi"\nif debug: "eg.globals.htpcapp is now: "+str(eg.globals.htpcapp)\n##OSD\ndef setosd():\n    eg.TriggerEvent ("setosd."+eg.globals.htpcapp, prefix="htpc")\n#\ndef reset_forcedrestartkodi():\n    import time\n    time.sleep(10)\n    eg.globals.forcedrestartkodi = 0\n    eg.globals.kodi_forced_restart_onok = 0\n    if eg.globals.debug: print "eg.globals.forcedrestartkodi is now: "+str(eg.globals.forcedrestartkodi)\n### Check ###\n#check for manual switch\nif ("MceRemote.Mce.Music" in eg.event.string) and not (eg.globals.htpcapp == eg.globals.htpcapp_last):\n    manualswitch2kodi = 1\nelse:\n    manualswitch2kodi = 0\n#check for forced restart\n#if "Kodi" in eg.globals.current_frontwindow:\nif eg.globals.forcedrestartkodi and ("MceRemote.Mce.Music" in eg.event.string):\n    print "Forced restart requested"\n    eg.globals.manualswitch2kodi_loop_interrupt = 1\n    def showosdforcedrestartkodi():\n        import time\n        eg.globals.timewait_s = 10\n        eg.globals.interval_s = 1\n        eg.globals.run_max = eg.globals.timewait_s / eg.globals.interval_s\n        eg.globals.run = 0\n        if eg.globals.debug: print "This loop will run for: "+str(eg.globals.run_max)+" seconds"\n        eg.globals.forcedrestartkodi = 1\n        eg.globals.kodi_forced_restart_onok = 1\n        def setosd():\n            eg.TriggerEvent ("setosd."+eg.globals.htpcapp, prefix="htpc")\n        eg.scheduler.AddTask(0.0, setosd)\n        while ((eg.globals.run &lt;= eg.globals.run_max) and (eg.globals.kodi_forced_restart_onok)):\n            eg.plugins.EventGhost.ShowOSD(u\'         kodi l\xe4uft schon         \\n         OK f\\xfcr Neustart {eg.globals.run_max - eg.globals.run}\', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 1.1, eg.globals.osd_skin)\n            eg.globals.run = eg.globals.run+1\n            if eg.globals.debug: print "run: "+str(eg.globals.run)\n            time.sleep (1)\n        eg.plugins.EventGhost.ShowOSD(u\' \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 0.1, eg.globals.osd_skin)\n        eg.globals.kodi_forced_restart_onok = 0\n        eg.globals.forcedrestartkodi = 0\n    eg.scheduler.AddTask(0.0, showosdforcedrestartkodi)\n    eg.StopMacro()\n    eg.Exit()\nif "MceRemote.Mce.Music" in eg.event.string:\n    eg.globals.forcedrestartkodi = 1\n    if eg.globals.debug: print "eg.globals.forcedrestartkodi is now: "+str(eg.globals.forcedrestartkodi)\n    eg.scheduler.AddTask(0.0, reset_forcedrestartkodi)\nif "Kodi" in eg.globals.current_frontwindow:\n    if debug: print "kodi seems to be already running and on top - exiting script"\n    if "MceRemote.Mce.Music" in eg.event.string:\n        eg.plugins.EventGhost.ShowOSD(u\'     {eg.globals.htpcapp} ist schon die aktive Anwendung        \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 3.0, eg.globals.osd_skin)\n    eg.plugins.XBMC2.RemoteStart()\n    eg.StopMacro()\n    eg.Exit()\nelse:\n    print "Macro is not blocked - starting kodi"\n#previous app actions\nif eg.globals.mp_running:\n    if eg.globals.playing:\n        eg.plugins.MediaPortal.Stop()\n        time.sleep(.5)\n    eg.plugins.MediaPortal.LiveTV()\n#get audio focus\neg.plugins.System.PlaySound(u\'D:\\\\Programmdaten\\\\Eventghost\\\\sounds\\\\point1sec.mp3\', 0, False)\n#move mouse pointer\n#eg.plugins.Mouse.MoveAbsolute(960, 1078, None, False, False)\n#check for manual switch\nif not eg.globals.kodi_running:\n    eg.plugins.System.Execute(u\'C:\\\\Program Files (x86)\\\\Kodi\\\\Kodi.exe\', u\'\', 0, False, 2, u\'\', False, False, u\'\', False, False, False)\n    eg.globals.outerrange = 1\n    eg.globals.innerrange = 5\nelse:\n    print "kodi was already running"\n    eg.TriggerEvent("kodi_audio_set", prefix = "system.appchange")\n    eg.plugins.XBMC2.RemoteBack()\n    time.sleep(.5)\n    eg.plugins.XBMC2.Home()\n    eg.globals.outerrange = 1\n    eg.globals.innerrange = 1\ndef manualswitch2kodi_loop():\n    import time\n    eg.globals.manualswitch2kodi_loop_interrupt = 0\n    outer_loop = eg.globals.outerrange\n    inner_loop = eg.globals.innerrange\n    def setosd():\n        eg.TriggerEvent ("setosd."+eg.globals.htpcapp, prefix="htpc")\n    eg.plugins.System.DisplayImage(eg.globals.mp_bg, 3, 1, False, False, 0, True, 4, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'mp_off\')\n    time.sleep(.500)\n    for y in range (outer_loop):\n        if not eg.globals.manualswitch2kodi_loop_interrupt:\n            if eg.globals.debug: print "outer manualswitch2kodi loop start, run "+str(y+1)+"/"+str(outer_loop)\n            for x in range(inner_loop):\n                if not eg.globals.manualswitch2kodi_loop_interrupt:\n                    eg.plugins.EventGhost.ShowOSD(u\'Wechsel zu kodi \'+x*".", eg.globals.osd_font_string, eg.globals.osd_font_color, None, 4, (0, 70), 0, 1.0, False)\n                    if eg.globals.debug: print "inner manualswitch2kodi loop start, run "+str(x+1)+"/"+str(inner_loop)\n                    time.sleep(.500)\n                else:\n                    if eg.globals.debug: print "inner manualswitch2kodiloop interrupted@run "+str(x+1)+"."+str(y+1)\n                    x = inner_loop\n                    y = outer_loop\n        else:\n            if eg.globals.debug: print "outer manualswitch2kodiloop interrupted@run "+str(y+1)\n            y = outer_loop\n    eg.plugins.System.PlaySound(u\'C:\\\\Windows\\\\Media\\\\Windows Shutdown.wav\', 1, False)\n    if not eg.globals.kodi_running:\n        eg.globals.kodi_screensaveractive = 0\n        eg.plugins.System.DisplayImage(eg.globals.kodi_bg, 3, 1, False, False, 0, True, 4, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'kodi_start\')\n        eg.scheduler.AddTask(0.0, setosd)\n        eg.TriggerEvent("kodi2front", prefix = "system.appchange")\n        eg.plugins.System.HideImage(u\'mp_off\')\n        time.sleep(.500)\n        for y in range (outer_loop):\n            if not eg.globals.manualswitch2kodi_loop_interrupt:\n                if eg.globals.debug: print "outer manualswitch2kodi loop start, run "+str(y+1)+"/"+str(outer_loop)\n                for x in range(inner_loop):\n                    if not eg.globals.manualswitch2kodi_loop_interrupt:\n                        eg.plugins.EventGhost.ShowOSD(u\'Wechsel zu kodi \'+x*".", eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 1.0, False)\n                        if eg.globals.debug: print "inner manualswitch2kodi loop start, run "+str(x+1)+"/"+str(inner_loop)\n                        time.sleep(.500)\n                    else:\n                        eg.plugins.EventGhost.ShowOSD(u\'\', eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 1.0, False)\n                        if eg.globals.debug: print "inner manualswitch2kodiloop interrupted@run "+str(x+1)+"."+str(y+1)\n                        x = inner_loop\n                        y = outer_loop\n            else:\n                eg.plugins.EventGhost.ShowOSD(u\'\', eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 1.0, False)\n                if eg.globals.debug: print "outer manualswitch2kodiloop interrupted@run "+str(y+1)\n                y = outer_loop\n    eg.plugins.EventGhost.ShowOSD(u\'\', eg.globals.osd_font_string, (255, 255, 255), None, 4, (0, 70), 0, 1.0, False)\n    eg.TriggerEvent("kodi2front", prefix = "system.appchange")\n    time.sleep(.500)\n    eg.plugins.System.HideImage(u\'mp_off\')\n    eg.TriggerEvent("kodi_audio_set", prefix = "system.appchange")\n    eg.plugins.System.HideImage(u\'kodi_start\')\nif manualswitch2kodi:\n    eg.scheduler.AddTask(0.0, manualswitch2kodi_loop)\n#eg.TriggerEvent("kodi2front", prefix = "system.appchange")\neg.globals.fullscreen = 0\n#Reset kodi/xbmc2 plugin\ndef xbmcplugin_reset():\n    import time\n    time.sleep(3)\n    eg.TriggerEvent("xbmcplugin_reset", prefix="sc.kodistart")\n#eg.scheduler.AddTask(0.0, xbmcplugin_reset)\n#log\nif debug: print "Last htpcapp: "+str(eg.globals.htpcapp_last)\nif debug: print "New htpcapp: "+str(eg.globals.htpcapp)\neg.globals.htpcapp_last = eg.globals.htpcapp\nif debug: print "Logging to file:"\neg.plugins.FileOperations.Write(2, u\'{eg.globals.htpcapp_last}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.htpcapp_last.txt\', 0, 0, True, False, False, \'cp1252\')\neg.scheduler.AddTask(0.0, setosd)\n#_______________________Scriptend\nif debug:\n    from datetime import datetime\n    print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])')
                            </Action>
                            <Action Name="Command: Lightsout: Server wecken" Enabled="False" XML_Guid="{BAC070D3-C7C3-4458-853D-04C4F65BBE55}">
                                System.Execute(u'D:\\Programmdaten\\Lightsout\\Scripts\\wake.bat', u'-w', 3, False, 2, u'C:\\Program Files\\Windows Server\\Bin', True, False, u'', False, False, False, False)
                            </Action>
                            <Action XML_Guid="{D4D1E034-0F43-46FA-83F1-1248C54116B9}">
                                EventGhost.NewJumpIf(eg.GUID('{B447588D-D045-44C3-A50E-2B19E5D641C3}'), 2, True)
                            </Action>
                        </Macro>
                        <Macro Name="On Start Kodi" XML_Guid="{8707C419-AE6F-4185-BED7-DABD79D764D0}">
                            <Event Name="Process.Created.kodi" XML_Guid="{E4FF8C62-8FC2-4DD2-8165-1B66D8D08781}" />
                            <Action Name="Check htpcapp" XML_Guid="{652B09BB-A5DE-4E06-83A6-FCD390C3CD47}">
                                EventGhost.PythonScript(u'if eg.globals.htpcapp == "mp":\n    eg.TriggerEvent ("mptofront", prefix = "routing.kodistarted")\nelif eg.globals.htpcapp == "kodi":\n    eg.TriggerEvent ("koditofront", prefix = "routing.kodistarted")\nelse:\n    print "No htpcapp defined - skiping..."')
                            </Action>
                        </Macro>
                        <Macro Name="Kodi start settings" XML_Guid="{B447588D-D045-44C3-A50E-2B19E5D641C3}">
                            <Event Name="eg.appactions.kodi_settings_activate" XML_Guid="{5EEDEA28-5567-4222-87B5-1CABA7CC78CB}" />
                            <Action XML_Guid="{C9DAC01B-456D-4155-9DD6-22CF8DEC8CBA}">
                                EventGhost.EnableExclusive(eg.GUID('{CAD1CAC8-CCB1-4A5D-B4F5-AF08C87F1EEC}'))
                            </Action>
                            <Action XML_Guid="{09025DE4-4BE9-461D-9F41-6416059DB4B5}">
                                EventGhost.NewJumpIf(eg.GUID('{C1381FFD-3A4C-49C2-BFF6-C894E2E6FF1B}'), 2, True)
                            </Action>
                            <Action XML_Guid="{77F2A5C7-7755-4EF3-86AB-D47F422D79E9}">
                                EventGhost.NewJumpIf(eg.GUID('{30F3F7CB-E7B4-4191-9742-8CC54A55E2FC}'), 2, True)
                            </Action>
                            <Action XML_Guid="{CA9E49D4-72D3-43F4-8AE3-DE5179E35157}">
                                System.SetWallpaper()
                            </Action>
                            <Action Name="Set vars etc." XML_Guid="{E2052596-D8CF-4423-9F84-D740A1F4C60F}">
                                EventGhost.PythonScript(u'eg.globals.htpcapp = "kodi"\neg.globals.htpcapp_last = eg.globals.htpcapp\nif eg.globals.htpcapp_last == "mp" or "kodi":\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.htpcapp_last}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.htpcapp_last.txt\', 0, 0, True, False, False, \'cp1252\')')
                            </Action>
                        </Macro>
                        <Macro Name="Starte: kodi" XML_Guid="{3F44A57E-5719-46FA-ABE5-9F799A6F6AB5}">
                            <Action Name="Starte Kodi" XML_Guid="{9880F46F-87B3-42E8-9D61-7512FBF206C4}">
                                System.Execute(u'C:\\Program Files (x86)\\Kodi\\Kodi.exe', u'', 0, False, 2, u'', False, False, u'', False, False, False)
                            </Action>
                            <Action XML_Guid="{4ADD4BAB-EA63-47D2-93BE-AD3D21354869}">
                                EventGhost.Wait(0.5)
                            </Action>
                            <Action XML_Guid="{83B894EA-ECD2-4533-8507-C350BD4EADA5}">
                                EventGhost.ShowOSD()
                            </Action>
                        </Macro>
                    </Folder>
                    <Macro Name="Delayed Actions" XML_Guid="{F3C2B50B-270A-4C0A-8CAD-31669AF4B39F}">
                        <Event Name="SchedulGhost.HtpcAppStarted" XML_Guid="{A72A2211-193F-4FBF-906D-2C3262C8FA73}" />
                        <Action Name="Log eg.globals.htpcapp_last" XML_Guid="{BFA07DBD-98DC-4415-83C7-40E3C358AD78}">
                            EventGhost.PythonScript(u'eg.globals.htpcapp_last = eg.globals.htpcapp\nif eg.globals.htpcapp_last == "mp" or "kodi":\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.htpcapp_last}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.htpcapp_last.txt\', 0, 0, True, False, False, \'cp1252\')')
                        </Action>
                    </Macro>
                </Folder>
                <Folder Name="App Control" Enabled="False" XML_Guid="{ED7EEFC2-B9B6-40C5-AA3A-D109C65F33DD}" Expanded="True">
                    <Folder Name="running htpcapp independent" XML_Guid="{3C8C9235-F317-4F62-8AF4-D2AF69202146}" Expanded="True">
                        <Macro Name="Init Avr Volume" XML_Guid="{268BE170-E765-4C36-B005-72D3BEA19E4E}">
                            <Event Name="XBMC2.Player.OnPlay.*" XML_Guid="{CC9E1A66-A957-4740-BAA1-DD34A6B2EB7B}" />
                            <Event Name="Mediaportal.Play" XML_Guid="{8569BD6C-5EC4-45B7-997C-B39899982191}" />
                            <Action Name="Init/check AVR Volume" XML_Guid="{BC2C57F6-5D4A-4F6E-8D0F-B71C2BD94CF3}">
                                EventGhost.PythonScript(u'import time\nif "AVR" in eg.globals.harm_act:\n    eg.globals.hhdevice = \'14638751\'\n    eg.globals.hhcommand = \'VolumeUp\'\n    if eg.globals.avr_first_play:\n        eg.globals.amp_volume = 25\n        eg.globals.amp_volume = eg.globals.amp_volume+1\n        eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Harmony\\\\HarmonyHubControl.exe\', u\'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}\', 3, False, 5, u\'\', False, False, u\'\', False, False, False, False)\n        eg.globals.avr_first_play = 0\n    else: \n        print "Not the first play in this session"\n    eg.result = 1\nelse:\n    print "Not a harmony action using avr"\n    eg.result = 0')
                            </Action>
                        </Macro>
                        <Folder Name="Pause + Background" XML_Guid="{005A3C3D-D821-4D6E-A4E1-5CD785D41DC2}">
                            <Folder Name="Pause" XML_Guid="{65A16967-0349-420C-9683-323178037D88}" Expanded="True">
                                <Macro Name="Pause" XML_Guid="{F6B5ECDB-E28B-4CC4-AD31-FD4308093E13}" Expanded="True">
                                    <Event Name="MceRemote.Mce.Pause" XML_Guid="{20674C36-E82C-40DD-810B-4EDBEBD39569}" />
                                    <Event Name="XBMC2.Player.OnPause.*" XML_Guid="{6B79D4CB-7DA4-4CFC-B1F7-02FA38B50082}" />
                                    <Event Name="Mediaportal.Pause" XML_Guid="{4BE2A78C-8B38-4DFE-B747-8110AB8C392F}" />
                                    <Action Name="Inhibit + Pause Apps" XML_Guid="{09B698DC-28B5-4FFA-B31C-69125F58B923}">
                                        EventGhost.PythonScript(u'#import time\n#kodi meldet musicvideo bei streams. diese werden mehrfach gestartet und sofort wieder pausiert. Funktion hier sinnlos.\nif not eg.globals.inhibit_pause:\n    if "Mce" in eg.event.string:\n        if "kodi" in eg.globals.htpcapp:\n            eg.plugins.XBMC2.RemotePause()\n        elif "mp" in eg.globals.htpcapp:\n            eg.plugins.MediaPortal.Pause()\n        else:\n            pass\neg.globals.inhibit_pause = 1\ndef inhibit_pause():\n    import time\n    time.sleep(5)\n    eg.globals.inhibit_pause = 0\neg.scheduler.AddTask(0.0, inhibit_pause)')
                                    </Action>
                                    <Action XML_Guid="{8F2B9952-1747-4ABB-8763-391EE0DFCD47}">
                                        EventGhost.EnableExclusive(eg.GUID('{5EEBD12E-63D4-4193-A8DD-8975D20E6791}'))
                                    </Action>
                                    <Action XML_Guid="{DFB457BD-B804-4C29-B973-5E2ABCD20011}">
                                        EventGhost.EnableItem(eg.GUID('{5D4FC172-541E-4D20-B97C-5BFB92AB99A9}'))
                                    </Action>
                                    <Action XML_Guid="{D92B88EB-A55C-4060-8786-6B6A2BB47883}">
                                        EventGhost.EnableItem(eg.GUID('{5AED4961-EE4C-4FA1-8125-F639F1E6CF25}'))
                                    </Action>
                                    <Action XML_Guid="{AC45F529-1998-4889-B241-1C05D78E4D77}">
                                        SchedulGhost.StartEggTimer((u'00:00:30', u'SchedulGhost', u'DelayBG', u'', u'', (191, 191, 255), (64, 0, 128), u'0;-56;0;0;0;400;0;0;0;0;0;0;0;0;MS Shell Dlg 2', (10, 10), u'DelayBG'))
                                    </Action>
                                    <Action XML_Guid="{E57EB03F-7B4F-44E5-9203-17685A939B74}">
                                        EventGhost.StopProcessing()
                                    </Action>
                                </Macro>
                            </Folder>
                            <Folder Name="Resume" Enabled="False" XML_Guid="{5EEBD12E-63D4-4193-A8DD-8975D20E6791}" Expanded="True">
                                <Macro Name=" + Background" XML_Guid="{5AED4961-EE4C-4FA1-8125-F639F1E6CF25}">
                                    <Event Name="SchedulGhost.DelayBG" XML_Guid="{5D6ADC68-6950-4FF4-9011-565E9AE71027}" />
                                    <Action XML_Guid="{4F405382-4419-48F0-83C3-8FCBD22B6595}">
                                        System.DisplayImage(u'D:\\Programmdaten\\Eventghost\\pics\\bg_black_gradient.png', 3, 1, False, False, 0, True, 4, 0, 0, 0, 0, 640, 360, (0, 0, 0), True, True, False, u'bg_pause')
                                    </Action>
                                    <Action XML_Guid="{BEA240A3-FA77-4E86-84F5-B13595B9DA64}">
                                        EventGhost.Wait(0.3)
                                    </Action>
                                    <Action XML_Guid="{496E010F-8A6D-4C23-BBC4-841DAE79A4A2}">
                                        EventGhost.ShowOSD()
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{FD41A9D5-2DA6-4E10-90F2-2A01D862A177}">
                                        EventGhost.EnableItem(eg.GUID('{16C0A872-5250-48A5-9448-8EAAA79E3CE8}'))
                                    </Action>
                                </Macro>
                                <Macro Name="Hide Image: bg_pause" Enabled="False" XML_Guid="{16C0A872-5250-48A5-9448-8EAAA79E3CE8}">
                                    <Event Name="MceRemote.Mce.Pause" XML_Guid="{65BD89BE-B1E3-4436-828A-500A25947D48}" />
                                    <Action XML_Guid="{075A9F91-99AA-4AC8-A3B1-A2A065DA211E}">
                                        SchedulGhost.AbortEggTimer(u'DelayBG')
                                    </Action>
                                    <Action XML_Guid="{64C88E53-26A2-46CB-9635-2DDC71515253}">
                                        EventGhost.ShowOSD()
                                    </Action>
                                    <Action XML_Guid="{E26B6E21-5A25-4224-A8DF-CA31B36DA65A}">
                                        EventGhost.Wait(0.2)
                                    </Action>
                                    <Action XML_Guid="{340009F6-A31A-4023-AF7A-A117FF44B91D}">
                                        System.HideImage(u'bg_pause')
                                    </Action>
                                    <Action XML_Guid="{E1E7449F-7F45-4715-95AF-12532ABE2468}">
                                        EventGhost.EnableExclusive(eg.GUID('{5D4FC172-541E-4D20-B97C-5BFB92AB99A9}'))
                                    </Action>
                                    <Action XML_Guid="{2BB9AC3C-25D2-405A-B87F-DFF9F534AAD5}">
                                        EventGhost.StopProcessing()
                                    </Action>
                                </Macro>
                                <Macro Name="Resume" Enabled="False" XML_Guid="{5D4FC172-541E-4D20-B97C-5BFB92AB99A9}">
                                    <Event Name="MceRemote.Mce.*" XML_Guid="{863BAB4A-B1F9-486F-804F-DEF511219BAD}" />
                                    <Event Name="Mediaportal.Resume" XML_Guid="{4AE38D71-B9F1-4EB7-BDFD-735AB5FADE03}" />
                                    <Event Name="XBMC2.Player.OnPlay.*" XML_Guid="{C62639EA-A932-428A-BF61-51BFDC5628F7}" />
                                    <Action XML_Guid="{F04359D7-4732-4572-84ED-B0AE928D5537}">
                                        SchedulGhost.AbortEggTimer(u'DelayBG')
                                    </Action>
                                    <Action Name="Inhibit Pause = 0" XML_Guid="{EA2F8453-6C0E-4339-9142-542DE2283A3F}">
                                        EventGhost.PythonScript(u'eg.globals.inhibit_pause = 0')
                                    </Action>
                                    <Action XML_Guid="{F22E6501-8E52-4AC4-B606-2A080BA10E3C}">
                                        EventGhost.EnableExclusive(eg.GUID('{65A16967-0349-420C-9683-323178037D88}'))
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{760BE102-5A28-4656-ABA5-A5B75CAC880A}">
                                        EventGhost.ShowOSD()
                                    </Action>
                                    <Action XML_Guid="{EFD5D29A-CBF6-48EB-B7AB-67728C0773A1}">
                                        EventGhost.ShowOSD()
                                    </Action>
                                    <Action XML_Guid="{069ACE4A-D85C-4A57-BD97-1280F4B08C3C}">
                                        EventGhost.Wait(0.5)
                                    </Action>
                                    <Action XML_Guid="{49C6AEEA-A37B-4FBF-A037-0B4698C30835}">
                                        System.HideImage(u'bg_pause')
                                    </Action>
                                    <Action Name="Resume Kodi" Enabled="False" XML_Guid="{4B45B38E-8B88-4900-8FBA-58728697061E}">
                                        EventGhost.PythonScript(u'import time\nif eg.globals.htpcapp == "kodi":\n    time.sleep(1)\n    eg.plugins.XBMC2.RemotePlay()\n    print "kodi"\nelse:\n    print "htpcapp is not kodi"')
                                    </Action>
                                </Macro>
                            </Folder>
                        </Folder>
                        <Macro Name="ForcedRestarthtpcapp" XML_Guid="{F66F98B1-CA10-4289-BD40-32E4E2F4F391}">
                            <Event Name="errorhandling.forcedrestart_kodi" Enabled="False" XML_Guid="{71C6230D-44B7-461A-A1D2-F7C86E12EF8A}" />
                            <Event Name="MceRemote.Mce.Ok" XML_Guid="{49D29DC5-9625-48B8-B573-EEC0802BAB4D}" />
                            <Action Name="ForcedRestarthtpcapp" XML_Guid="{532A25B0-33ED-4F8E-80BE-2F534A5D1795}">
                                EventGhost.PythonScript(u'import time\n#\n#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    print "htpcapp = "+str(eg.globals.htpcapp)\n#eg.event.string = "Ok"\n#/debug\n#\nif "Ok" in eg.event.string:\n    if not (eg.globals.kodi_forced_restart_onok or eg.globals.mp_forced_restart_onok):\n        print "forcedrestartkodi not true - skip"\n        eg.StopMacro()\n        eg.Exit()\n    else:\n        if debug: print "Ok was hit and forcedrestart = 1 - proceeding with restart"\n        eg.globals.mp_forced_restart_onok = 0\n        eg.globals.kodi_forced_restart_onok = 0\nif eg.globals.htpcapp == "kodi":\n    #eg.plugins.XBMC2.SendNotification(u\'Systemfehler:\', u\'kodi muss neu gestartet werden\') #kann eg zum h\xe4ngen bringen?\n    eg.globals.forcedrestartkodi = 0\n    eg.plugins.EventGhost.StopProcessing()\n    max_outer_loop = 1\n    max_inner_loop = 5\n    eg.plugins.System.PlaySound(u\'C:\\\\Windows\\\\Media\\\\Windows Shutdown.wav\', 1, False)\n    eg.plugins.System.DisplayImage(eg.globals.kodi_bg, 3, 1, False, False, 0, True, 4, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'kodistart\')\n    time.sleep(.100)\n    eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Scripts\\\\mmhtpc\\\\Pskill\\\\pskill_kodi.bat\', u\'\', 3, True, 4, u\'\', False, False, u\'\', False, False, False, True)\n    def kodirestartloop():\n        import time\n        eg.globals.manualswitch2kodi_loop_interrupt = 0\n        for y in range (0, max_outer_loop):\n            if not eg.globals.manualswitch2kodi_loop_interrupt:\n                print "outer manualswitch2kodi loop start, run "+str(y+1)+"/"+str(max_outer_loop)\n                for x in range(0, max_inner_loop):\n                    if not eg.globals.manualswitch2kodi_loop_interrupt:\n                        eg.plugins.EventGhost.ShowOSD(u\'kodi-Neustart wird erzwungen\'+x*".", eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 10.0, eg.globals.osd_skin)\n                        print "inner manualswitch2kodi loop start, run "+str(x+1)+"/"+str(max_inner_loop)\n                        time.sleep(.500)\n                    else:\n                        print "inner manualswitch2kodiloop interrupted@run "+str(x+1)+"."+str(y+1)\n                        x = max_inner_loop\n            else:\n                print "outer manualswitch2kodiloop interrupted@run "+str(y+1)\n                y = max_outer_loop\n        eg.plugins.EventGhost.ShowOSD(u\'Neustart ist erfolgt\'+x*".", eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 3.0, eg.globals.osd_skin)\n        time.sleep(1)\n        eg.plugins.System.HideImage(u\'kodistart\')\n        if eg.globals.debug: print "kodirestartloop ended - "+str(time)\n    if not "routing.endloop.restart_kodi" in eg.event.string:\n        eg.scheduler.AddTask(0.0, kodirestartloop)\n    time.sleep(2)\n    eg.plugins.System.Execute(u\'C:\\\\Program Files (x86)\\\\Kodi\\\\Kodi.exe\', u\'\', 0, False, 2, u\'\', False, False, u\'\', False, False, False, False)\n    if not "routing.endloop.restart_kodi" in eg.event.string:\n        time.sleep(2)\n        eg.globals.manualswitch2kodi_loop_interrupt = 1\nelif eg.globals.htpcapp == "mp":\n    eg.plugins.System.DisplayImage(eg.globals.mp_bg, 3, 1, False, False, 0, True, 4, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'mp_start\')\n    eg.plugins.EventGhost.ShowOSD(u\'     MediaPortal wird neu gestartet ...     \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 3.0, eg.globals.osd_skin)\n    eg.plugins.Window.FindWindow(u\'WerFault.exe\', u\'MediaPortal\', u\'#32770\', None, u\'CtrlNotifySink\', 1, False, 0.0, 2)\n    eg.plugins.Window.Close()\n    eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Scripts\\\\mmhtpc\\\\Pskill\\\\pskill_mediaportal.bat\', u\'\', 0, False, 3, u\'\', False, False, u\'\', False, False, False)\n    time.sleep(2)\n    eg.plugins.EventGhost.ShowOSD(u\'        MediaPortal wird neu gestartet...        \', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 10.0, eg.globals.osd_skin)\n    eg.plugins.System.Execute(u\'C:\\\\Program Files (x86)\\\\Team MediaPortal\\\\MediaPortal\\\\MediaPortal.exe\', u\'\', 0, False, 2, u\'C:\\\\Program Files (x86)\\\\Team MediaPortal\\\\MediaPortal\', False, False, u\'\', False, False, False)')
                            </Action>
                            <Action XML_Guid="{0D220CBD-1B29-4B5D-A3B8-5BF4D86A84C4}">
                                EventGhost.StopProcessing()
                            </Action>
                        </Macro>
                        <Macro Name="Interrupt ForcedRestart" XML_Guid="{70EB1D21-F256-4290-A431-7CE5A2B11200}">
                            <Event Name="MceRemote.Mce.Back" XML_Guid="{D9F70A47-06B8-4E56-82EF-BB2F338C7148}" />
                            <Action Name="Interrupt ForcedRestart" XML_Guid="{835C71C4-820A-49D3-A3A6-48DCBFF914AE}">
                                EventGhost.PythonScript(u'#scriptstart\nscriptname = "Interrupt forced restart"\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\ndebug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\nif eg.globals.mp_forced_restart_onok or eg.globals.kodi_forced_restart_onok:\n    if debug: print "eg.globals.mp_forced_restart_onok or eg.globals.kodi_forced_restart_onok true: Interrupting. Stopping to process this event"\n    eg.globals.mp_forced_restart_onok = 0\n    eg.globals.kodi_forced_restart_onok = 0\n    eg.plugins.EventGhost.StopProcessing()\nelse:\n    if debug: print "eg.globals.mp_forced_restart_onok and eg.globals.kodi_forced_restart_onok NOT true: Interrupting. Proceeding with this event"')
                            </Action>
                            <Action Enabled="False" XML_Guid="{DE4928CD-BF43-43BB-A310-9BD3B5857000}">
                                EventGhost.StopProcessing()
                            </Action>
                        </Macro>
                        <Folder Name="MP" XML_Guid="{E0617AF9-18E5-4960-8C2D-458AE1137BE0}">
                            <Folder Name="Settings" XML_Guid="{540DF854-1DD9-4AAB-B12F-9D8EB48DDD51}">
                                <Macro Name="OSD" XML_Guid="{17CB468E-9E27-453C-9F0D-27AB3F2542D1}">
                                    <Event Name="htpc.setosd.mp" XML_Guid="{3D648FFA-883D-4025-8554-D206812993D6}" />
                                    <Action Name="Set OSD Vars" XML_Guid="{E3C8ED19-3B5E-4DC1-B41C-21D074F9645A}">
                                        EventGhost.PythonScript(u'eg.globals.osd_skin = "mp"\neg.globals.osd_font = "TitanSmall"\neg.globals.osd_font_color = (255, 255, 255)\neg.globals.osd_font_size = -29\neg.globals.osd_pos = 6\neg.globals.osd_x = 0\neg.globals.osd_y = 20\neg.globals.osd_vol_font_bold_weight = 400\neg.globals.osd_vol_font_size = -29\neg.globals.osd_vol_font_size_fscreen = -32\neg.globals.osd_vol_font_bold_weight = 200\neg.globals.osd_vol_pos = 1\neg.globals.osd_vol_x = 75\neg.globals.osd_vol_y = 8\neg.globals.osd_vol_pos_fscreen = 6\neg.globals.osd_vol_fscreen_x = 0\neg.globals.osd_vol_fscreen_y = 20\neg.globals.osd_vol_pos_startscreen = 4\neg.globals.osd_vol_startscreen_x = 0\neg.globals.osd_vol_startscreen_y = 0\n#\neg.globals.osd_font_string = \'0;%d;0;0;0;%d;0;0;0;0;3;2;1;34;%s\' % (eg.globals.osd_font_size, eg.globals.osd_vol_font_bold_weight, eg.globals.osd_font)\neg.plugins.FileOperations.Write(2, u\'{eg.globals.osd_font_string}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.osd_font_string.txt\', 0, 0, True, False, False, \'cp1252\')\neg.globals.def_bg = eg.globals.mp_bg')
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{89A16AB3-FAA4-4A48-A1B5-A1368B0B3829}">
                                        EventGhost.ShowOSD(u'hallo', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 4, (0, 0), 0, 3.0, None)
                                    </Action>
                                </Macro>
                            </Folder>
                            <Macro Name="Kill MediaPortal" XML_Guid="{C95A8399-A3D1-4AF3-BFD1-A373E6AEBA32}" Expanded="True">
                                <Event Name="TCP.kill mp" XML_Guid="{0AB58052-BB60-4C7B-AF5A-8489B374581E}" />
                                <Event Name="htpcoff_htpcapp_endactions.killmp" XML_Guid="{35EEE358-1B35-4733-8870-33216BAB817E}" />
                                <Action Enabled="False" XML_Guid="{5D8790A9-05C4-4FC9-8F3C-ED28633B26FD}">
                                    EventGhost.ShowOSD()
                                </Action>
                                <Action XML_Guid="{94D2EB92-A12B-40DE-89BB-D9682F63A0FB}">
                                    System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\Pskill\\pskill_mediaportal.bat', u'', 3, False, 3, u'', False, False)
                                </Action>
                            </Macro>
                        </Folder>
                        <Folder Name="kodi" XML_Guid="{3525F1DC-A4C2-4203-A61F-786F315A1125}" Expanded="True">
                            <Macro Name="Kill kodi" XML_Guid="{E931BA7A-4DBE-47F3-9566-875F0796C281}">
                                <Event Name="routing.endloop.restart_kodi" XML_Guid="{E686929D-F2F2-480C-9D81-74F2C96F4256}" />
                                <Action XML_Guid="{95BD2C4A-E128-444C-B2C6-E3354510987F}">
                                    System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\Pskill\\pskill_kodi.bat', u'', 3, False, 3, u'', False, False, u'', False, False, False, True)
                                </Action>
                            </Macro>
                            <Folder Name="from kodi" XML_Guid="{9913C5C6-2B1D-4FE6-978E-1B3AAB0C6DBB}">
                                <Macro Name="OnVolumeChange" XML_Guid="{4626F484-0EC3-414F-9A99-0D749052BB3C}" Expanded="True">
                                    <Event Name="XBMC2.Application.OnVolumeChanged" XML_Guid="{92383CC0-D0D1-4D47-8C38-15F4B4DB6CB7}" />
                                    <Action Name="OnVolumeChange" XML_Guid="{AEB99C34-1170-4B3C-B14F-1C7E1650D1C9}">
                                        EventGhost.PythonScript(u'eg.globals.kodi_volume = int(round(float(eg.event.payload[\'volume\'])))\nprint "Current kodi volume: "+str(eg.globals.kodi_volume)\neg.plugins.FileOperations.Write(2, u\'{eg.globals.kodi_volume}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.volume_kodi.txt\', 0, 0, True, False, False, \'cp1252\')')
                                    </Action>
                                </Macro>
                            </Folder>
                            <Folder Name="Settings" XML_Guid="{398BEE25-7A95-4DB0-AE4E-AB78AC71CF6D}" Expanded="True">
                                <Macro Name="OSD" XML_Guid="{E280ACBC-A691-44BA-941D-7950F16BDD76}">
                                    <Event Name="htpc.setosd.kodi" XML_Guid="{D6D94997-EF8C-4D73-A71F-0EE492C8B95A}" />
                                    <Action Name="Set OSD Vars" XML_Guid="{47A39D23-A211-4AFC-810D-C113944637C9}">
                                        EventGhost.PythonScript(u'eg.globals.osd_skin = "kodi"\neg.globals.osd_font = "MC360"\neg.globals.osd_font_color = (193, 193, 193)\neg.globals.osd_font_size = -29\neg.globals.osd_pos = 6\neg.globals.osd_x = 0\neg.globals.osd_y = 20\neg.globals.osd_vol_font_bold_weight = 600\neg.globals.osd_vol_font_size = -32\neg.globals.osd_vol_font_size_fscreen = -32\neg.globals.osd_vol_font_bold_weight = 200\neg.globals.osd_vol_pos = 1\neg.globals.osd_vol_x = 45\neg.globals.osd_vol_y = 8\neg.globals.osd_vol_pos_fscreen = 6\neg.globals.osd_vol_fscreen_x = 0\neg.globals.osd_vol_fscreen_y = 20\neg.globals.osd_vol_pos_startscreen = 4\neg.globals.osd_vol_startscreen_x = 0\neg.globals.osd_vol_startscreen_y = 0\neg.globals.osd_font_string = \'0;%d;0;0;0;%d;0;0;0;0;3;2;1;34;%s\' % (eg.globals.osd_font_size, eg.globals.osd_vol_font_bold_weight, eg.globals.osd_font)\neg.plugins.FileOperations.Write(2, u\'{eg.globals.osd_font_string}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.osd_font_string.txt\', 0, 0, True, False, False, \'cp1252\')\neg.globals.def_bg = eg.globals.kodi_bg')
                                    </Action>
                                </Macro>
                                <Folder Name="Kodi Audio Settings" XML_Guid="{3E5B8E19-762D-49A6-8222-594C556D1619}" Expanded="True">
                                    <Macro Name="Prechecks" XML_Guid="{25166045-275B-4E12-BCB7-58AB8F3FFB47}" Expanded="True">
                                        <Event Name="system.appchange.kodi_audio_set" XML_Guid="{04CCC464-F6B8-4C58-A5FE-3DF575D351E4}" />
                                        <Event Name="errorhandling.audiocheck.setkodiaudio" XML_Guid="{18E8B7F9-7A81-43DE-8FFC-0C567F37D3EE}" />
                                        <Action Name="KodiAudioPrecheckScript" XML_Guid="{8474C52A-3530-4FD9-B183-CA6549126422}">
                                            EventGhost.PythonScript(u'#scriptstart\nscriptname = "KodiAudioPrecheckScript"\nimport time\n#test#\n#eg.globals.headset_active = 0\n#\\test#\n#debug\ndebug = eg.globals.debug\ndebug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\nif not eg.globals.kodi_running:\n    print "kodi is not running - SKIPPING"\n    eg.StopMacro()\n    eg.Exit()\nif not eg.globals.amp_connected:\n    print "Amp is not connected - SKIPPING"\n    eg.StopMacro()\n    eg.Exit()\nif eg.globals.headset_active:\n    eg.result = 1\n    if debug: print "Jumping to Headset settings"\n    eg.plugins.EventGhost.NewJumpIf(eg.GUID(\'{AC2C15FB-63D8-41EC-8176-EE7479372C76}\'), 0, False)\nelse:\n    eg.result = 0\n    if debug: print "Jumping to Amp settings"\n    eg.plugins.EventGhost.NewJumpIf(eg.GUID(\'{37E1C4D7-4C05-4299-B2ED-E1C5277D9201}\'), 2, False)\n#debug\nif debug:\n    print "eg.globals.headset_active is: "+str(eg.result)\n    from datetime import datetime\n    print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug')
                                        </Action>
                                    </Macro>
                                    <Macro Name="Set Amp" XML_Guid="{37E1C4D7-4C05-4299-B2ED-E1C5277D9201}" Expanded="True">
                                        <Action Name="Set kodi volume target level" XML_Guid="{7D5DED10-E224-420E-9C09-700D35554581}">
                                            EventGhost.PythonScript(u'#eg.plugins.XBMC2.RemoteVolPlus()\neg.globals.kodi_volume_target = 100')
                                        </Action>
                                        <Action XML_Guid="{5456E3BE-DBE2-4B42-85B7-9282084BDFDA}">
                                            EventGhost.NewJumpIf(eg.GUID('{62F484A6-753C-4D85-BF29-C49F42B24314}'), 2, True)
                                        </Action>
                                        <Action XML_Guid="{2889EFB4-7BE5-418A-973E-E708640E0A7F}">
                                            EventGhost.NewJumpIf(eg.GUID('{8B60A028-9CE7-4C3B-BEB0-D7B8DE0C0A95}'), 2, True)
                                        </Action>
                                        <Action XML_Guid="{73668BAE-6664-4710-AF63-C0D600E77C32}">
                                            EventGhost.NewJumpIf(eg.GUID('{767A2525-16A2-41CF-82F2-B91D9F52B254}'), 2, True)
                                        </Action>
                                        <Action XML_Guid="{B8F2F6E0-54EB-4007-A0AC-28FCA7C6378D}">
                                            EventGhost.NewJumpIf(eg.GUID('{3FD58C60-64E4-4A2A-A321-E68494BACA62}'), 2, True)
                                        </Action>
                                        <Action XML_Guid="{C5D9C0A3-0245-4239-B49B-AD4834519B52}">
                                            EventGhost.NewJumpIf(eg.GUID('{DF0CECC7-C51F-405D-8118-13406BE7BF42}'), 2, True)
                                        </Action>
                                    </Macro>
                                    <Macro Name="Set Headset" XML_Guid="{AC2C15FB-63D8-41EC-8176-EE7479372C76}" Expanded="True">
                                        <Action XML_Guid="{B8F2F6E0-54EB-4007-A0AC-28FCA7C6378D}">
                                            EventGhost.NewJumpIf(eg.GUID('{CEB7903B-0741-4F0E-9E17-48E09CCFA574}'), 2, True)
                                        </Action>
                                        <Action XML_Guid="{2889EFB4-7BE5-418A-973E-E708640E0A7F}">
                                            EventGhost.NewJumpIf(eg.GUID('{A0EA97F4-99FD-4227-97A6-806BF1F6932F}'), 2, True)
                                        </Action>
                                        <Action XML_Guid="{73668BAE-6664-4710-AF63-C0D600E77C32}">
                                            EventGhost.NewJumpIf(eg.GUID('{6800C26F-5F0D-4833-91E7-80668F77439D}'), 2, True)
                                        </Action>
                                        <Action Name="Headset 1 or 2 etc..." XML_Guid="{7374FB7F-6FFA-46AB-9E3E-C96632538B6F}">
                                            EventGhost.PythonScript(u'eg.plugins.XBMC2.RemoteVolPlus()\neg.globals.kodi_volume_target = 100\nif eg.globals.headset_no==1:\n    eg.plugins.EventGhost.NewJumpIf(XmlIdLink(1000), 2, True)\n    eg.result = 1\nelif eg.globals.headset_no==2:\n    eg.plugins.EventGhost.NewJumpIf(XmlIdLink(1003), 2, True)\n    eg.result = 0\nelse:\n    print "Error: Some sort off...."')
                                        </Action>
                                        <Action Enabled="False" XML_Guid="{6CA49835-46AC-495B-A7A7-D4F033E75FDB}">
                                            EventGhost.NewJumpIf(XmlIdLink(1003), 2, True)
                                        </Action>
                                        <Action XML_Guid="{C5D9C0A3-0245-4239-B49B-AD4834519B52}">
                                            EventGhost.NewJumpIf(eg.GUID('{DF0CECC7-C51F-405D-8118-13406BE7BF42}'), 2, True)
                                        </Action>
                                        <Action Name="Debug info to kodi" XML_Guid="{3FE36DF4-AD67-4224-A6CC-605508B8AF1C}">
                                            EventGhost.PythonScript(u"debug = eg.globals.debug\n#debug = 1\nif debug: eg.plugins.XBMC2.SendNotification(u'Eventghost', u'Debug: kodi audio settings have been set')")
                                        </Action>
                                    </Macro>
                                    <Folder Name="in kodi" XML_Guid="{A430723B-6486-45E8-9423-735948B9A9A8}">
                                        <Folder Name="Devices in kodi" XML_Guid="{BC1FCC81-E926-4B78-AE07-BCAC080DB47F}" Expanded="True">
                                            <Macro Name="Set Headset 1" XML_Guid="{879CA57C-1C46-43B2-BD01-CB97DC5E52BD}" Expanded="True">
                                                <Event Name="system.audiorouting.setkodiaudio_h1" XML_Guid="{0D40238F-6B5C-4CB9-8BAB-FEF5EE697648}" />
                                                <Action Name="XBMC2: JSONRPC: Set Headset 1" XML_Guid="{404B10F6-23FD-4F68-A502-95ED22785C86}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.audiodevice", "value": "DIRECTSOUND:{DAC47DC9-5B39-4CF7-B013-A3D189B6ED47}"}', True, True)
                                                </Action>
                                            </Macro>
                                            <Macro Name="Set Headset 2" id="1003" XML_Guid="{879CA57C-1C46-43B2-BD01-CB97DC5E52BD}" Expanded="True">
                                                <Event Name="system.audiorouting.setkodiaudio_h2" XML_Guid="{0D40238F-6B5C-4CB9-8BAB-FEF5EE697648}" />
                                                <Action Name="XBMC2: JSONRPC: Set Headset 2" XML_Guid="{404B10F6-23FD-4F68-A502-95ED22785C86}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.audiodevice", "value": "DIRECTSOUND:{85BF5ECD-86C3-4FE5-AA6A-9ADF4B65D0AB}"}', True, True)
                                                </Action>
                                            </Macro>
                                            <Macro Name="Set Amp" XML_Guid="{62F484A6-753C-4D85-BF29-C49F42B24314}" Expanded="True">
                                                <Event Name="system.audiorouting.setkodiaudio_amp" XML_Guid="{98563E64-7B38-407F-84BB-6F25878E5D27}" />
                                                <Action Name="XBMC2: JSONRPC: Set Amp" XML_Guid="{AD403EB4-772D-4D1D-98CE-8A7C0A0833ED}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.audiodevice", "value": "DIRECTSOUND:{15ACAB82-6989-44D2-845D-C2520D80055D}"}', True, True)
                                                </Action>
                                            </Macro>
                                            <Macro Name="Set system default" XML_Guid="{115B6577-EF37-44D2-8473-E7009D859BC9}">
                                                <Event Name="system.audiorouting.setkodiaudio_amp" Enabled="False" XML_Guid="{DA348C7D-2B47-4669-8803-474E05098DB7}" />
                                                <Action Name="XBMC2: JSONRPC: Set system default" XML_Guid="{DA6776E6-69EB-48CB-92C9-2E73C41B1FD6}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.audiodevice", "value": "DIRECTSOUND:default"}', True)
                                                </Action>
                                            </Macro>
                                        </Folder>
                                        <Folder Name="Bitstreaming on/off" XML_Guid="{DB000C7B-1DE2-4CDF-BFB4-BA852BF7A289}" Expanded="True">
                                            <Macro Name="Bitstreaming kodi on" XML_Guid="{3FD58C60-64E4-4A2A-A321-E68494BACA62}">
                                                <Event Name="system.audiorouting.bitstreaming_kodi_on" XML_Guid="{29FC82EA-CD5E-44DF-BDBF-4AE4ECF3C11D}" />
                                                <Action Enabled="False" XML_Guid="{E2C56A56-4F6D-429B-9F97-13E453BA3541}">
                                                    EventGhost.PythonCommand(u'eg.plugins.SSH.RunCommand(u\'curl -v -H "Content-type: application/json" -X POST -d \\\'{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.passthrough","value":true},"id":1}\\\' http://mmhtpc:8080/jsonrpc\', u\'mmrp01\', False, False, False)')
                                                </Action>
                                                <Action Name="XBMC2: JSONRPC: Bitstreaming on" XML_Guid="{C0F63B8E-AA34-4844-A997-5E950AD00676}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.passthrough","value": True}', True, True)
                                                </Action>
                                                <Action Name="XBMC2: JSONRPC: Settings.SetSettingValue - 877652443546627hhha" XML_Guid="{62F1EE56-4E45-4888-B66F-84C37A24D2DA}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.passthrough","value": True}', True)
                                                </Action>
                                            </Macro>
                                            <Macro Name="Bitstreaming kodi off" XML_Guid="{CEB7903B-0741-4F0E-9E17-48E09CCFA574}">
                                                <Event Name="system.audiorouting.bitstreaming_kodi_off" XML_Guid="{D9E04FF5-0EA9-49CB-A303-231594C83F92}" />
                                                <Action Enabled="False" XML_Guid="{1903A237-F9BE-43F6-8B22-F5175CE1C75D}">
                                                    EventGhost.PythonCommand(u'eg.plugins.SSH.RunCommand(u\'curl -v -H "Content-type: application/json" -X POST -d \\\'{"jsonrpc":"2.0","method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.passthrough","value":false},"id":1}\\\' http://mmhtpc:8080/jsonrpc\', u\'mmrp01\', False, False, False)')
                                                </Action>
                                                <Action Name="XBMC2: JSONRPC: Bitstreaming off" XML_Guid="{B21192B8-E1AB-4E75-98BE-09804974419C}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.passthrough","value": False}', True)
                                                </Action>
                                            </Macro>
                                        </Folder>
                                        <Folder Name="ChannelSettings" XML_Guid="{E72BC7C8-F7EE-4323-9F40-E76089018611}">
                                            <Macro Name="5.1" XML_Guid="{8B60A028-9CE7-4C3B-BEB0-D7B8DE0C0A95}" Expanded="True">
                                                <Event Name="system.audiorouting.kodisetting_channels_5_1" XML_Guid="{8CDC5E8C-6AA4-42D0-9E78-C2C03EC6F65C}" />
                                                <Action Name="XBMC2: JSONRPC: 5.1" XML_Guid="{EC61A3EB-49EA-4F0E-A5B7-4709CDCBB7F9}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.channels","value": 8}', True)
                                                </Action>
                                            </Macro>
                                            <Macro Name="2.0" XML_Guid="{A0EA97F4-99FD-4227-97A6-806BF1F6932F}">
                                                <Event Name="system.audiorouting.kodisetting_channels_2_0" XML_Guid="{81162B8A-F181-4052-9B10-78B4D256441D}" />
                                                <Action Name="XBMC2: JSONRPC: 2.0" XML_Guid="{0E2C4ABC-A33D-4975-A334-DF5AE37E686E}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.channels","value": 1}', True)
                                                </Action>
                                            </Macro>
                                        </Folder>
                                        <Folder Name="OutputConfig" XML_Guid="{4A6CEB24-5627-45BF-BBA7-2B687840FB7E}">
                                            <Macro Name="Fixed" XML_Guid="{6800C26F-5F0D-4833-91E7-80668F77439D}">
                                                <Event Name="system.audiorouting.kodisetting_outputconf_1" XML_Guid="{2C3604AB-22FA-48B7-927A-57F97CB52669}" />
                                                <Action Name="XBMC2: JSONRPC: Conf 1" XML_Guid="{79CF6BE6-52D9-483E-BBBF-3F1A77F3A276}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.config","value": 1}', True)
                                                </Action>
                                            </Macro>
                                            <Macro Name="Optimized" XML_Guid="{A38B1956-D977-4DF2-BF60-7D1C0FE2E20B}">
                                                <Event Name="system.audiorouting.kodisetting_outputconf_2" XML_Guid="{88632C18-108E-4A75-A325-7E2FF7F6BC36}" />
                                                <Action Name="XBMC2: JSONRPC: Conf 2" XML_Guid="{54BE2679-AF48-4AC5-877F-19A7A5FC639B}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.config","value": 2}', True)
                                                </Action>
                                            </Macro>
                                            <Macro Name="Best" XML_Guid="{767A2525-16A2-41CF-82F2-B91D9F52B254}">
                                                <Event Name="system.audiorouting.kodisetting_outputconf_3" XML_Guid="{A40D89AA-4856-45D2-8E1E-52FEE18385E9}" />
                                                <Action Name="XBMC2: JSONRPC: Conf 3" XML_Guid="{5F9479D5-E5A8-4E4D-9A6D-CEF96DDE8F5C}">
                                                    XBMC2.JSONRPC(u'Settings.SetSettingValue', u'{"setting": "audiooutput.config","value": 3}', True)
                                                </Action>
                                            </Macro>
                                        </Folder>
                                        <Folder Name="Volume" XML_Guid="{AE8EFE3E-1B92-4B7D-8942-7A4C1C1BD28F}" Expanded="True">
                                            <Macro Name="Set kodivol" XML_Guid="{DF0CECC7-C51F-405D-8118-13406BE7BF42}" Expanded="True">
                                                <Action Name="Trigger kodivol" Enabled="False" XML_Guid="{0E5BC767-F007-489F-B955-BF46F9A33379}">
                                                    EventGhost.PythonScript(u'print "getting kodivol by vol+1"\nimport time\nif eg.globals.kodi_screensaveractive:\n    eg.plugins.XBMC2.Enter()\n    time.sleep(1)\n#eg.plugins.XBMC2.RemoteVolPlus()')
                                                </Action>
                                                <Action Name="Set kodivol" XML_Guid="{DC8B2563-44EA-4CC8-92CC-FF9D28F62399}">
                                                    EventGhost.PythonScript(u'print "eg.globals.kodi_volume_target is: "+str(eg.globals.kodi_volume_target)\ntry:\n    eg.globals.kodi_volume\nexcept AttributeError:\n    eg.globals.kodi_volume = 100\neg.plugins.XBMC2.JSONRPC(u\'Application.SetVolume\', u\'{ "volume": \' +str(eg.globals.kodi_volume_target) + \'}\', True, True)\neg.globals.kodi_volume = eg.globals.kodi_volume_target')
                                                </Action>
                                            </Macro>
                                        </Folder>
                                    </Folder>
                                </Folder>
                            </Folder>
                        </Folder>
                    </Folder>
                    <Folder Name="running htpcapp dependent" XML_Guid="{70AED543-AD8B-49B0-8187-2B7A26EE3D0F}">
                        <Folder Name="htpcapp MPortal" Enabled="False" XML_Guid="{6788C14A-AC1B-4122-A89D-BAB8909729A1}" Expanded="True">
                            <Folder Name="MediaPortal Befehle" XML_Guid="{18799D3F-4ADD-49B4-8A88-26FF388B2F8D}">
                                <Macro Name="Cursor Up" XML_Guid="{7E6ADABC-1D17-4460-BED1-8587DF2E15E6}">
                                    <Event Name="MceRemote.Mce.Up" XML_Guid="{FCA84C78-447D-40A0-A4CC-8F55CCF78F70}" />
                                    <Event Name="AutoRemote.Message.m8.hoch" XML_Guid="{4A5066B7-FD46-483E-B6EC-A8637B13AD79}" />
                                    <Action XML_Guid="{A50A4FE6-D4C0-481F-956A-E4B28E40499D}">
                                        MediaPortal.Up()
                                    </Action>
                                </Macro>
                                <Macro Name="Cursor Down" XML_Guid="{4D13D248-0292-4BEA-BC88-134827A392C2}">
                                    <Event Name="MceRemote.Mce.Down" XML_Guid="{20578706-715A-4A7D-800B-D2B46BDF1793}" />
                                    <Event Name="iMON_API.Down" XML_Guid="{417F67D4-4AE6-42E3-B294-A4BEE1FC7642}" />
                                    <Event Name="AutoRemote.Message.m8.runter" XML_Guid="{E22B844B-445D-49C4-864D-0EA4DC3C8AC2}" />
                                    <Action XML_Guid="{411E0251-33AD-4E7F-8C5B-B8DB17B131B3}">
                                        MediaPortal.Down()
                                    </Action>
                                </Macro>
                                <Macro Name="Cursor Left" XML_Guid="{57766B81-D5EC-49CF-82BE-60224A3226AA}">
                                    <Event Name="MceRemote.Mce.Left" XML_Guid="{5782F035-2122-4F72-9A0A-A835A6DA72B5}" />
                                    <Event Name="AutoRemote.Message.m8.links" XML_Guid="{AB242BF6-2A85-4C5A-88AD-EC53C67950C7}" />
                                    <Event Name="iMON_API.Left" XML_Guid="{AD320708-DFE2-464E-9F98-267A80DA41C0}" />
                                    <Action XML_Guid="{FD292A1B-9955-4F3C-91DE-C280AD2E4982}">
                                        MediaPortal.Left()
                                    </Action>
                                </Macro>
                                <Macro Name="Cursor Right" XML_Guid="{3BACB101-9287-4385-B090-02D9F4614C91}">
                                    <Event Name="MceRemote.Mce.Right" XML_Guid="{F672BD91-113E-4E7A-98D6-EC67B87914F1}" />
                                    <Event Name="iMON_API.Right" XML_Guid="{33FDE0DF-4A64-4752-AB92-4171277AB49B}" />
                                    <Event Name="AutoRemote.Message.m8.rechts" XML_Guid="{940CC7C1-818D-4940-A30B-21B6D66E0E9B}" />
                                    <Action XML_Guid="{433B2FB1-6AA7-4C60-9B41-ABDFB2109913}">
                                        MediaPortal.Right()
                                    </Action>
                                </Macro>
                                <Macro Name="Ok" XML_Guid="{FCD0C225-0A99-47C1-99ED-ABDFA1671353}">
                                    <Event Name="AutoRemote.Message.m8.ok" XML_Guid="{0A86F3B0-093C-43C4-A6BA-866359A3C05F}" />
                                    <Event Name="MceRemote.Mce.Ok" XML_Guid="{324FB41B-B68B-4C27-81F4-02510F92B422}" />
                                    <Action XML_Guid="{295023C0-1462-4502-AF30-D92E6F630C1B}">
                                        MediaPortal.Ok()
                                    </Action>
                                    <Action XML_Guid="{D9EB8203-3380-4021-BA14-46C25C74DBC9}">
                                        EventGhost.ShowOSD(u'', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;TitanSmall', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 0.01, False)
                                    </Action>
                                </Macro>
                                <Macro Name="Back" XML_Guid="{90A300C7-F157-4CE2-BE5A-93DDF0A63CE9}">
                                    <Event Name="MceRemote.Mce.Back" XML_Guid="{CB06947B-EE63-46AE-9260-262217ED0B21}" />
                                    <Event Name="AutoRemote.Message.m8.zurueck" XML_Guid="{C195D7F8-CD8E-4AD4-9642-A1C0EEC64B59}" />
                                    <Action XML_Guid="{D0CFF795-40AB-4F36-92F3-DE076D74571C}">
                                        MediaPortal.Back()
                                    </Action>
                                    <Action Name="Python Skript: Check MP running" Enabled="False" XML_Guid="{B0B05677-9B5F-4FC5-80BE-A9AA2457CCE8}">
                                        EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.result = len( WMI.ExecQuery(\'select * from Win32_Process where Name="mediaportal.exe"\') ) &gt; 0')
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{6E99C5EA-2A47-4605-ABA5-F464F7EC8135}">
                                        EventGhost.NewJumpIf(eg.GUID('{F01D58F5-F45A-4BC6-BEBF-0981DB3F01A1}'), 1, False)
                                    </Action>
                                </Macro>
                                <Macro Name="NumPad 0" XML_Guid="{673DDAF7-E5E7-4251-BFCB-D368A4787F5C}">
                                    <Event Name="AutoRemote.Message.m8.null" XML_Guid="{115BAE3F-699B-45AA-BE9E-FA033C5B9BE7}" />
                                    <Event Name="MceRemote.Mce.Num0" XML_Guid="{195FDBC1-4535-48FF-B40E-B6731D43C97F}" />
                                    <Action Enabled="False" XML_Guid="{EEDC6ECF-0B16-46E2-9046-0BFD94179176}">
                                        EventGhost.ShowOSD(u'  0  ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{0E4EEAC3-D9C3-46E5-9633-EC02013EEBD3}">
                                        MediaPortal.NumPad0()
                                    </Action>
                                </Macro>
                                <Macro Name="NumPad 1" XML_Guid="{2A2253A7-04C2-4821-8506-1824801DB660}">
                                    <Event Name="MceRemote.Mce.Num1" XML_Guid="{962448CA-A8E2-4AD0-BDE0-0E3B7EE6D1F6}" />
                                    <Event Name="AutoRemote.Message.m8.1" XML_Guid="{A7EF2513-6687-490E-A43B-1CE2F79C65DB}" />
                                    <Action Enabled="False" XML_Guid="{ED9A7DE2-15D3-474A-95FE-126597605BE7}">
                                        EventGhost.ShowOSD(u'  1  ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{3B38D09E-D622-4F90-8946-550F0B45E970}">
                                        MediaPortal.NumPad1()
                                    </Action>
                                </Macro>
                                <Macro Name="NumPad 2" XML_Guid="{1172C59B-246C-4CF7-9209-7687329B8875}">
                                    <Event Name="MceRemote.Mce.Num2" XML_Guid="{F5D719CE-1542-4F10-92BA-A44EE1C75D04}" />
                                    <Event Name="AutoRemote.Message.m8.2" XML_Guid="{EE0B4391-DEBD-4485-AB6C-2022606C0718}" />
                                    <Action Enabled="False" XML_Guid="{F071715D-C86C-487C-8F30-10E9286C9245}">
                                        EventGhost.ShowOSD(u'  2  ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{D2FEE949-EDE4-449C-8428-C05DD70D61D9}">
                                        MediaPortal.NumPad2()
                                    </Action>
                                </Macro>
                                <Macro Name="NumPad 3" XML_Guid="{89C6FC9D-CF8F-4E39-9644-D8E1C34A2D20}">
                                    <Event Name="MceRemote.Mce.Num3" XML_Guid="{784E2BAA-BD22-4BF5-8885-D0866EFAB383}" />
                                    <Event Name="AutoRemote.Message.m8.3" XML_Guid="{3BE057C3-EA9B-452B-A318-B93A4963114A}" />
                                    <Action Enabled="False" XML_Guid="{73B351AC-457B-4F5E-AC44-29271B09A536}">
                                        EventGhost.ShowOSD(u'  3  ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{E1036947-D7AB-405A-8D89-39C92C61367B}">
                                        MediaPortal.NumPad3()
                                    </Action>
                                </Macro>
                                <Macro Name="NumPad 4" XML_Guid="{CEC492A8-D18C-479F-8DAD-7DEDB9C6164C}">
                                    <Event Name="MceRemote.Mce.Num4" XML_Guid="{D156D0C4-C64C-47A1-BF02-6931813411C6}" />
                                    <Event Name="AutoRemote.Message.m8.4" XML_Guid="{04C18644-2CCB-4CBD-8A74-3DC798120C5D}" />
                                    <Action Enabled="False" XML_Guid="{DE4AD18A-30DC-4240-9D9F-CE0843050641}">
                                        EventGhost.ShowOSD(u'  4  ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{B1CCBB02-70B6-4498-A413-B8FD96278C86}">
                                        MediaPortal.NumPad4()
                                    </Action>
                                </Macro>
                                <Macro Name="NumPad 5" XML_Guid="{7C78CDE4-9FA9-40DC-8AB4-D5B51D5F6B38}">
                                    <Event Name="MceRemote.Mce.Num5" XML_Guid="{B3AB834C-2451-44C2-8867-B766F6F5EF80}" />
                                    <Event Name="AutoRemote.Message.m8.5" XML_Guid="{8D60EC6F-C42E-4EE5-9E7F-59222946976B}" />
                                    <Action Enabled="False" XML_Guid="{53DF6809-1E85-444A-AEB0-E9BEA0E20E7C}">
                                        EventGhost.ShowOSD(u'  5  ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{C2EC6C01-2CF9-407E-AC02-ABE9EF6F2DFD}">
                                        MediaPortal.NumPad5()
                                    </Action>
                                </Macro>
                                <Macro Name="NumPad 6" XML_Guid="{A20C3AD3-7B6E-44E0-AD90-FDCF234A566A}">
                                    <Event Name="MceRemote.Mce.Num6" XML_Guid="{38EC2B35-C3E3-40F9-BA59-EC5ECDDD3316}" />
                                    <Event Name="AutoRemote.Message.m8.6" XML_Guid="{7EA2E0D4-5991-4114-85CD-DB2F4FA3C506}" />
                                    <Action Enabled="False" XML_Guid="{57635312-8AF5-48BA-9104-C37CD5FCC5EF}">
                                        EventGhost.ShowOSD(u'  6  ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{728EEC49-C37D-4818-B20F-E21AF1D44AC7}">
                                        MediaPortal.NumPad6()
                                    </Action>
                                </Macro>
                                <Macro Name="NumPad 7" XML_Guid="{099FE81F-EBCB-4EB6-98AB-305D3B2428FF}">
                                    <Event Name="MceRemote.Mce.Num7" XML_Guid="{52E355DF-E704-4031-8B82-D21F59DE9A2B}" />
                                    <Event Name="AutoRemote.Message.m8.7" XML_Guid="{16EFF1E5-A345-42BA-A7BE-93BC0196FA51}" />
                                    <Action Enabled="False" XML_Guid="{3A60D714-77B6-47FB-BFA7-80DCBC98EDD7}">
                                        EventGhost.ShowOSD(u'  7  ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{AF5FE6F1-54FE-4FB5-ADF9-9E6FD27C20A3}">
                                        MediaPortal.NumPad7()
                                    </Action>
                                </Macro>
                                <Macro Name="NumPad 8" XML_Guid="{BB05E26F-1454-4667-B818-7AA3611D27C4}">
                                    <Event Name="MceRemote.Mce.Num8" XML_Guid="{2F430523-D74C-4B2F-8E87-70E09C8CA8D8}" />
                                    <Event Name="AutoRemote.Message.m8.8" XML_Guid="{E7B36443-F63A-41E5-97AC-AD53DAEFDEDC}" />
                                    <Action Enabled="False" XML_Guid="{83BAD2FB-24BA-43DE-9580-50420F47E42A}">
                                        EventGhost.ShowOSD(u'  8  ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{36CA141F-8EBE-491C-A587-52A9B637E5DF}">
                                        MediaPortal.NumPad8()
                                    </Action>
                                </Macro>
                                <Macro Name="NumPad 9" XML_Guid="{0CCF6B7D-B654-4D0B-BDE0-A8FC10F9DA23}">
                                    <Event Name="MceRemote.Mce.Num9" XML_Guid="{0F2F7111-84AD-49EC-94AD-817C721C7789}" />
                                    <Event Name="AutoRemote.Message.m8.9" XML_Guid="{6C12C4E5-3834-48E1-8A35-7F3E509F15EB}" />
                                    <Action Enabled="False" XML_Guid="{7272D899-C811-4953-A079-77AF3A055FBA}">
                                        EventGhost.ShowOSD(u'  9  ', u'0;-37;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{EA0E9560-2B4B-4B21-9DFE-E894EC845DDF}">
                                        MediaPortal.NumPad9()
                                    </Action>
                                </Macro>
                                <Macro Name="Enter" XML_Guid="{BC03B23D-F006-49FC-8C60-825F3658AA8D}">
                                    <Event Name="MceRemote.Mce.Enter" XML_Guid="{98D63327-AE1D-464E-99C7-A3F3949FB93F}" />
                                    <Action XML_Guid="{6465477F-3AB2-4C2A-A911-007F617DB0A8}">
                                        MediaPortal.Enter()
                                    </Action>
                                    <Action Name="Enter in Message: Prev oder Playlist" XML_Guid="{D5E34964-3FC7-48A2-B57A-C9B9868C9E6F}">
                                        EventGhost.Comment()
                                    </Action>
                                </Macro>
                                <Macro Name="Power1" XML_Guid="{1D5DF38C-D33E-4B86-9C0F-23F08A29800F}">
                                    <Action XML_Guid="{ED461BF1-47C4-429E-A11B-FBF4A2233346}">
                                        EventGhost.PythonCommand('MediaPortal.Power1()')
                                    </Action>
                                </Macro>
                                <Macro Name="Power2" XML_Guid="{370FE34E-904C-4B8A-A15E-AF3C6512717F}">
                                    <Action XML_Guid="{4BC853CF-7418-4F1F-955E-708938990D2A}">
                                        EventGhost.PythonCommand('MediaPortal.Power2()')
                                    </Action>
                                    <Action Name="In Mp Message: Power, set to Stand by" XML_Guid="{0F8172D6-E9F8-4221-8901-96A62110A81C}">
                                        EventGhost.Comment()
                                    </Action>
                                </Macro>
                                <Macro Name="Start" XML_Guid="{E144649F-E30E-4195-B813-F0BD89585826}">
                                    <Event Name="MceRemote.Mce.Start" XML_Guid="{1C5BFE52-87B9-4A1F-B6B0-6C347F084B75}" />
                                    <Event Name="AutoRemote.Message.m8.home" XML_Guid="{228571EE-F0C4-4309-8C8E-3C7C3D0AA88B}" />
                                    <Action XML_Guid="{3FBD69AC-34AB-4E41-B777-46781A96214A}">
                                        MediaPortal.Start()
                                    </Action>
                                </Macro>
                                <Macro Name="Info" XML_Guid="{8690F982-181B-49F3-9407-C58011C1DE8E}">
                                    <Event Name="MceRemote.Mce.Details" XML_Guid="{F75D6A7D-148F-43E2-80F0-8BA3343669F0}" />
                                    <Event Name="iMON_API.DVDMenu" XML_Guid="{3ABADAAE-BB18-4201-99CB-140FE8A64288}" />
                                    <Action XML_Guid="{83095AF5-A0C4-4263-AA81-564C11A49507}">
                                        MediaPortal.Info()
                                    </Action>
                                    <Action Name="Menu Taste!" XML_Guid="{E830E298-A537-4FDA-809E-178E7F6D2CF2}">
                                        EventGhost.Comment()
                                    </Action>
                                </Macro>
                                <Folder Name="Volume" Enabled="False" XML_Guid="{E538FE04-4614-478E-AE3D-36DE22789B78}">
                                    <Macro Name="Volume Up" Enabled="False" XML_Guid="{BA6F802F-33CA-4968-A70B-08B6E298CCEE}">
                                        <Event Name="MceRemote.Mce.VolumeUp" XML_Guid="{8DFDFCAE-81E1-4B3B-A972-9EE0C3C0786A}" />
                                        <Event Name="iMON_API.Volume+" XML_Guid="{C78335D8-EAA4-408A-B610-14DFF9A8C783}" />
                                        <Action XML_Guid="{6CC0BAE8-F94E-413D-86BD-AE8919BFF54A}">
                                            MediaPortal.VolumeUp()
                                        </Action>
                                        <Action XML_Guid="{BE7DB33B-22D3-47E0-A097-2A1313A49E66}">
                                            EventGhost.AutoRepeat(0.5, 0.5, 0.05, 2.0)
                                        </Action>
                                    </Macro>
                                    <Macro Name="Volume Down" Enabled="False" XML_Guid="{3A5E4DE0-78FD-4A81-9344-7612A8E4876A}">
                                        <Event Name="MceRemote.Mce.VolumeDown" XML_Guid="{17A96D98-7829-46B2-9D9B-6CB5E32DC366}" />
                                        <Event Name="iMON_API.Volume-" XML_Guid="{16406D69-E4F3-41F3-AE65-F5346F451642}" />
                                        <Action XML_Guid="{A28DFD6E-D04D-4CE2-97DA-F8508361E1C9}">
                                            MediaPortal.VolumeDown()
                                        </Action>
                                        <Action XML_Guid="{31216163-8D6E-4D2C-8B34-55C0BFEE3569}">
                                            EventGhost.AutoRepeat(0.5, 0.5, 0.05, 2.0)
                                        </Action>
                                    </Macro>
                                    <Folder Name="Mute" Enabled="False" XML_Guid="{7624EA62-30B1-43A2-B402-7752E8394AC3}">
                                        <Macro Name="Mute on" XML_Guid="{5BEBAA93-3AF9-4F71-BAC1-D4F082B39C77}">
                                            <Event Name="iMON_API.Mute" XML_Guid="{2B18EDF7-52CA-401C-B14D-D7C4DB6693E5}" />
                                            <Event Name="MceRemote.Mce.Mute" XML_Guid="{7ED536DC-8C73-425D-B528-0B3B506C164E}" />
                                            <Action XML_Guid="{0D38F359-CD66-47B1-84B4-A34167FCD48B}">
                                                EventGhost.ShowOSD()
                                            </Action>
                                            <Action XML_Guid="{9C36DE7B-AF95-40B7-8B8E-D230D9F143E9}">
                                                MediaPortal.Mute()
                                            </Action>
                                            <Action XML_Guid="{55F7281F-D709-4AF7-B2E1-C1A69EDDDF6C}">
                                                EventGhost.EnableItem(eg.GUID('{2C0B8E94-8126-4C5D-988E-9F7F24A7C187}'))
                                            </Action>
                                            <Action XML_Guid="{B95F9D67-5325-4B9F-A991-A167B1BBBDB4}">
                                                EventGhost.DisableItem(eg.GUID('{5BEBAA93-3AF9-4F71-BAC1-D4F082B39C77}'))
                                            </Action>
                                        </Macro>
                                        <Macro Name="Mute off" Enabled="False" XML_Guid="{2C0B8E94-8126-4C5D-988E-9F7F24A7C187}">
                                            <Event Name="iMON_API.Mute" XML_Guid="{C90AFE97-0B97-4E00-A98B-C5D76F6FA08D}" />
                                            <Event Name="MceRemote.Mce.Mute" XML_Guid="{EA33BBCF-62A4-4714-BAE2-D028E32A897E}" />
                                            <Action XML_Guid="{6DEFFE40-BB8E-40A6-A9B3-4FF816AFD0E4}">
                                                EventGhost.ShowOSD(u'', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                            </Action>
                                            <Action XML_Guid="{7D6DDEE6-917B-4147-9E52-3A5016756BB4}">
                                                MediaPortal.Mute()
                                            </Action>
                                            <Action XML_Guid="{9A57D7D2-077B-4435-B194-A7B5AA89DD3F}">
                                                EventGhost.EnableItem(eg.GUID('{5BEBAA93-3AF9-4F71-BAC1-D4F082B39C77}'))
                                            </Action>
                                            <Action XML_Guid="{11E385D0-E26C-4CB3-AE02-5E41ACE3719E}">
                                                EventGhost.DisableItem(eg.GUID('{2C0B8E94-8126-4C5D-988E-9F7F24A7C187}'))
                                            </Action>
                                        </Macro>
                                    </Folder>
                                </Folder>
                                <Macro Name="Beschleunige Subs" Enabled="False" XML_Guid="{AEC4863D-EAA6-4B9D-B3A0-1C5C5627FC23}">
                                    <Event Name="MceRemote.Mce.ChannelUp" XML_Guid="{D2883285-2260-47BE-A2E3-4638992D6DE5}" />
                                    <Event Name="iMON_API.Channel+" XML_Guid="{0134F86D-2E6A-4322-B689-DA48FEC9E5DB}" />
                                    <Action XML_Guid="{4F834C46-E751-4674-A5E7-F13AF28D9EA7}">
                                        MediaPortal.ChannelUp()
                                    </Action>
                                    <Action XML_Guid="{265B7A07-98A7-49B7-9C9D-4B5DF12D397F}">
                                        EventGhost.StopProcessing()
                                    </Action>
                                    <Action Name="Check Dimension" XML_Guid="{66AF1132-2545-4344-A290-EF393F90E878}">
                                        EventGhost.PythonScript(u'if eg.globals.dimension == "3D":\n    eg.StopMacro()\nelse:\n    pass')
                                    </Action>
                                    <Action XML_Guid="{36564929-D526-48B4-A823-F031B85A9074}">
                                        EventGhost.ShowOSD(u'     Untertitel holen auf     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                </Macro>
                                <Macro Name="Verzögere Subs" Enabled="False" XML_Guid="{E09CA6B8-916E-4BFE-99F9-9FA5461882CD}">
                                    <Event Name="MceRemote.Mce.ChannelDown" XML_Guid="{86F05330-FFF0-4AD7-81D7-A33D70E60230}" />
                                    <Event Name="iMON_API.Channel-" XML_Guid="{C618DD81-3FEA-4764-91DD-CF2EEC07E46F}" />
                                    <Action XML_Guid="{58346798-BFF4-482D-B90B-544D21B34B65}">
                                        EventGhost.StopProcessing()
                                    </Action>
                                    <Action XML_Guid="{ACBA2FC9-C247-4FE9-BABB-1623E2DEADFF}">
                                        MediaPortal.ChannelDown()
                                    </Action>
                                    <Action Name="Check Dimension" XML_Guid="{FBD02A59-4E35-459C-A380-D501A2F2615F}">
                                        EventGhost.PythonScript(u'if eg.globals.dimension == "3D":\n    eg.StopMacro()\nelse:\n    pass')
                                    </Action>
                                    <Action XML_Guid="{5B324EA7-37D6-4295-B535-EFA0A0912FE6}">
                                        EventGhost.ShowOSD(u'     Untertitel werden verlangsamt     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                </Macro>
                                <Macro Name="Channel Up" XML_Guid="{241D4963-9027-40CC-ABC0-71ACFEC37BEA}">
                                    <Event Name="MceRemote.Mce.ChannelUp" XML_Guid="{4C16AE49-1B32-4136-8C10-B5D1D6ADC6BE}" />
                                    <Event Name="iMON_API.Channel+" XML_Guid="{C8899D86-681A-4674-96AD-D0F57E160068}" />
                                    <Action XML_Guid="{80D80B10-63DA-43E1-8B02-DC7E0D3934DB}">
                                        MediaPortal.ChannelUp()
                                    </Action>
                                </Macro>
                                <Macro Name="Channel Down" XML_Guid="{1D7A886B-8EE3-427C-9E02-500721B37650}">
                                    <Event Name="MceRemote.Mce.ChannelDown" XML_Guid="{C2DD625A-10AC-43E0-B723-F616CC3F882F}" />
                                    <Event Name="iMON_API.Channel-" XML_Guid="{7FC84F67-D3CC-4853-90E6-6251A5355A34}" />
                                    <Action XML_Guid="{A523214D-503A-488D-9E40-94EC453D1E74}">
                                        MediaPortal.ChannelDown()
                                    </Action>
                                </Macro>
                                <Macro Name="Forward" XML_Guid="{80A9D081-45BF-49BA-BE55-25A0D0E7E662}">
                                    <Event Name="MceRemote.Mce.Forward" XML_Guid="{C6DD5831-17DB-4544-A120-C974A5D03FAC}" />
                                    <Event Name="iMON_API.Forward" XML_Guid="{CDED2F11-E9CD-46DC-B8B8-992EC36F972B}" />
                                    <Action XML_Guid="{4E531D57-9006-4E57-8A21-73F55C643AA9}">
                                        EventGhost.ShowOSD(u'     Vorspulen     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{B63882B5-164F-483D-BBF3-84A11CEDB2F8}">
                                        MediaPortal.Forward()
                                    </Action>
                                </Macro>
                                <Macro Name="Rewind" XML_Guid="{7B22EBEF-CC6B-4EAB-9799-B493E7492830}">
                                    <Event Name="MceRemote.Mce.Rewind" XML_Guid="{1986A638-3CEC-4678-B90B-B20F99BD50EE}" />
                                    <Event Name="iMON_API.Rewind" XML_Guid="{95D46209-5604-44B1-8344-6F854AE3FE86}" />
                                    <Action XML_Guid="{2CC81237-31B5-4E02-A961-C55483195E8F}">
                                        EventGhost.ShowOSD(u'     Zur\xfcckspulen     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{3AE91847-CD81-4BF3-B833-4783C13874A1}">
                                        MediaPortal.Rewind()
                                    </Action>
                                </Macro>
                                <Macro Name="MyTV" XML_Guid="{829DDE6D-6BDF-49FD-8440-937768B00704}">
                                    <Event Name="MceRemote.Mce.TV" Enabled="False" XML_Guid="{596DFF99-ED69-4382-9F79-8FFEB9D71D5F}" />
                                    <Event Name="iMON_API.MyTV" XML_Guid="{46D4A2AA-CC39-49FD-905B-F4C5E8515FF5}" />
                                    <Action Enabled="False" XML_Guid="{E8600976-BAD6-420D-9D3C-6EEB4DEAEE39}">
                                        EventGhost.ShowOSD(u'     Fernsehen     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action Name="MediaPortal: MyTV" XML_Guid="{6C76B8B5-8FE2-4122-9BA5-9B4569A88171}">
                                        MediaPortal.MyTV()
                                    </Action>
                                </Macro>
                                <Macro Name="Pause" XML_Guid="{07E060BD-39D6-4C1D-9687-A5A287EE3157}">
                                    <Event Name="MceRemote.Mce.Pause" XML_Guid="{46E9135D-C708-4077-8966-1080CDB770B7}" />
                                    <Event Name="iMON_API.Pause" XML_Guid="{10802BB2-0C02-435A-84A4-B9E85C41A0FF}" />
                                    <Event Name="AutoRemote.Message.m8.pause" XML_Guid="{27EE3D06-1C8E-482B-A671-A2B32D4588A0}" />
                                    <Action XML_Guid="{6E2CBBEA-AA89-48FE-BD04-1D78FE893290}">
                                        MediaPortal.Pause()
                                    </Action>
                                </Macro>
                                <Macro Name="Play" XML_Guid="{78307A6A-3D7B-41BD-9788-B7ACD2CA77E0}">
                                    <Event Name="MceRemote.Mce.Play" XML_Guid="{FA3A699A-7E42-4998-8B54-ED442B87643B}" />
                                    <Event Name="iMON_API.Play" XML_Guid="{17F633EE-A50A-4A1C-84DE-4511C356D950}" />
                                    <Event Name="AutoRemote.Message.m8.play" XML_Guid="{944E4E15-5814-488F-988F-302F5656B0EC}" />
                                    <Action XML_Guid="{99CED011-A740-4E28-81BA-1B10A545E744}">
                                        MediaPortal.Play()
                                    </Action>
                                </Macro>
                                <Macro Name="Record" XML_Guid="{17285C30-05DE-41D5-ACEE-3F760E65DB26}">
                                    <Event Name="MceRemote.Mce.Record" XML_Guid="{876D8D6A-BA68-48BD-88AF-DDB9B314D286}" />
                                    <Event Name="iMON_API.Record" XML_Guid="{0F94BB2A-E9DC-458B-9896-734C62062E62}" />
                                    <Event Name="AutoRemote.Message.m8.record" XML_Guid="{C7D2ECDA-1632-4003-9B8A-0D5277DBF495}" />
                                    <Action XML_Guid="{CC43AAFB-84B2-414E-A001-E9300989D1BC}">
                                        EventGhost.ShowOSD()
                                    </Action>
                                    <Action XML_Guid="{0E749CFF-FD41-4EF8-B2FA-AFF418E0416E}">
                                        MediaPortal.Record()
                                    </Action>
                                </Macro>
                                <Macro Name="Stop" XML_Guid="{9B8DEC2B-7700-4E86-81F1-F1A64C3313F7}">
                                    <Event Name="MceRemote.Mce.Stop" XML_Guid="{2A10BFE0-8E77-46F3-A1A9-B7FC13EEA9BB}" />
                                    <Event Name="iMON_API.Stop" XML_Guid="{2DEB8C8B-3019-4B42-8D47-B552CDEEA0C5}" />
                                    <Event Name="AutoRemote.Message.m8.stop" XML_Guid="{B0733450-F545-43D5-B6CE-F20500DB6214}" />
                                    <Action Enabled="False" XML_Guid="{57743785-AB49-4264-9726-F20535C782A3}">
                                        EventGhost.ShowOSD()
                                    </Action>
                                    <Action XML_Guid="{8E6B87B1-28A6-4A7B-B907-33DB9A9BDDE1}">
                                        MediaPortal.Stop()
                                    </Action>
                                </Macro>
                                <Macro Name="Skip" XML_Guid="{8C5FB8EA-A357-4067-AB13-2FC4FA929969}">
                                    <Event Name="MceRemote.Mce.Skip" XML_Guid="{C3E7F9E9-C521-429A-A857-C72129CA7BB2}" />
                                    <Event Name="iMON_API.Next" XML_Guid="{EAC0C9AB-B834-40AE-A6D7-E82E0C562BA2}" />
                                    <Event Name="AutoRemote.Message.m8.skip" XML_Guid="{7134A002-F4DA-4562-AE89-96EAC18BEA08}" />
                                    <Action Enabled="False" XML_Guid="{CC3178EF-70E3-414F-93B3-DA9D09B16931}">
                                        EventGhost.ShowOSD(u'     N\xe4chster Track     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{467C4103-07F4-494C-9BE1-F07087E5D00C}">
                                        MediaPortal.Skip()
                                    </Action>
                                </Macro>
                                <Macro Name="Replay" XML_Guid="{4A0413BD-94D6-4DAE-9FFC-96E6F2F98B4B}">
                                    <Event Name="MceRemote.Mce.Replay" XML_Guid="{CE58D90C-3A23-4797-B781-7C58E855ECBA}" />
                                    <Event Name="iMON_API.Prev" XML_Guid="{C45B5399-8AAF-4000-B3C8-8F84AB622A08}" />
                                    <Event Name="AutoRemote.Message.m8.replay" XML_Guid="{594F0CFD-5C6E-4E6A-A0C9-A161B50E4274}" />
                                    <Action Enabled="False" XML_Guid="{726E9711-1893-437C-962F-A0084AEAC68F}">
                                        EventGhost.ShowOSD(u'     Vorheriger Track     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{64ED6352-047A-4D48-977F-D37301CDD3CC}">
                                        MediaPortal.Replay()
                                    </Action>
                                </Macro>
                                <Macro Name="#" XML_Guid="{4663C5D1-FA90-46F8-8FAF-CC81FBB4B147}">
                                    <Event Name="AutoRemote.Message.m8.filme" XML_Guid="{0C121135-E541-4FDC-97B1-3A025914BA34}" />
                                    <Action XML_Guid="{DACB547D-4D6B-4A3B-B2E7-F65A29B5BC83}">
                                        MediaPortal.OemGate()
                                    </Action>
                                    <Action Name="# in Message (Moving Pictures)" XML_Guid="{3B57C4A0-F6BC-40D7-9CBE-4BA6E400B4AC}">
                                        EventGhost.Comment()
                                    </Action>
                                </Macro>
                                <Macro Name="*" Enabled="False" XML_Guid="{9C9C511F-77AC-4A06-B06A-ED03FE164B5D}">
                                    <Event Name="MceRemote.Mce.Star" XML_Guid="{B5CFDC67-45C7-4E7B-A194-FDE53D17C3CF}" />
                                    <Action XML_Guid="{98B22CAB-E632-46AE-BFA3-C6A2B64EF21B}">
                                        MediaPortal.Oem8()
                                    </Action>
                                    <Action Name="* in Message Basic Home" XML_Guid="{01DD6D28-CE22-4AF7-A88D-41395D0ACCA4}">
                                        EventGhost.Comment()
                                    </Action>
                                </Macro>
                                <Macro Name="DVDMenu" XML_Guid="{2AA34480-424C-4AA8-843E-843407F5B115}" Expanded="True">
                                    <Action XML_Guid="{5182A2F1-2D5A-434C-98B5-E2B86C370366}">
                                        MediaPortal.DVDMenu()
                                    </Action>
                                    <Action Name="Home" XML_Guid="{5278FA5C-C561-45AC-A115-D322D80037E9}">
                                        EventGhost.Comment()
                                    </Action>
                                </Macro>
                                <Macro Name="LiveTV" XML_Guid="{C06E1004-2E8A-48E2-AB05-00FF29FAB40B}">
                                    <Action Name="Achtung: MCE-Button ist auf Off-Button gemappt" XML_Guid="{031584DD-A5DD-44D8-9147-216C7F88391E}">
                                        EventGhost.Comment()
                                    </Action>
                                    <Action XML_Guid="{77CD2708-0F6F-4A78-AEDD-922468086384}">
                                        MediaPortal.LiveTV()
                                    </Action>
                                    <Action Name="In MP gemappt auf Home" XML_Guid="{210EDE3E-5E82-49AC-8B36-33E5CFDC692A}">
                                        EventGhost.Comment()
                                    </Action>
                                </Macro>
                                <Macro Name="Guide" XML_Guid="{EAA29F6B-E2CB-41F1-A834-51CBF85212FF}">
                                    <Event Name="MceRemote.Mce.Guide" XML_Guid="{520369B1-DEBD-45F7-A889-25FE6D836B46}" />
                                    <Event Name="AutoRemote.Message.m8.guide" XML_Guid="{D62875E4-7A57-4A91-975C-E0F840113017}" />
                                    <Action Enabled="False" XML_Guid="{20E05E24-D026-4C75-BEB6-CA767FD01B67}">
                                        EventGhost.ShowOSD(u'     Programmguide     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{682C2B46-BA57-4888-A2CD-2EA26157EE3C}">
                                        MediaPortal.Guide()
                                    </Action>
                                </Macro>
                                <Macro Name="AspectRatio" XML_Guid="{540421FB-76C9-4A8C-B4A9-A89B6BD39FF2}">
                                    <Action XML_Guid="{AE1F6344-815F-44D9-A41D-F344AC4197C9}">
                                        MediaPortal.AspectRatio()
                                    </Action>
                                </Macro>
                                <Macro Name="MyMusic" XML_Guid="{16BA7731-1EC4-4C27-887A-7F505514EBEE}">
                                    <Event Name="MceRemote.Mce.Music" Enabled="False" XML_Guid="{EA6F32D4-C70B-4EFB-9D4E-1E06AD3DA093}" />
                                    <Event Name="iMON_API.MyMusic" XML_Guid="{6C6BF616-0900-4FD6-8DF3-49250FD7A4D7}" />
                                    <Action Enabled="False" XML_Guid="{F121272E-FB3C-45D2-A453-E3666D8072B1}">
                                        EventGhost.ShowOSD(u'     Musik     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{BC1CD4B5-70F3-4CC1-A39F-70745A47B6D7}">
                                        MediaPortal.MyMusic()
                                    </Action>
                                </Macro>
                                <Macro Name="RecordedTV" XML_Guid="{F6F0B35F-9E08-48F7-AD9C-11134209BB6C}">
                                    <Event Name="MceRemote.Mce.Recorded_TV" XML_Guid="{9A12FC4A-1910-40A0-8D70-89918EA1CBD1}" />
                                    <Action Enabled="False" XML_Guid="{DC70021B-65DF-4E97-B212-4839820BDC51}">
                                        EventGhost.ShowOSD(u'     Aufnahmen     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{7447918B-27FB-4784-95A7-14ACA72BEDAD}">
                                        MediaPortal.RecordedTV()
                                    </Action>
                                </Macro>
                                <Macro Name="MyPictures" XML_Guid="{D5315677-E76C-4831-A771-B6774D55923B}">
                                    <Event Name="MceRemote.Mce.Pictures" Enabled="False" XML_Guid="{5CBFA046-9BDE-467F-B959-C28D4F48C422}" />
                                    <Event Name="iMON_API.MyPictures" XML_Guid="{ABEEA203-6282-4BB8-8A55-A06C61E9FF19}" />
                                    <Action XML_Guid="{E86C53F9-F690-43E5-95AD-ED20E30CA8B7}">
                                        EventGhost.ShowOSD(u'     Bilder     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{72674ACC-5A5D-4B04-833B-C45992355573}">
                                        MediaPortal.MyPictures()
                                    </Action>
                                </Macro>
                                <Macro Name="MyVideos" XML_Guid="{A923070C-4F54-4F51-BE9E-026E2C5272B9}">
                                    <Event Name="AutoRemote.Message.m8.serien" XML_Guid="{69681A95-86E5-4689-BF84-B07A323145CF}" />
                                    <Action XML_Guid="{BD2241CE-FC31-4235-8116-71F77BDB2FEA}">
                                        MediaPortal.MyVideos()
                                    </Action>
                                </Macro>
                                <Macro Name="MyRadio" XML_Guid="{CA80DAD5-252E-4AE9-A82A-90870DB8147F}">
                                    <Event Name="MceRemote.Mce.Radio" Enabled="False" XML_Guid="{FEEECD82-B746-4786-B817-B5D3D1F202CF}" />
                                    <Action XML_Guid="{43FB306C-C04C-4107-A3F8-F772D02050C7}">
                                        EventGhost.ShowOSD(u'     Radio     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{5B5B43E7-A70D-4AAC-8903-909323EBBB0D}">
                                        MediaPortal.MyRadio()
                                    </Action>
                                </Macro>
                                <Macro Name="Subtitles toggle" Enabled="False" XML_Guid="{B977052D-C6D9-4A2B-8F8B-4F7634A8DB5B}" Expanded="True">
                                    <Event Name="MceRemote.Mce.Subtitle" XML_Guid="{F51727F2-0648-4A16-8CDB-4600EA671065}" />
                                    <Event Name="iMON_API.Subtitle" XML_Guid="{B4141868-7DF0-4C6D-8A1B-D82D8A8CEBF6}" />
                                    <Action XML_Guid="{69C20C2D-3CC6-4BFD-A731-CF61D495B363}">
                                        EventGhost.ShowOSD(u'     Subs on/off     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{2ABE2F12-1E60-464F-B09F-7DBE8411856F}">
                                        MediaPortal.Teletext()
                                    </Action>
                                </Macro>
                                <Macro Name="Teletext" Enabled="False" XML_Guid="{8309A026-1F10-4104-A3ED-CD1A08286B2D}">
                                    <Event Name="MceRemote.Mce.Teletext" XML_Guid="{8E652E9A-36AF-4452-B15D-AC36DA726BA1}" />
                                    <Action XML_Guid="{C6A3109A-C76D-4510-AD4E-75A5F83F226B}">
                                        EventGhost.ShowOSD(u'     Videotext     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{FA3FBB60-195E-4B07-993E-301C8D007D8F}">
                                        MediaPortal.Teletext()
                                    </Action>
                                </Macro>
                                <Macro Name="Red" XML_Guid="{743AF25B-8BC2-4F02-94BD-D25083BF96FA}">
                                    <Event Name="MceRemote.Mce.Red" XML_Guid="{0F56A98F-0ED6-4D34-8DE6-DF4F5432FB03}" />
                                    <Action XML_Guid="{75E8E401-D5FE-40BA-A95F-025F5C6A99F2}">
                                        MediaPortal.Red()
                                    </Action>
                                    <Action XML_Guid="{E9C92072-A044-4551-ABC4-1402F7CD2D24}">
                                        EventGhost.NewJumpIf(eg.GUID('{A47BC3F8-8AA2-4ADD-AD69-EBCD6035E8CC}'), 2, True)
                                    </Action>
                                </Macro>
                                <Macro Name="Green" XML_Guid="{8B6D6818-063A-4F7F-9782-5E3A10AEA461}">
                                    <Event Name="MceRemote.Mce.Green" XML_Guid="{A50AA000-60D1-4635-8FE3-61243D90650C}" />
                                    <Action XML_Guid="{067A898A-2753-4DC1-B129-D1A4318C8B2E}">
                                        MediaPortal.Green()
                                    </Action>
                                </Macro>
                                <Macro Name="Untertitelspur" Enabled="False" XML_Guid="{7518CD4F-55B3-498B-8330-E9E55F8B2FB9}" Expanded="True">
                                    <Event Name="MceRemote.Mce.Yellow" XML_Guid="{60E7A170-E124-4575-9880-AB2F2E00987C}" />
                                    <Action XML_Guid="{2B9A6C61-8B68-46D7-BEE5-5779ABE15830}">
                                        EventGhost.ShowOSD(u'     N\xe4chster Untertitel     ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 0), 0, 3.0, u'mp')
                                    </Action>
                                    <Action XML_Guid="{4ADA9435-03AB-435E-8ACE-6C17577DD929}">
                                        MediaPortal.Yellow()
                                    </Action>
                                    <Action XML_Guid="{6F7F1CAB-1652-43EF-8FE5-09A29B035E87}">
                                        EventGhost.StopProcessing()
                                    </Action>
                                </Macro>
                                <Macro Name="Yellow" XML_Guid="{518CF2B1-A315-4D8C-98EA-0663F8B30D56}">
                                    <Event Name="MceRemote.Mce.Yellow" XML_Guid="{A5F72AF8-ED94-4E1B-9761-92C775278F9A}" />
                                    <Action XML_Guid="{422DDED5-5781-4168-9BCF-ADEF1E085B6A}">
                                        MediaPortal.Yellow()
                                    </Action>
                                </Macro>
                                <Macro Name="Blue" XML_Guid="{2AD6C6FC-08B4-46E2-8BF0-F22DDAC6EDE3}">
                                    <Event Name="MceRemote.Mce.Blue" XML_Guid="{62027F14-F151-4B4D-BBD6-48C1C0F9AD15}" />
                                    <Action XML_Guid="{58995C9E-F3D5-4394-8D60-FDC1DF24AE4B}">
                                        MediaPortal.Blue()
                                    </Action>
                                </Macro>
                                <Macro Name="PowerTV" XML_Guid="{7EA2D82C-9E30-476C-B82D-52AD3C4719DF}" Expanded="True">
                                    <Action XML_Guid="{72E49292-D8DE-41EF-8CF0-B78C2A756087}">
                                        MediaPortal.PowerTV()
                                    </Action>
                                    <Action Name="Das ist die off Taste für mp" XML_Guid="{61364171-A1AA-4846-901B-4CCAED7E2B13}">
                                        EventGhost.Comment()
                                    </Action>
                                </Macro>
                                <Macro Name="Print" XML_Guid="{23F7EEA7-69D1-45E9-9963-4A4719650781}" Expanded="True">
                                    <Event Name="MceRemote.Mce.Escape" XML_Guid="{E68CCBB8-BD9A-4A73-B5F9-2F4677AFB306}" />
                                    <Action XML_Guid="{9D1BE15A-3766-46CC-85B2-81696B864872}">
                                        MediaPortal.Print()
                                    </Action>
                                    <Action Name="Gemappt auf Info Taste" XML_Guid="{90E78520-6F74-49EC-9BDF-92EB66048129}">
                                        EventGhost.Comment()
                                    </Action>
                                </Macro>
                                <Macro Name="Messenger" XML_Guid="{A476A425-3436-454C-A135-DDB0C1D01854}" Expanded="True">
                                    <Action XML_Guid="{C63C02C2-BB86-4BDB-95D8-99B7C4DCF371}">
                                        MediaPortal.Messenger()
                                    </Action>
                                </Macro>
                                <Macro Name="Auto3D-Menu" XML_Guid="{E0CA7A4E-6BB1-4CD9-A964-CF425D59A91D}" Expanded="True">
                                    <Event Name="MceRemote.Mce.Subtitle" XML_Guid="{1C4B6382-8965-4B1D-919F-ADE3C694088D}" />
                                    <Action XML_Guid="{BB7308CC-97BC-4A43-AA3A-4057B2B870D1}">
                                        Window.SendKeys(u'{Ctrl+D}', False)
                                    </Action>
                                </Macro>
                                <Macro Name="Testpatterns" XML_Guid="{D4EE6F64-EB6A-453F-A6ED-3510885FF87F}" Expanded="True">
                                    <Action XML_Guid="{CFA122D9-ED81-4953-B7BA-52B5F321EC60}">
                                        Window.SendKeys(u'{Ctrl+T}', False)
                                    </Action>
                                </Macro>
                                <Folder Name="Kanäle" XML_Guid="{83EC85FE-0AF2-4CA6-A51F-2347437E6376}">
                                    <Macro Name="n-tv" XML_Guid="{2519126F-0B69-491D-A97E-EA8750091E58}">
                                        <Event Name="AutoRemote.Message.m8.ntv" XML_Guid="{7CD45EF9-DA50-4384-B801-0F9A8CFA0768}" />
                                        <Action XML_Guid="{3BE393BC-66D4-4BF6-A00A-3F1C0DE1AD14}">
                                            MediaPortal.NumPad2()
                                        </Action>
                                        <Action XML_Guid="{83583036-5357-41EE-A603-3E6CD2F46CED}">
                                            MediaPortal.NumPad1()
                                        </Action>
                                    </Macro>
                                    <Macro Name="dmax" XML_Guid="{22AC2BD4-DE4F-4FDB-BFC9-AAAD8C296D94}">
                                        <Event Name="AutoRemote.Message.m8.dmax" XML_Guid="{56491B35-11B2-4104-8E37-2E313714228A}" />
                                        <Action XML_Guid="{EBB6CEEA-18FF-4CB5-A23D-D345B7D75D4A}">
                                            MediaPortal.NumPad1()
                                        </Action>
                                        <Action XML_Guid="{40664463-046B-4CD1-BCB2-B482726AE55C}">
                                            MediaPortal.NumPad8()
                                        </Action>
                                    </Macro>
                                </Folder>
                            </Folder>
                            <Folder Name="System mp" XML_Guid="{59736A10-5618-4C8E-9F89-5EE75F90092D}" Expanded="True">
                                <Folder Name="From_mp" XML_Guid="{D1D8FCA4-0044-4D77-8E0D-BE443D1D1759}" Expanded="True">
                                    <Macro Name="Muss wegen Convert oben stehen" XML_Guid="{10745D9D-07F6-4AB9-841F-C788A3113D83}">
                                        <Action Name="Muss wegen Convert oben stehen" XML_Guid="{FC7CEF32-E2B3-4778-8935-8E46BF214363}">
                                            EventGhost.Comment()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Convert 2 String IP Window / Set fullscreen" XML_Guid="{57FC9366-8593-439E-B2DF-C18EB3C82D1D}">
                                        <Event Name="TCP.*" XML_Guid="{5E5F8B0B-E0A9-4F59-8887-C83FD3D9A63B}" />
                                        <Event Name="Mediaportal.Window.Fullscreen" Enabled="False" XML_Guid="{F29DB896-7580-48EE-9E75-A6E03CDE0EF7}" />
                                        <Action Name="MP Input Convert Script" XML_Guid="{36F2578E-0EB5-4A30-B47C-8EAE3028A009}">
                                            EventGhost.PythonScript(u'#eg.event.suffix = "MediaPortal.System.Resume"\nif "MediaPortal" in eg.event.suffix:\n    mpstring = eg.event.suffix[12:]\n    eg.TriggerEvent(mpstring, prefix = "Mediaportal")\n    if "Window" in mpstring:\n        if eg.event.payload[2] in eg.event.payload:\n            window = eg.event.payload[2][1:-1]\n            if "FullScreen" in window:\n                eg.TriggerEvent(window, prefix = "Mediaportal.Window")\n                eg.TriggerEvent("Fullscreen", prefix = "Mediaportal.Window")\n                eg.globals.fullscreen = 1\n                print "eg.globals.fullscreen: "+str(eg.globals.fullscreen)\n            else:\n                eg.globals.fullscreen = 0\n                print "eg.globals.fullscreen: "+str(eg.globals.fullscreen)\n                eg.TriggerEvent(window, prefix = "Mediaportal.Window")\n                eg.TriggerEvent("Menu", prefix = "Mediaportal.Window")\n    else:\n        window = "OFF"\n        if "Video" or "Music" or "Radio" or "TV" in eg.event.suffix:\n            if "Play" in eg.event.suffix:\n                eg.TriggerEvent("Play", prefix = "Mediaportal")\n            elif "Resume" in eg.event.suffix and not "System" in eg.event.suffix:\n                eg.TriggerEvent("Resume", prefix = "Mediaportal")\n            elif "Pause" in eg.event.suffix:\n                eg.TriggerEvent("Pause", prefix = "Mediaportal")\n            elif "Stop" in eg.event.suffix:\n                eg.TriggerEvent("Stop", prefix = "Mediaportal")\n            elif "End" in eg.event.suffix:\n                eg.TriggerEvent("End", prefix = "Mediaportal")\nelse:\n    #eg.TriggerEvent("Info: TCP but not MP", prefix = "EG")\n    print "Tcp event not from mp"')
                                        </Action>
                                    </Macro>
                                    <Folder Name="Automatics mp" XML_Guid="{94794BBC-882A-4403-A083-1C40FAFFFC3D}">
                                        <Macro Name="OnStartEventTrigger" XML_Guid="{87B70E55-AE3C-46BF-897C-5CAC2A871178}">
                                            <Event Name="TCP.Mediaportal.Plugin.Start" XML_Guid="{CF42310F-FBC5-404E-99A8-6C61D3E75FFC}" />
                                            <Event Name="Mediaportal.Plugin.Start" XML_Guid="{A85CA319-5965-4549-A3BB-8A237643A91A}" />
                                            <Action XML_Guid="{B0CA278B-9BFC-4484-AF4F-3BE5F258720B}">
                                                System.MuteOff(u'Primary Sound Driver')
                                            </Action>
                                            <Action Name="Audiodatei abspielen: No sound" XML_Guid="{40A74605-EB5E-4EFC-99D6-F3E192BA61CE}">
                                                System.PlaySound(u'D:\\Programmdaten\\Eventghost\\sounds\\point1sec.mp3', 0, False)
                                            </Action>
                                            <Action Name="on_mp_loaded" XML_Guid="{8462B69C-49E8-4A04-8591-FC73496D5311}">
                                                EventGhost.PythonScript(u'scriptname = "on_mp_loaded"\ndebug = eg.globals.debug\n#debug = 1\neg.globals.mp_loaded = 1\neg.plugins.EventGhost.ShowOSD(u\'\', eg.globals.osd_font_string, eg.globals.osd_font_color, (0, 0, 0), eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 0.5, eg.globals.osd_skin)\neg.plugins.System.HideImage(u\'off\')\neg.plugins.System.HideImage(u\'mp_start\')\neg.plugins.System.HideImage(u\'off\')\nif debug: print "eg.eg.globals.mp_loaded is set to: "+str(eg.globals.mp_loaded)+" Writing to var file..."\neg.plugins.FileOperations.Write(2, u\'{eg.globals.mp_loaded}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.mp_loaded.txt\', 0, 0, True, False, False, \'cp1252\')\nimport time\nif eg.globals.htpcapp_singlemode:\n    from win32com.client import GetObject\n    WMI = GetObject(\'winmgmts:\')\n    eg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\n    if eg.globals.kodi_running:\n        if debug: print "kodi is still running - going to kill it"\n        eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Scripts\\\\mmhtpc\\\\Pskill\\\\pskill_kodi.bat\', u\'\', 3, False, 3, u\'\', False, False)\n    else:\n        if debug: print "Kodi wasn\'t not running any more, all good"\nelse:\n    if debug: print "htpcapp_singlemode not true - skipping script "+str(scriptname)')
                                            </Action>
                                            <Action XML_Guid="{0F24E280-B938-41C1-A7F9-2031537DBAF8}">
                                                EventGhost.NewJumpIf(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{0F24E280-B938-41C1-A7F9-2031537DBAF8}">
                                                EventGhost.NewJumpIf(eg.GUID('{8A5136DA-8EA2-4647-A50A-B600CC9E763F}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{3EAD25FF-0A65-4D67-86F5-F16A668F2439}">
                                                EventGhost.NewJumpIf(eg.GUID('{A47BC3F8-8AA2-4ADD-AD69-EBCD6035E8CC}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{8C0FD513-2841-485B-BDB3-FF7B08B1B26D}">
                                                EventGhost.NewJumpIf(eg.GUID('{F9C0950D-B809-4483-9E31-34408AFEBE73}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{3C86046D-68F2-40B6-B3E1-62FB5769F3A2}">
                                                EventGhost.NewJumpIf(eg.GUID('{368259B7-765C-48B1-BDF8-03D3B0B819B4}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{03813AA3-4AEA-45D7-BDD4-4DB6D2FF1C28}">
                                                EventGhost.NewJumpIf(eg.GUID('{83E66E69-EAE7-4F27-AE5C-560640B8AD15}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{8451AC3C-4D28-4E1E-83C7-396C2000036B}">
                                                System.PlaySound(u'C:\\Windows\\Media\\Windows Logon.wav', 1, False)
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnStartPlayingVideo" XML_Guid="{A33BE1C9-4819-4CEA-A1CD-9E4F60C9A196}">
                                            <Event Name="Mediaportal.Long.Video.Play" XML_Guid="{5DAD7021-5530-437B-8DE1-C61F132CF89F}" />
                                            <Action XML_Guid="{A6F1A651-98C8-4D6B-AD6D-6CAEE9D06992}">
                                                EventGhost.EnableItem(eg.GUID('{AEC4863D-EAA6-4B9D-B3A0-1C5C5627FC23}'))
                                            </Action>
                                            <Action XML_Guid="{29596262-D958-4605-9BBD-DE3E9C3A568E}">
                                                EventGhost.EnableItem(eg.GUID('{E09CA6B8-916E-4BFE-99F9-9FA5461882CD}'))
                                            </Action>
                                            <Action XML_Guid="{A3B1793C-D47F-46D8-9BF2-523B857C3EE2}">
                                                EventGhost.EnableItem(eg.GUID('{7518CD4F-55B3-498B-8330-E9E55F8B2FB9}'))
                                            </Action>
                                            <Action XML_Guid="{FA1C9CD4-AB70-4B86-9919-32776CA109D7}">
                                                EventGhost.NewJumpIf(eg.GUID('{2D361958-1747-4204-BAA6-887D9DA88461}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{54FAD5F4-D55F-40FA-A988-E909F335346A}">
                                                EventGhost.ShowOSD(u'', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;TitanSmall', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0, False)
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnStopPlayingVideo" XML_Guid="{4FE3EE3E-814A-4B14-98F5-34945963BA1E}">
                                            <Event Name="Mediaportal.Long.Video.Stop" XML_Guid="{CB85CD5D-89EB-490C-8D28-36F632045D85}" />
                                            <Action XML_Guid="{E16059F5-DDCC-4B78-B2F5-035D72755033}">
                                                EventGhost.DisableItem(eg.GUID('{AEC4863D-EAA6-4B9D-B3A0-1C5C5627FC23}'))
                                            </Action>
                                            <Action XML_Guid="{EECEA6E1-795A-4F9B-8F0A-275E15810D96}">
                                                EventGhost.DisableItem(eg.GUID('{E09CA6B8-916E-4BFE-99F9-9FA5461882CD}'))
                                            </Action>
                                            <Action XML_Guid="{699EE48F-CFF4-4AE1-B92C-068AA5474C27}">
                                                EventGhost.DisableItem(eg.GUID('{7518CD4F-55B3-498B-8330-E9E55F8B2FB9}'))
                                            </Action>
                                            <Action XML_Guid="{2833AB6E-340A-4127-B1D0-DFE3C7CABD13}">
                                                EventGhost.NewJumpIf(eg.GUID('{102CE50C-E439-415B-8C62-62FA24A42C02}'), 2, True)
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnStartPlayingMusic" XML_Guid="{2C456330-FA0C-4BA9-9509-03CBAE507F6A}">
                                            <Event Name="Mediaportal.Music.Play" XML_Guid="{6D2D9CCA-BBF9-43FE-9508-A68F77F4CA15}" />
                                            <Action XML_Guid="{4CEFB512-4E71-4142-A274-A98D120F5787}">
                                                EventGhost.NewJumpIf(eg.GUID('{2D361958-1747-4204-BAA6-887D9DA88461}'), 2, True)
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnStopPlayingMusic" XML_Guid="{A7FF2D45-B33C-49F7-BB6E-3D3C54D5EE37}">
                                            <Event Name="Mediaportal.Music.Stop" XML_Guid="{B936852F-1A42-40C6-9D49-9213566B8344}" />
                                            <Action XML_Guid="{FCFEE255-0CB3-40C3-8407-ABD3567F2366}">
                                                EventGhost.NewJumpIf(eg.GUID('{102CE50C-E439-415B-8C62-62FA24A42C02}'), 2, True)
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnStartPlayingTV" XML_Guid="{159E088D-BB8F-4EE6-9D0F-787BB122CED6}">
                                            <Event Name="Mediaportal.TV.Play" XML_Guid="{3ABB5E98-4827-487D-8BE2-9EDB585BEA51}" />
                                            <Action Name="Set volume level" XML_Guid="{DCC8D2F8-54D2-44E7-812F-7D2F41B33A5A}">
                                                EventGhost.PythonScript(u'if ("AVR" in eg.globals.harm_act) and not (eg.globals.headset_active):\n    #eg.plugins.System.ChangeMasterVolumeBy(-30.0, u\'Primary Sound Driver\')\n    eg.globals.systemvolumelevel_set = eg.globals.systemvolumelevel_set*0.7\n    print "eg.globals.systemvolumelevel_set: "+str(eg.globals.systemvolumelevel_set)\n    eg.result = 1\nelse:\n    print "not an avr action - no volume change"\n    eg.result = 0')
                                            </Action>
                                            <Action XML_Guid="{F8CD57B6-D144-4262-908C-293F56826288}">
                                                EventGhost.NewJumpIf(eg.GUID('{8A5136DA-8EA2-4647-A50A-B600CC9E763F}'), 0, True)
                                            </Action>
                                            <Action XML_Guid="{17E94B1E-96E5-4BB1-A732-8816FCB13847}">
                                                EventGhost.EnableItem(eg.GUID('{241D4963-9027-40CC-ABC0-71ACFEC37BEA}'))
                                            </Action>
                                            <Action XML_Guid="{A31729AD-F323-4A5A-8586-616B9E50F951}">
                                                EventGhost.EnableItem(eg.GUID('{1D7A886B-8EE3-427C-9E02-500721B37650}'))
                                            </Action>
                                            <Action XML_Guid="{AC526A5C-5C80-488E-A609-D51EEE1740D0}">
                                                EventGhost.DisableItem(eg.GUID('{AEC4863D-EAA6-4B9D-B3A0-1C5C5627FC23}'))
                                            </Action>
                                            <Action XML_Guid="{E9C25D8B-43E0-4B52-9EB7-BCC9A63746CA}">
                                                EventGhost.DisableItem(eg.GUID('{E09CA6B8-916E-4BFE-99F9-9FA5461882CD}'))
                                            </Action>
                                            <Action XML_Guid="{CD1FD670-70C1-4D8D-A08E-D1255159E284}">
                                                EventGhost.DisableItem(eg.GUID('{7518CD4F-55B3-498B-8330-E9E55F8B2FB9}'))
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnStopPlayingTV" XML_Guid="{16830C5B-0236-4261-96E5-A0B63A77887F}">
                                            <Event Name="Mediaportal.TV.Stop" XML_Guid="{616C2505-3909-4E00-BF27-8FC360CC86D0}" />
                                            <Action Name="Set volume level" XML_Guid="{8C4A8B17-1AEC-4911-94C6-B7596BFFBB15}">
                                                EventGhost.PythonScript(u'if ("AVR" in eg.globals.harm_act) and not (eg.globals.headset_active):\n    #eg.plugins.System.ChangeMasterVolumeBy(30.0, u\'Primary Sound Driver\')\n    eg.globals.systemvolume_set = 100\n    print "AVR action - Setting sys vol to "+str(eg.globals.systemvolume_set)+"%"\n    eg.result = 1\nelse:\n    #eg.globals.systemvolumelevel_set = 100\n    eg.result = 0')
                                            </Action>
                                            <Action XML_Guid="{F98FD553-611C-422C-B173-4F92D545FDE3}">
                                                EventGhost.NewJumpIf(eg.GUID('{8A5136DA-8EA2-4647-A50A-B600CC9E763F}'), 0, True)
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnStartPlayingAnything" XML_Guid="{DFEA089A-44F5-4F98-BAE9-B8503FDD3B92}">
                                            <Event Name="Mediaportal.Play" XML_Guid="{BFE41925-BF6A-4307-B22B-EF31F07EDACA}" />
                                            <Action Enabled="False" XML_Guid="{3BFBAEEE-462D-4A72-B062-B49AFD442527}">
                                                EventGhost.Wait(1.0)
                                            </Action>
                                            <Action Name="set playing vars" XML_Guid="{FA73ECF4-C79E-4D0C-A7B4-8CD369E6C6C3}">
                                                EventGhost.PythonScript(u'#test\n#eg.globals.first_play = 1\n#/test\neg.globals.playing = 1\neg.globals.player_status = "Playing"\neg.plugins.FileOperations.Write(2, u\'{eg.globals.playing}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.playing.txt\', 0, 0, True, False, False, \'cp1252\')\neg.plugins.FileOperations.Write(2, u\'{eg.globals.player_status}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.player_status.txt\', 0, 0, True, False, False, \'cp1252\')\nprint "eg.globals.playing: "+str(eg.globals.playing)\n')
                                            </Action>
                                            <Action XML_Guid="{6C240D3A-605D-4744-8603-9BBDA8B5C90D}">
                                                EventGhost.NewJumpIf(eg.GUID('{4EA674BA-95FF-4C42-8781-7C6E861A0245}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{73EC4176-23D4-4447-ADA6-C2E6CE212312}">
                                                EventGhost.EnableExclusive(eg.GUID('{65A16967-0349-420C-9683-323178037D88}'))
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnPauseAnything" XML_Guid="{B165430B-E3B8-4CCE-A050-E5E55EC8E398}">
                                            <Event Name="Mediaportal.Pause" XML_Guid="{0C030152-E23A-4CB3-8C2C-8EFA9A31F954}" />
                                            <Action Name="set playing vars" XML_Guid="{51833D05-DC65-49EF-93CD-8D97721E2AA5}">
                                                EventGhost.PythonScript(u'#test\n#eg.globals.first_play = 1\n#/test\neg.globals.playing = 0\neg.globals.player_status = "Paused"\neg.plugins.FileOperations.Write(2, u\'{eg.globals.playing}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.playing.txt\', 0, 0, True, False, False, \'cp1252\')\neg.plugins.FileOperations.Write(2, u\'{eg.globals.player_status}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.player_status.txt\', 0, 0, True, False, False, \'cp1252\')\nprint "eg.globals.playing: "+str(eg.globals.playing)\nprint "eg.globals.player_status: "+str(eg.globals.player_status)\n')
                                            </Action>
                                            <Action XML_Guid="{4173D49D-F6C6-413A-9387-02C5AF3ACE1C}">
                                                EventGhost.NewJumpIf(eg.GUID('{F7350AC8-D8B6-45A8-A1B5-64EF52245877}'), 2, True)
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnPauseTV" XML_Guid="{AA50BA34-5646-4034-A5C9-295443849E44}">
                                            <Event Name="Mediaportal.TV.Pause" XML_Guid="{CA4C3C64-6889-4B49-BB5F-D5BEE46BAD21}" />
                                            <Action XML_Guid="{E6605CAB-8D19-438B-84F5-E046998105EF}">
                                                EventGhost.NewJumpIf(eg.GUID('{B1BCEC05-4D2B-4619-BF8A-4903541E0B47}'), 2, True)
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnResumeAnything" XML_Guid="{F58FF8EB-7FD8-4E9E-8595-B521CD46A8F3}">
                                            <Event Name="Mediaportal.Resume" XML_Guid="{3DBF742D-24BD-41D8-B8AA-D1AAD71A0A5A}" />
                                            <Action Name="set playing vars" XML_Guid="{EB854692-49F6-4B97-B37C-A7BB9305614D}">
                                                EventGhost.PythonScript(u'#test\n#eg.globals.first_play = 1\n#/test\neg.globals.playing = 1\neg.globals.player_status = "Playing"\neg.plugins.FileOperations.Write(2, u\'{eg.globals.playing}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.playing.txt\', 0, 0, True, False, False, \'cp1252\')\neg.plugins.FileOperations.Write(2, u\'{eg.globals.player_status}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.player_status.txt\', 0, 0, True, False, False, \'cp1252\')\nprint "eg.globals.playing: "+str(eg.globals.playing)\n')
                                            </Action>
                                            <Action XML_Guid="{70B66325-8E7B-4F96-BBF0-03193A29B54C}">
                                                EventGhost.NewJumpIf(eg.GUID('{4EA674BA-95FF-4C42-8781-7C6E861A0245}'), 2, True)
                                            </Action>
                                        </Macro>
                                        <Macro Name="OnStopPlayingAnything" XML_Guid="{17408E95-B5B7-466A-9BE9-BC1DC2563B83}">
                                            <Event Name="Mediaportal.Stop" XML_Guid="{4036169B-6F8C-49BA-95E0-AB7C5AE8C1D8}" />
                                            <Event Name="Mediaportal.End" XML_Guid="{35D610AA-7CB0-4F62-928B-C16C9B5EDE25}" />
                                            <Action Name="set playing vars" XML_Guid="{F0F31C33-C74F-4281-BA34-2D3E6F978011}">
                                                EventGhost.PythonScript(u'#test\n#eg.globals.first_play = 1\n#/test\neg.globals.playing = 0\neg.globals.player_status = "Stopped"\neg.plugins.FileOperations.Write(2, u\'{eg.globals.playing}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.playing.txt\', 0, 0, True, False, False, \'cp1252\')\neg.plugins.FileOperations.Write(2, u\'{eg.globals.player_status}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.player_status.txt\', 0, 0, True, False, False, \'cp1252\')\nprint "eg.globals.playing: "+str(eg.globals.playing)\nprint "eg.globals.player_status: "+str(eg.globals.player_status)\n')
                                            </Action>
                                            <Action XML_Guid="{C81FB103-CDDA-4517-B951-F14AB01DB4A9}">
                                                EventGhost.NewJumpIf(eg.GUID('{D62D3AC0-1697-450F-B83C-4A129857F63D}'), 2, True)
                                            </Action>
                                        </Macro>
                                        <Macro Name="On MP System Standby" Enabled="False" XML_Guid="{15C9FB94-6493-4170-8EC9-A121725BA57A}">
                                            <Event Name="TCP.MediaPortal.System.Standby" XML_Guid="{BAA32936-4BF2-44C6-A72D-EA480E248592}" />
                                        </Macro>
                                        <Macro Name="On MP System Resume" Enabled="False" XML_Guid="{DA0DD328-62EA-4BB8-A3FF-D01BAA97D3A5}">
                                            <Event Name="TCP.MediaPortal.System.Resume" XML_Guid="{8B273B84-FC66-48EF-8EB2-2C85FB48327F}" />
                                            <Action XML_Guid="{D3C6F913-594E-493E-A4C5-5D2A6E426D03}">
                                                System.MuteOff(u'Primary Sound Driver')
                                            </Action>
                                            <Action XML_Guid="{A1590712-DF49-4049-9F4C-7F5BF395024F}">
                                                EventGhost.NewJumpIf(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 2, False)
                                            </Action>
                                            <Action XML_Guid="{25D1D713-3D49-43FF-9726-7C8C5A3D5FC7}">
                                                EventGhost.NewJumpIf(eg.GUID('{368259B7-765C-48B1-BDF8-03D3B0B819B4}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{FBC6F8A2-F7C9-4F00-BB45-085EE07E3810}">
                                                EventGhost.NewJumpIf(eg.GUID('{A47BC3F8-8AA2-4ADD-AD69-EBCD6035E8CC}'), 2, True)
                                            </Action>
                                            <Action XML_Guid="{00D7C972-D8B7-4EAF-9788-91C61AE458A8}">
                                                System.PlaySound(u'C:\\Windows\\Media\\ding.wav', 0, False)
                                            </Action>
                                            <Action XML_Guid="{2C15B0B0-82DB-4EE0-8A2D-C86AAD083C67}">
                                                System.PlaySound(u'C:\\Windows\\Media\\Windows Logon.wav', 1, False)
                                            </Action>
                                        </Macro>
                                    </Folder>
                                </Folder>
                                <Folder Name="To_mp" XML_Guid="{044365DB-A10B-40E0-9033-097A5CE082BF}">
                                    <Folder Name="MessageSender" XML_Guid="{38F52354-2FF2-426C-8B81-8CC873373C60}">
                                        <Macro Name="MediaPortal Message Sender: Forward CouchPotato" XML_Guid="{48C265C3-54F6-407B-9C0E-E4B6E80D32A9}">
                                            <Event Name="Main.Growl.CouchPotato.*" XML_Guid="{C3BF612B-00BC-4A67-9F77-993EDBF0853F}" />
                                            <Action XML_Guid="{7C054783-4383-4057-A8AD-8479798DD7CA}">
                                                MPMessageSender.SendMessage(u'CouchPotato', u'{eg.event.payload[0]}', u'{eg.event.payload[1]}', 5, u'D:\\Programmdaten\\Eventghost\\Icons\\Couch02.png')
                                            </Action>
                                            <Action XML_Guid="{013A1CDA-6280-43EF-B125-9B3AD4272D5A}">
                                                MPMessageSender.SendMessage(u'Fehler', u'MediaPortal l\xe4uft schon', u'\xdcberspringe den Wechsel', 3, u'D:\\Programmdaten\\Eventghost\\Icons\\EG-Logo.png')
                                            </Action>
                                        </Macro>
                                        <Macro Name="MediaPortal Message Sender: Forward Sickbeard" XML_Guid="{AF9F7FF3-41E4-429A-AD08-0F019290B74C}">
                                            <Event Name="Main.Growl.SickBeard.*" XML_Guid="{1B97A4E6-0F5A-4A93-A764-705E1F8B7117}" />
                                            <Action XML_Guid="{88042871-78BF-4092-A41D-CE15E6A28D48}">
                                                MPMessageSender.SendMessage(u'SickBeard Message', u'{eg.event.payload[0]}', u'{eg.event.payload[1]}', 5, u'D:\\Programmdaten\\Eventghost\\Icons\\sickbeard_small.png')
                                            </Action>
                                        </Macro>
                                        <Macro Name="MediaPortal Message Sender: Forward Sabnzbd" XML_Guid="{04D02F75-6E6D-4100-B8F6-BDEACF152258}">
                                            <Event Name="Main.Growl.SABnzbd@mmigwhs2011.*" XML_Guid="{A67EDC70-6248-48A3-A823-77BA56308CEB}" />
                                            <Action XML_Guid="{A652BD53-2292-4F1C-A83E-A8B020656BFF}">
                                                MPMessageSender.SendMessage(u'sabnzbd Message', u'{eg.event.payload[0]}', u'{eg.event.payload[1]}', 5, u'D:\\Programmdaten\\Eventghost\\Icons\\sabnzbd02.png')
                                            </Action>
                                        </Macro>
                                        <Macro Name="MediaPortal Message Sender: Forward HomeServerSMART2013" XML_Guid="{A684915A-1575-47CA-AE8B-0F1692EFF177}">
                                            <Event Name="Main.Growl.HomeServerSMART2013.*" XML_Guid="{12F200B1-F24E-42FB-A498-CE3B53F0657E}" />
                                            <Action XML_Guid="{EE293E27-A6DF-41FB-858C-36AD7C483F4D}">
                                                MPMessageSender.SendMessage(u'Home Server Smart', u'{eg.event.payload[0]}', u'{eg.event.payload[1]}', 10, u'D:\\Programmdaten\\Eventghost\\Icons\\home server smart.png')
                                            </Action>
                                        </Macro>
                                        <Macro Name="test" XML_Guid="{C676DED4-120F-4E5C-B25C-7844906D9161}">
                                            <Action XML_Guid="{FCD7A09E-AFA2-4087-BF2B-E01992A2C2B1}">
                                                MPMessageSender.SendMessage(u'EventGhostPlus Message', u'test', u'', 30, u'')
                                            </Action>
                                        </Macro>
                                    </Folder>
                                    <Folder Name="Pushbullet" XML_Guid="{EF4F0416-B005-4BFD-97EA-61DD437054AD}">
                                        <Macro Name="Test" XML_Guid="{6CAD7984-2952-42BF-8A8B-A1764EE3F620}">
                                            <Action XML_Guid="{A5C1B43A-72CD-4ABB-A9CC-03E1B2439870}">
                                                EventGhost.TriggerEvent(u"Mirror.EntgangeneAnrufe [u'2 entgangene Anrufe\\n', u'HTC_One']", 0.0)
                                            </Action>
                                        </Macro>
                                        <Macro Name="Convert" XML_Guid="{A50E1F97-34EE-4E7E-B4EF-928EC239E0AC}">
                                            <Event Name="PushBullet.Mirror.*" Enabled="False" XML_Guid="{773FE63C-C98F-4938-B3C9-4DF5F9E28357}" />
                                            <Event Name="Main.Mirror.EntgangeneAnrufe [u'2 entgangene Anrufe\n', u'HTC_One']" XML_Guid="{85958E13-4DC2-4338-927B-28599F0A0E5C}" />
                                        </Macro>
                                        <Macro Name="Clip" Enabled="False" XML_Guid="{246CD6E7-F0F1-4402-8436-BF60F9EB35F7}">
                                            <Event Name="PushBullet.Clip" XML_Guid="{0292388E-F634-4DC4-BA69-01608B2F906E}" />
                                            <Action XML_Guid="{CE0421CA-4719-4ECA-A0A7-D56B84FF7BA1}">
                                                MPMessageSender.SendMessage(u'PB an {eg.event.payload[0]}', u'{eg.event.payload[1]}', u'', 5, u'D:\\Programmdaten\\Eventghost\\Icons\\pb\\Mirror.png')
                                            </Action>
                                        </Macro>
                                        <Macro Name="Note" XML_Guid="{13676DEC-A168-4EE4-A914-A89D3B19E69F}">
                                            <Event Name="PushBullet.Note" XML_Guid="{26773CFE-96FE-4AE2-B130-7765911FE565}" />
                                            <Action Name="Check mp primary" XML_Guid="{112450AF-CC67-4BEB-911F-C80BBA842644}">
                                                EventGhost.PythonScript(u'if eg.globals.htpcapp == "mp":\n    print "htpcapp=mp, sending pb2mp"\nelse:\n    eg.StopMacro()\n    print "MP not active, skipping pb action"')
                                            </Action>
                                            <Action XML_Guid="{B0C05738-F220-4481-9967-CB46EA7FEC28}">
                                                MPMessageSender.SendMessage(u'PB von {eg.event.payload[4]}', u'{eg.event.payload[0]}', u'{eg.event.payload[1]}', 5, u'D:\\Programmdaten\\Eventghost\\Icons\\pb\\Note.png')
                                            </Action>
                                        </Macro>
                                        <Macro Name="Mirror" XML_Guid="{DB568BC3-36E1-4A4C-8A1A-B6C972622FAC}">
                                            <Event Name="PushBullet.Mirror.*" XML_Guid="{E81FE796-D5E5-4D50-AE78-8710F60B2004}" />
                                            <Action Name="Convert+Send" XML_Guid="{97BDBC01-7BBD-49CA-BFEF-7B4AE5A928EA}">
                                                EventGhost.PythonScript(u'#convert\nmessage_from = eg.event.payload[1]\nprint message_from\nmirroredapp = eg.event.string.split(".")[2]\nprint mirroredapp\nmessage = eg.event.payload[0]\nprint message\n#send\neg.plugins.MPMessageSender.SendMessage(u\'{eg.event.string.split(".")[2]} auf {eg.event.payload[1]}\', u\'{eg.event.payload[0]}\', u\'\',3, u\'D:\\\\Programmdaten\\\\Eventghost\\\\Icons\\\\pb\\\\Mirror.png\')')
                                            </Action>
                                            <Action Enabled="False" XML_Guid="{B59788E8-A612-426D-A160-53B68178F814}">
                                                MPMessageSender.SendMessage(u'PB von {eg.event.payload[1]}', u'{eg.event.payload[0]}', u'{eg.event.suffix}', 3, u'D:\\Programmdaten\\Eventghost\\Icons\\pb\\Mirror.png')
                                            </Action>
                                        </Macro>
                                        <Macro Name="Anruf" XML_Guid="{21A8E1DF-5944-4A52-9680-75367AA9BCC4}">
                                            <Event Name="HTC_One.Eingehender Anruf&#10;" XML_Guid="{550857C3-EDAB-4531-8063-B49E41399889}" />
                                            <Action Enabled="False" XML_Guid="{110D7092-9914-46ED-BCA7-0FB0C18278B5}">
                                                MPMessageSender.SendMessage(u'{eg.event.suffix}', u'auf {eg.event.prefix}', u'von {eg.event.payload}', 2, u'D:\\Programmdaten\\Eventghost\\Icons\\pb\\Mirror.png')
                                            </Action>
                                            <Action XML_Guid="{4E12E4C3-43E7-4271-9BCB-0515898080D3}">
                                                EventGhost.NewJumpIf(eg.GUID('{07E060BD-39D6-4C1D-9687-A5A287EE3157}'), 2, False)
                                            </Action>
                                        </Macro>
                                    </Folder>
                                </Folder>
                                <Macro Name="Render Info on/off" XML_Guid="{485E1BB1-ED7C-46A1-B9F4-5A343149FAF5}">
                                    <Event Name="MceRemote.Mce.Aspect" XML_Guid="{109D9351-9A98-4C6B-B5A4-7750153DCAA0}" />
                                    <Action XML_Guid="{358CDB73-A957-4DAF-9BC8-34B7DF42B936}">
                                        EventGhost.NewJumpIf(eg.GUID('{0EAC16AD-4916-46DD-8F18-846D967742B9}'), 2, True)
                                    </Action>
                                    <Action XML_Guid="{74B541C4-414C-4A2C-9542-8372688ADD11}">
                                        Window.SendKeys(u'{Shift+1}', False)
                                    </Action>
                                </Macro>
                                <Macro Name="Bring MP to front" XML_Guid="{0EAC16AD-4916-46DD-8F18-846D967742B9}">
                                    <Event Name="MceRemote.Mce.Red" XML_Guid="{142CB1FB-71E9-4434-9AA2-45A5D93CF9A5}" />
                                    <Event Name="system.appchange.mp2front" XML_Guid="{D6B3A28F-F0BE-41B3-9ED4-E0C07BFFA1EE}" />
                                    <Event Name="routing.kodistarted.mptofront" XML_Guid="{7BFA1E88-D056-41CA-BC22-6DB826E29ABB}" />
                                    <Action Name="on_bringmp2front" XML_Guid="{8E474383-B802-4C6B-ACBE-D7146A39BBDE}">
                                        EventGhost.PythonScript(u'scriptname = "on_bringmp2front"\ndebug = eg.globals.debug\ndebug = 1\nif not eg.globals.mp_loaded:\n    if debug: print "ABORT - MP was not loaded - Skipping script..."\n    eg.StopMacro()\n    eg.Exit()\neg.globals.manualswitch2mp_loop_interrupt = 1\nif debug: print "eg.globals.manualswitch2mp_loop_interrupt is set to "+str(eg.globals.manualswitch2mp_loop_interrupt)')
                                    </Action>
                                    <Action XML_Guid="{CB360A11-FDE1-4F51-88DE-07D64C7108B7}">
                                        Window.FindWindow(u'MediaPortal.exe', u'MediaPortal{*}', None, None, None, None, False, 1.0, 0)
                                    </Action>
                                    <Action XML_Guid="{69621BE9-A641-4FE7-B47C-087FB80F5A17}">
                                        Window.BringToFront()
                                    </Action>
                                    <Action Name="After actions" XML_Guid="{0C0218E9-34FE-4084-8F8E-D757AB37CF59}">
                                        EventGhost.PythonScript(u'eg.plugins.System.HideImage(u\'mp_start\')\neg.plugins.System.HideImage(u\'kodi_off\')\ndef set_var_currentwindow():\n    import time\n    time.sleep(2.0)\n    eg.TriggerEvent("check_currentwindow", prefix = "system.htpcapp")\neg.scheduler.AddTask(0.0, set_var_currentwindow)')
                                    </Action>
                                </Macro>
                                <Folder Name="Restart MP hart" XML_Guid="{5A19C5B7-C32B-47F4-B8D0-A714A795B1C2}">
                                    <Folder Name="Reassured" XML_Guid="{D7A90E14-66BF-4261-960E-49192F81D3BE}">
                                        <Macro Name="Rückfrage: Restart auslösen" XML_Guid="{F01D58F5-F45A-4BC6-BEBF-0981DB3F01A1}" Expanded="True">
                                            <Action XML_Guid="{1E8B5594-DFFC-41B2-BC55-83C46750F880}">
                                                EventGhost.EnableItem(eg.GUID('{0AC6230E-C247-44FD-B1AF-7123FD8BB28E}'))
                                            </Action>
                                            <Action XML_Guid="{87D65362-49AF-4D88-AA34-593AACD118B0}">
                                                EventGhost.EnableItem(eg.GUID('{F0443CC0-CA86-488B-80AE-F5534E6CAAF4}'))
                                            </Action>
                                            <Action XML_Guid="{9A08B168-FBC3-408C-B862-E76D3F2204CD}">
                                                EventGhost.DisableItem(eg.GUID('{F01D58F5-F45A-4BC6-BEBF-0981DB3F01A1}'))
                                            </Action>
                                            <Action XML_Guid="{855F7761-D138-4D07-917F-AF0FFB1AEDE1}">
                                                EventGhost.ShowOSD()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Abbruch restart mp" Enabled="False" XML_Guid="{0AC6230E-C247-44FD-B1AF-7123FD8BB28E}">
                                            <Event Name="MceRemote.Mce.Back" XML_Guid="{D65D8D7D-27FE-4540-A9CB-66F1DC0A451B}" />
                                            <Action XML_Guid="{666C1D37-01F9-4A37-9837-67E0F7A293FA}">
                                                EventGhost.EnableItem(eg.GUID('{F01D58F5-F45A-4BC6-BEBF-0981DB3F01A1}'))
                                            </Action>
                                            <Action XML_Guid="{B0898BB4-FED8-419A-9558-49FE90D5A4E5}">
                                                EventGhost.DisableItem(eg.GUID('{F0443CC0-CA86-488B-80AE-F5534E6CAAF4}'))
                                            </Action>
                                            <Action XML_Guid="{857EC10D-BADA-4B22-8A31-89CE1B22FF82}">
                                                EventGhost.DisableItem(eg.GUID('{0AC6230E-C247-44FD-B1AF-7123FD8BB28E}'))
                                            </Action>
                                            <Action XML_Guid="{3B5EC15B-6404-4042-9517-546AF5410A6E}">
                                                EventGhost.ShowOSD()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Restart MP hart auslösen" Enabled="False" XML_Guid="{F0443CC0-CA86-488B-80AE-F5534E6CAAF4}" Expanded="True">
                                            <Event Name="MceRemote.Mce.Ok" XML_Guid="{AE9108FD-D2AF-433A-897C-0B0C514D8446}" />
                                            <Action XML_Guid="{4DFEAA5A-6F50-4F04-9FC1-5538203810D5}">
                                                EventGhost.ShowOSD()
                                            </Action>
                                            <Action XML_Guid="{84252FC4-38EE-46B5-A76B-E94AA49E2DF7}">
                                                EventGhost.Wait(2.0)
                                            </Action>
                                            <Action XML_Guid="{B45E44AA-5DFE-491D-BB8C-A707AA1AA592}">
                                                EventGhost.EnableItem(eg.GUID('{F01D58F5-F45A-4BC6-BEBF-0981DB3F01A1}'))
                                            </Action>
                                            <Action XML_Guid="{FF74C42E-3E53-4010-B5CC-52EADADBF9D4}">
                                                EventGhost.EnableItem(eg.GUID('{16DB3A44-320B-40AC-880D-E2D927CC7AC4}'))
                                            </Action>
                                            <Action XML_Guid="{A0F5F32C-9313-4DE3-83DE-A3E2CFCBB21B}">
                                                EventGhost.DisableItem(eg.GUID('{0AC6230E-C247-44FD-B1AF-7123FD8BB28E}'))
                                            </Action>
                                            <Action XML_Guid="{719B8A37-FB68-451A-9E99-7F835D1DE6EE}">
                                                EventGhost.DisableItem(eg.GUID('{F0443CC0-CA86-488B-80AE-F5534E6CAAF4}'))
                                            </Action>
                                            <Action XML_Guid="{D1169576-B472-4F91-82DB-76B99071510B}">
                                                Window.FindWindow(u'WerFault.exe', u'MediaPortal', u'#32770', None, u'CtrlNotifySink', 1, False, 0.0, 2)
                                            </Action>
                                            <Action XML_Guid="{5FD5F88A-32F2-4E29-AFDD-2F5FB44009B5}">
                                                Window.Close()
                                            </Action>
                                            <Action XML_Guid="{B91311C3-FA98-4F4E-BF22-EA60A20C9128}">
                                                System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\Pskill\\pskill_mediaportal.bat', u'', 0, False, 3, u'', False, False, u'', False, False, False)
                                            </Action>
                                            <Action XML_Guid="{A53E3D4F-4B19-4F38-9CE5-F2751B53F649}">
                                                EventGhost.ShowOSD()
                                            </Action>
                                            <Action XML_Guid="{11FD04EC-F615-4F8A-9ABC-F09E0DB34584}">
                                                EventGhost.Wait(1.0)
                                            </Action>
                                            <Action XML_Guid="{35F980EE-5CF7-4061-B237-D291B32B70AA}">
                                                EventGhost.ShowOSD()
                                            </Action>
                                            <Action XML_Guid="{1A1BB913-14F0-4C8A-9504-4C1F26FAD99E}">
                                                EventGhost.Wait(1.0)
                                            </Action>
                                            <Action XML_Guid="{03227858-2100-4311-A2DE-12A38DD30087}">
                                                EventGhost.ShowOSD()
                                            </Action>
                                            <Action XML_Guid="{BB11B542-7D8E-456B-AD51-2104809B9709}">
                                                EventGhost.Wait(1.0)
                                            </Action>
                                            <Action XML_Guid="{C9A701F6-7189-4AFA-8104-8BDB834A286B}">
                                                EventGhost.ShowOSD()
                                            </Action>
                                            <Action XML_Guid="{48C6DFB8-6B13-494A-AA1B-CE42059703DC}">
                                                EventGhost.Wait(1.0)
                                            </Action>
                                            <Action XML_Guid="{003D561F-459B-4A2B-B4F0-0AF7934A6B97}">
                                                EventGhost.NewJumpIf(eg.GUID('{16DB3A44-320B-40AC-880D-E2D927CC7AC4}'), 2, False)
                                            </Action>
                                        </Macro>
                                    </Folder>
                                </Folder>
                                <Macro Name="Restart mp extended" XML_Guid="{368259B7-765C-48B1-BDF8-03D3B0B819B4}">
                                    <Event Name="Process.Destroyed.MPExtended.ServiceHosts.CoreService" Enabled="False" XML_Guid="{05164CA5-66E6-4FB1-8C65-C903B64799EA}" />
                                    <Action Name="Starte Anwendung: hstart.exe / restart mpextended" XML_Guid="{A25F3C6B-F53D-4749-8350-A4BECCA36B2A}">
                                        System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\Hstart\\hstart.exe', u'/NOCONSOLE /RUNAS /WAIT "D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\restart_mpextended.bat"', 0, False, 2, u'', True, False, u'restart_mpex', False, False, False)
                                    </Action>
                                </Macro>
                                <Macro Name="Beende MediaPortal" XML_Guid="{9956AC92-6B31-4BF2-A8CE-8C74167BC600}">
                                    <Event Name="TCP.Aktion beende MP" XML_Guid="{FD436928-D3D5-488C-A80A-97BB6783C758}" />
                                    <Event Name="TCP.close.mp" XML_Guid="{1FB1D8F9-ECE1-4721-89D0-EB42189D33B7}" />
                                    <Action Name="Python Skript: Check MP running" XML_Guid="{33F3C580-72F8-4945-AAB0-F46F06621DF6}">
                                        EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.result = len( WMI.ExecQuery(\'select * from Win32_Process where Name="mediaportal.exe"\') ) &gt; 0')
                                    </Action>
                                    <Action XML_Guid="{ACDC17B8-CB21-4B4E-9186-FFA835B259C1}">
                                        EventGhost.NewJumpIf(eg.GUID('{C95A8399-A3D1-4AF3-BFD1-A373E6AEBA32}'), 0, True)
                                    </Action>
                                    <Action XML_Guid="{68A3F420-3457-4FBD-B4F2-A4EF1E3471AA}">
                                        EventGhost.EnableItem(eg.GUID('{16DB3A44-320B-40AC-880D-E2D927CC7AC4}'))
                                    </Action>
                                </Macro>
                            </Folder>
                        </Folder>
                        <Folder Name="htpcapp kodi" XML_Guid="{CAD1CAC8-CCB1-4A5D-B4F5-AF08C87F1EEC}">
                            <Folder Name="Befehle" XML_Guid="{C7ECE128-2E94-493A-8E10-591AF7E65020}" Expanded="True">
                                <Folder Name="Buttons" XML_Guid="{52C1F6AB-BA04-4B93-A0B0-1CA7C80D1EA9}">
                                    <Folder Name="Remote" XML_Guid="{714FAC2F-6771-49F2-9AE5-0023FB109199}" Expanded="True">
                                        <Macro Name="Left" XML_Guid="{2A273D68-0A9F-4CF4-9A96-00277DE03388}">
                                            <Event Name="MceRemote.Mce.Left" XML_Guid="{38C09865-1D48-4C7F-BFBA-DFF601113930}" />
                                            <Action XML_Guid="{1183FDC4-4320-486A-873B-DEEFB34916B0}">
                                                XBMC2.RemoteLeft()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Right" XML_Guid="{037CF446-9A4D-4A8E-A26A-436CE11039C5}">
                                            <Event Name="MceRemote.Mce.Right" XML_Guid="{D383B9F0-AF7B-40C9-9108-FDF757BC2E9D}" />
                                            <Action XML_Guid="{3386ECD4-8569-4055-9CCD-6D9796C7E05E}">
                                                XBMC2.RemoteRight()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Up" XML_Guid="{A58B5A7F-5DC9-4029-8CF4-61336C10EFF3}">
                                            <Event Name="MceRemote.Mce.Up" XML_Guid="{3520FB5C-D8AE-4F29-AFA8-3953337BFF0C}" />
                                            <Action XML_Guid="{28998C05-860F-4D5D-9481-8A31DD259276}">
                                                XBMC2.RemoteUp()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Down" XML_Guid="{3A4C4CC6-E954-47D6-AC20-9FAEA07A5393}">
                                            <Event Name="MceRemote.Mce.Down" XML_Guid="{47B881C7-2F95-4F0A-BFD4-43548C268642}" />
                                            <Action XML_Guid="{CA311CE0-8EE6-4F1A-A440-B3D9181EC969}">
                                                XBMC2.RemoteDown()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Select" XML_Guid="{2AA6B7F2-9751-4E7F-8A7F-4770E67CD02A}">
                                            <Event Name="MceRemote.Mce.Ok" XML_Guid="{46EA8597-6E54-4F6A-8041-26483188D870}" />
                                            <Action XML_Guid="{586F02D6-F5CD-48DF-9F0B-FB1748F2FA60}">
                                                XBMC2.RemoteSelect()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Back" XML_Guid="{79F96790-389B-4037-989F-BDD5CD24A072}">
                                            <Event Name="MceRemote.Mce.Back" XML_Guid="{AF62A377-8A17-48E9-B886-73F9C16C8A6D}" />
                                            <Action XML_Guid="{8EF75BDB-9AA1-4360-A803-ABF3DBBF8AAE}">
                                                XBMC2.RemoteBack()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Menu" XML_Guid="{7A4D025C-3645-4F28-84E7-ED3E9B04ABC6}">
                                            <Action XML_Guid="{276E8708-93EC-47ED-8FC2-7205B0343981}">
                                                XBMC2.RemoteMenu()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Info" XML_Guid="{572D8153-1DD8-407F-AE60-FB7247BB788D}">
                                            <Event Name="MceRemote.Mce.Aspect" XML_Guid="{3D6A082A-3A80-4141-B5E5-7497E25BECFD}" />
                                            <Action XML_Guid="{D66E77AA-22AA-4872-9F80-B7EBA5C66508}">
                                                XBMC2.RemoteInfo()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Display" XML_Guid="{D7912385-E23C-4FF1-B629-FCA1BE08DB6F}">
                                            <Event Name="MceRemote.Mce.Red" XML_Guid="{47AFCD68-109B-42D5-9C38-306BFAD5DCBF}" />
                                            <Action XML_Guid="{51317AA2-784D-4921-8DB4-6316012A800C}">
                                                XBMC2.RemoteDisplay()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Title" XML_Guid="{A934571E-2661-4FAB-A38A-6F139BDC90EA}">
                                            <Action XML_Guid="{0DC2D376-45AC-4D6C-84AF-3D5D2DB95A95}">
                                                XBMC2.RemoteTitle()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Play" XML_Guid="{A2F60E3D-FF8E-4F30-9E91-58D7F0F327CD}">
                                            <Event Name="MceRemote.Mce.Play" XML_Guid="{216695C4-295A-4272-A007-17B88DA24F16}" />
                                            <Event Name="AutoRemote.Message.m8.play" XML_Guid="{158E6366-DFA2-42ED-8D65-B3935F4B43CB}" />
                                            <Action XML_Guid="{B52129D4-EC1C-48FB-96D5-AEA6CAFFF833}">
                                                XBMC2.RemotePlay()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Pause" XML_Guid="{7C4D72FA-6A1A-4B5D-9264-EB9BECFBCB7E}">
                                            <Event Name="MceRemote.Mce.Pause" XML_Guid="{9CF1C99E-7AFF-4C84-9F98-81070F34BEFC}" />
                                            <Action XML_Guid="{958C3C20-D0AD-4B96-B149-85DAB12E1C90}">
                                                XBMC2.RemotePause()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Reverse" Enabled="False" XML_Guid="{7009778D-85E8-45B2-BFCC-C569CF16D197}">
                                            <Event Name="MceRemote.Mce.Rewind" XML_Guid="{103BFF1C-9205-4948-954F-8ADA8C6A32A8}" />
                                            <Action XML_Guid="{F987A36F-2080-4429-B623-7D51C741CBB5}">
                                                XBMC2.RemoteReverse()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Forward" Enabled="False" XML_Guid="{3C31E5A4-4126-4761-8F5D-6220F4FC8317}">
                                            <Event Name="MceRemote.Mce.Forward" XML_Guid="{A64BD72E-483C-4C31-9CFC-3A8D783EA802}" />
                                            <Action XML_Guid="{EF522836-9FAD-4353-B276-F976FDF3A668}">
                                                XBMC2.RemoteForward()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Skip +" Enabled="False" XML_Guid="{8E3D217D-0BE0-4107-8360-13A61A39504D}">
                                            <Event Name="MceRemote.Mce.Skip" XML_Guid="{B5A0A23B-76D9-4251-A059-E3EEFC4F9F57}" />
                                            <Action XML_Guid="{A757903A-683F-4B86-873B-7F3D2F8635C5}">
                                                XBMC2.RemoteSkipPlus()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Skip -" Enabled="False" XML_Guid="{A6722F12-C06E-43AB-B88A-7B6F510C3956}">
                                            <Event Name="MceRemote.Mce.Replay" XML_Guid="{6D1E75A0-3F85-4DD8-9F4F-AA4DC3D17A1B}" />
                                            <Action XML_Guid="{F9BE5E78-A481-4121-BD37-312E94A851E5}">
                                                XBMC2.RemoteSkipMinus()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Stop" XML_Guid="{C54F48D9-4607-4232-BC8F-91A83B30CF36}">
                                            <Event Name="MceRemote.Mce.Stop" XML_Guid="{D5D417B7-8E7D-49A7-BDAE-60BE65B6C3C9}" />
                                            <Action XML_Guid="{6D609AF4-D1F7-49A3-BB99-52ABFA2F15D1}">
                                                XBMC2.RemoteStop()
                                            </Action>
                                        </Macro>
                                        <Macro Name="0" XML_Guid="{7B298DF1-8C0D-4446-BE37-7D0F00CCB912}">
                                            <Event Name="MceRemote.Mce.Num0" XML_Guid="{877021D1-794A-4CD1-8C39-3401F151E4D3}" />
                                            <Action XML_Guid="{098EA927-B7AA-4293-9823-54F259F7BB8D}">
                                                XBMC2.Remote0()
                                            </Action>
                                        </Macro>
                                        <Macro Name="1" XML_Guid="{D1984A16-37BF-4F9A-B88A-0FA388671451}">
                                            <Event Name="MceRemote.Mce.Num1" XML_Guid="{64ED69E4-87BD-49BB-AAAC-A68AA5AF2049}" />
                                            <Action XML_Guid="{E6E2EC02-430F-4E52-888C-FB8B910A657F}">
                                                XBMC2.Remote1()
                                            </Action>
                                        </Macro>
                                        <Macro Name="2" XML_Guid="{EA9F7E63-0C8D-4EFD-8D94-1AF7FAACBE72}">
                                            <Event Name="MceRemote.Mce.Num2" XML_Guid="{A6D113C7-101C-4866-904F-758DB3FE3030}" />
                                            <Action XML_Guid="{47D716F0-C817-48AF-8E76-72D5F47B92E5}">
                                                XBMC2.Remote2()
                                            </Action>
                                        </Macro>
                                        <Macro Name="3" XML_Guid="{32B92674-C10A-4F87-8881-915CD71373DC}">
                                            <Event Name="MceRemote.Mce.Num3" XML_Guid="{F6872643-4AEB-4ADF-8F5E-4419F9ED86F4}" />
                                            <Action XML_Guid="{0F27D73B-AF8C-4A23-BC5D-40B582308BB7}">
                                                XBMC2.Remote3()
                                            </Action>
                                        </Macro>
                                        <Macro Name="4" XML_Guid="{0F489DC0-15D1-4EA3-958E-2CB064AE03B5}">
                                            <Event Name="MceRemote.Mce.Num4" XML_Guid="{899F1ABE-22FF-4F3A-BF28-638AB78A4805}" />
                                            <Action XML_Guid="{88BD0F03-64F4-4BA0-9CA4-B00D7C0CEA60}">
                                                XBMC2.Remote4()
                                            </Action>
                                        </Macro>
                                        <Macro Name="5" XML_Guid="{CFD0A94F-4527-45CB-97E6-5387B116C215}">
                                            <Event Name="MceRemote.Mce.Num5" XML_Guid="{C4E86DFB-9E01-43ED-97B2-D292132003DF}" />
                                            <Action XML_Guid="{E956C043-54DE-472A-B528-AA80280FBF35}">
                                                XBMC2.Remote5()
                                            </Action>
                                        </Macro>
                                        <Macro Name="6" XML_Guid="{4113DEC7-DCDB-455F-8657-BF165DA3DA4D}">
                                            <Event Name="MceRemote.Mce.Num6" XML_Guid="{8C7712A5-2B76-4C47-BC5A-0230691EFB30}" />
                                            <Action XML_Guid="{08FD9F82-5D86-48AC-82FF-3ABA7F49DB21}">
                                                XBMC2.Remote6()
                                            </Action>
                                        </Macro>
                                        <Macro Name="7" XML_Guid="{2ADDEB89-0A20-4779-A032-9F39AC843E68}">
                                            <Event Name="MceRemote.Mce.Num7" XML_Guid="{0F3B18BB-CF14-492E-9F62-F8E5F8A72E2E}" />
                                            <Action XML_Guid="{B7920519-E3E1-45BD-8E6C-11E1613A96CB}">
                                                XBMC2.Remote7()
                                            </Action>
                                        </Macro>
                                        <Macro Name="8" XML_Guid="{091C0847-E822-4555-883B-3EA2746EAA40}">
                                            <Event Name="MceRemote.Mce.Num8" XML_Guid="{8BD38EEB-1169-4F1D-9D11-AE140643C4D5}" />
                                            <Action XML_Guid="{49927B95-861A-446F-B931-8AC975C278D7}">
                                                XBMC2.Remote8()
                                            </Action>
                                        </Macro>
                                        <Macro Name="9" XML_Guid="{91BBC587-7AAB-47AF-A788-A994101B9B47}">
                                            <Event Name="MceRemote.Mce.Num9" XML_Guid="{98FF6E11-F58B-4ADB-B91A-9FC30910BC22}" />
                                            <Action XML_Guid="{A71F0891-21F4-4943-ADF8-0AA5E0B2B7B6}">
                                                XBMC2.Remote9()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Power" XML_Guid="{E660A765-E3C3-466E-86E9-1AB08A845347}">
                                            <Action XML_Guid="{86A5CB77-25F5-45A3-9568-F5ED390E9176}">
                                                XBMC2.RemotePower()
                                            </Action>
                                        </Macro>
                                        <Macro Name="My TV" XML_Guid="{312B3149-FF0B-4EC9-ADD1-95CEECF43A1C}">
                                            <Action XML_Guid="{90B1D409-96CF-475C-A863-9C0F6E648632}">
                                                XBMC2.RemoteMyTV()
                                            </Action>
                                        </Macro>
                                        <Macro Name="My Music" XML_Guid="{BA9E6B46-5F00-4279-BE2F-D5E9352C09E1}">
                                            <Action XML_Guid="{76DCE64A-2FC0-40D0-A534-946646009604}">
                                                XBMC2.RemoteMyMusic()
                                            </Action>
                                        </Macro>
                                        <Macro Name="My Pictures" XML_Guid="{FC4E1321-D022-4478-89F5-D7AE669B3819}">
                                            <Action XML_Guid="{15BE2F61-6047-45FB-A231-F5ADC1746346}">
                                                XBMC2.RemoteMyPictures()
                                            </Action>
                                        </Macro>
                                        <Macro Name="My Video" XML_Guid="{528B48C0-E798-4060-9CAE-4B570B913207}">
                                            <Action XML_Guid="{4B149071-7DF5-4A0D-8EA8-D3D7AC7E88AA}">
                                                XBMC2.RemoteMyVideo()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Record" XML_Guid="{0A3530FE-45AC-44C7-BEBF-7FFAC96B4320}">
                                            <Action XML_Guid="{5AFBEF56-D1A8-4268-B586-DC40E5BF5A6A}">
                                                XBMC2.RemoteRecord()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Start" XML_Guid="{FDBAFB80-EA37-4D64-991C-312E56A06273}" Expanded="True">
                                            <Action XML_Guid="{03452173-FFEF-420A-AEAA-18609D33BB4A}">
                                                XBMC2.RemoteStart()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Vol +" XML_Guid="{02E74B06-8744-4059-B3F2-DCF26499B7E9}">
                                            <Action XML_Guid="{D938B12F-352F-4B56-8A58-ED5CB7348E07}">
                                                XBMC2.RemoteVolPlus()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Vol -" XML_Guid="{62F32E69-38A1-42C6-BED0-15DE4D6E83A6}">
                                            <Action XML_Guid="{D82D6250-1A1F-4923-A41B-0271112E5F75}">
                                                XBMC2.RemoteVolMinus()
                                            </Action>
                                        </Macro>
                                        <Macro Name="PG +" XML_Guid="{604ADDD1-B28E-4AF5-8BCF-6817854A325F}">
                                            <Action XML_Guid="{10275A38-4EA3-4E37-B913-A0FE9692535E}">
                                                XBMC2.Remotepageplus()
                                            </Action>
                                        </Macro>
                                        <Macro Name="PG -" XML_Guid="{FBBF6E09-4258-4528-AB54-070A4EF35B2C}">
                                            <Action XML_Guid="{2ECCD0C7-F908-440F-A115-E004E458C69B}">
                                                XBMC2.Remotepageminus()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Mute" XML_Guid="{C48FF1E1-5467-414D-B85D-7B8DF48973F1}">
                                            <Action XML_Guid="{F5E95147-2CC5-4460-8421-7E13FC686062}">
                                                XBMC2.RemoteMute()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Recorded TV" XML_Guid="{6126CBDF-B188-484A-A1BF-FA0B3D5F4FB1}">
                                            <Event Name="MceRemote.Mce.Recorded_TV" XML_Guid="{50985F8C-731D-4CC5-872A-CE9C6183A446}" />
                                            <Action XML_Guid="{C19184AC-C21C-433B-BFAD-7CB9A7F122C8}">
                                                XBMC2.RemoteRecordedTV()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Live TV" XML_Guid="{DB3E2469-0DEF-4C7F-AFCA-D5F65FA25AF0}">
                                            <Event Name="AutoRemote.Message.m8.tv" XML_Guid="{9B9F2E94-C8BF-44C5-881A-36BDFC943236}" />
                                            <Action XML_Guid="{9EC25A94-B247-43A5-98CB-1619DC75A632}">
                                                XBMC2.RemoteLiveTV()
                                            </Action>
                                        </Macro>
                                        <Macro Name="*" XML_Guid="{76FB596C-6110-483C-8C7A-F16FEA75471B}">
                                            <Action XML_Guid="{7B05D129-53AA-49A4-9092-4FBBA628E8E4}">
                                                XBMC2.RemoteStar()
                                            </Action>
                                        </Macro>
                                        <Macro Name="#" XML_Guid="{A129B40A-BDD2-4D7D-BEF0-E26EAEDBF8EE}">
                                            <Action XML_Guid="{AC90BD63-78B9-422A-B032-A34F5F994FD5}">
                                                XBMC2.Remote#()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Clear" XML_Guid="{F6162387-A0DD-404D-A83B-1D31E07AD380}">
                                            <Action XML_Guid="{066F92EA-88BB-4872-98BD-43C7C6B19CA3}">
                                                XBMC2.RemoteClear()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Enter" XML_Guid="{1EDDA425-5E8D-4BEE-B800-08543EF11126}">
                                            <Action XML_Guid="{0C670482-1102-46CB-8808-E3BEA92D0D26}">
                                                XBMC2.Remoteenter()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Xbox" XML_Guid="{99A9FFB3-8351-4D34-BB46-4CA5CB0CE4D8}">
                                            <Action XML_Guid="{BBAB6A16-92E3-4E6F-B00C-ACF62FE343E4}">
                                                XBMC2.Remotexbox()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Teletext" XML_Guid="{4BF18141-71DB-488C-BB44-1FEADC00DA56}">
                                            <Action XML_Guid="{B1FB829F-562E-4504-A3C0-0DF646837A5E}">
                                                XBMC2.Remoteteletext()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Red" XML_Guid="{87E84376-3C28-4E20-893D-78B613919A56}">
                                            <Event Name="MceRemote.Mce.Red" Enabled="False" XML_Guid="{C9D9E8E2-FD11-4D0D-83E5-B09A091FEF32}" />
                                            <Action XML_Guid="{29076522-4604-4637-B602-BDB7DA582265}">
                                                XBMC2.Remotered()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Green" XML_Guid="{5152BEC2-9EB0-4539-956E-BA37ACD9B6A1}">
                                            <Event Name="MceRemote.Mce.Green" XML_Guid="{9BA89616-9954-4B23-A5DA-1DE45EF4284B}" />
                                            <Action XML_Guid="{81DA53D3-E5FE-43B0-BFB2-34D6572774BA}">
                                                XBMC2.Remotegreen()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Yellow" XML_Guid="{ED78D737-AAF2-4E52-A3A8-F338DBD3C237}">
                                            <Event Name="MceRemote.Mce.Yellow" XML_Guid="{99DAE977-E1A3-4714-B81C-59EB83843C2A}" />
                                            <Action XML_Guid="{6A15B47A-FAF2-4614-AA2B-CEDF2CBF785E}">
                                                XBMC2.Remoteyellow()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Blue" XML_Guid="{02332E08-8C79-45F3-9B59-7EA14DC093E2}">
                                            <Action XML_Guid="{658D7EEE-B945-4024-B391-0996BC0F5AE6}">
                                                XBMC2.Remoteblue()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Subtitle" XML_Guid="{53AD4A3E-F1D1-44C8-AEDA-5E546C0C7B70}">
                                            <Action XML_Guid="{D57A8DC4-E517-47D2-ADD5-CB1BE7F2AE22}">
                                                XBMC2.Remotesubtitle()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Language" XML_Guid="{513CACB2-5884-4FFD-99A9-247CCB47711C}">
                                            <Action XML_Guid="{57C1FD27-20F0-4A84-AA3D-2D2D053EB958}">
                                                XBMC2.Remotelanguage()
                                            </Action>
                                        </Macro>
                                    </Folder>
                                    <Folder Name="Keyboard" XML_Guid="{815935C8-43E9-4182-83DB-653EA0C01A19}">
                                        <Macro Name="Backspace" XML_Guid="{6F156C74-184B-4230-AE3D-E8F4898F0A3A}">
                                            <Action XML_Guid="{D1588F1D-7386-4C96-89CC-4B97E47453AE}">
                                                XBMC2.KeyboardBackspace()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Enter" XML_Guid="{D24842B5-AB8A-4232-9EDC-F74AA0501040}">
                                            <Action XML_Guid="{A5943348-99E7-47F9-8614-B1B0DC87A462}">
                                                XBMC2.KeyboardEnter()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Tab" XML_Guid="{014122EE-578F-4930-82D1-62DC22119F9E}">
                                            <Action XML_Guid="{2E128A11-43CC-49F4-A32B-3DA6B2CE82F1}">
                                                XBMC2.KeyboardTab()
                                            </Action>
                                        </Macro>
                                    </Folder>
                                </Folder>
                                <Folder Name="Actions" XML_Guid="{A661D6E0-7B69-4B0E-9FE3-211B67BDC823}" Expanded="True">
                                    <Folder Name="context" XML_Guid="{E9735433-3F55-4661-A2CD-B83749E98275}" Expanded="True">
                                        <Folder Name="TV playing" Enabled="False" XML_Guid="{444B83B0-5114-4714-8FFF-97CC90FBB17B}">
                                            <Macro Name="CH +" XML_Guid="{591C976E-3C49-4736-9EDD-7C009DCEAAAD}">
                                                <Event Name="MceRemote.Mce.ChannelUp" XML_Guid="{0C56D1E2-90FB-4E3A-9C9C-049EC511C95D}" />
                                                <Action XML_Guid="{50739C90-6C44-4A5B-9151-6F35D380D9A0}">
                                                    XBMC2.Remotechannelplus()
                                                </Action>
                                            </Macro>
                                            <Macro Name="CH -" XML_Guid="{896652D9-9DDE-4AE4-94C5-2FFDF6943449}">
                                                <Event Name="MceRemote.Mce.ChannelDown" XML_Guid="{2A6EABF3-E0C9-40FF-B0A2-C6BF805AB7C2}" />
                                                <Action XML_Guid="{1A20057F-FFBD-423F-8721-25DC17D7DE8A}">
                                                    XBMC2.Remotechannelminus()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Guide" XML_Guid="{F23B074A-739D-467D-AB1C-D858FFFDEB73}">
                                                <Event Name="MceRemote.Mce.Guide" XML_Guid="{1308E55D-1D2B-4CB1-B507-46310520DB20}" />
                                                <Action Enabled="False" XML_Guid="{C05375F8-C0DF-4619-AB28-58764BFD8350}">
                                                    XBMC2.Remoteguide()
                                                </Action>
                                                <Action XML_Guid="{D28E98F7-6102-4AB6-A25D-0BBAB1C4B52C}">
                                                    XBMC2.RemoteLiveTV()
                                                </Action>
                                                <Action XML_Guid="{57A1D6AD-CF75-422B-8099-D90B280B354D}">
                                                    EventGhost.StopProcessing()
                                                </Action>
                                            </Macro>
                                        </Folder>
                                        <Folder Name="Music visualisation" Enabled="False" XML_Guid="{241FED56-2071-4350-875C-599117A2E255}">
                                            <Macro Name="OSD" XML_Guid="{D3E33DD5-AF4D-49F7-8A2F-979757017542}">
                                                <Action XML_Guid="{CC8A0A31-9D59-4684-9652-61D3D48F0345}">
                                                    XBMC2.OSD()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ShowPreset" XML_Guid="{BF26A242-EB22-403B-BD32-1AB2E93DD266}">
                                                <Action XML_Guid="{59B553C5-DDD0-4655-AB93-FF6263DBBD6F}">
                                                    XBMC2.ShowPreset()
                                                </Action>
                                            </Macro>
                                            <Macro Name="PresetList" XML_Guid="{381C479C-02E7-436F-8078-37578A2A16ED}">
                                                <Action XML_Guid="{4BFA3B7A-11F8-45B4-88C5-5EAEA9576805}">
                                                    XBMC2.PresetList()
                                                </Action>
                                            </Macro>
                                            <Macro Name="NextPreset" XML_Guid="{09BC6D71-4CD0-4003-AEAB-613113FE7662}">
                                                <Action XML_Guid="{4D121722-CE46-4130-B0D6-5926F2338D83}">
                                                    XBMC2.NextPreset()
                                                </Action>
                                            </Macro>
                                            <Macro Name="PreviousPreset" XML_Guid="{C0692A5F-881F-495F-BDD7-08AF753B061D}">
                                                <Action XML_Guid="{BC074EED-8D40-4797-901B-F4BD0FDB2338}">
                                                    XBMC2.PreviousPreset()
                                                </Action>
                                            </Macro>
                                            <Macro Name="LockPreset" XML_Guid="{51939DB6-1FD8-4289-BBE7-29D12860AB76}">
                                                <Action XML_Guid="{34BE49D5-8BC9-400E-90CB-236AC83AFBE0}">
                                                    XBMC2.LockPreset()
                                                </Action>
                                            </Macro>
                                            <Macro Name="RandomPreset" XML_Guid="{6E6610C0-6334-4D00-82B9-B2F0C1C7AB5F}">
                                                <Action XML_Guid="{904036D2-C089-4637-B84A-45007DF73F91}">
                                                    XBMC2.RandomPreset()
                                                </Action>
                                            </Macro>
                                            <Macro Name="IncreaseVisRating" XML_Guid="{D6D3063B-B1D1-4EEB-9947-865AEF627B91}">
                                                <Action XML_Guid="{94218AC0-2E99-4DA3-A2B9-AB4C62EA3CDF}">
                                                    XBMC2.increasevisrating()
                                                </Action>
                                            </Macro>
                                            <Macro Name="DecreaseVisRating" XML_Guid="{090221FE-0A91-459B-BF33-DC623201247A}">
                                                <Action XML_Guid="{B35AF5A8-3032-4B84-9851-33BF77470F05}">
                                                    XBMC2.decreasevisrating()
                                                </Action>
                                            </Macro>
                                        </Folder>
                                        <Folder Name="FullScreen Video" Enabled="False" XML_Guid="{BDD0A64F-0925-4765-944C-60F6DB775CD4}">
                                            <Macro Name="StepForward" XML_Guid="{2962A07A-A8E2-4BE3-90C7-1E7C4FFF45A7}">
                                                <Event Name="MceRemote.Mce.Forward" XML_Guid="{D1D6FDE5-E562-41F6-A96B-0D6A69A43D64}" />
                                                <Action XML_Guid="{859320E6-37C8-4A41-B797-C6D0AD9E2E4F}">
                                                    XBMC2.StepForward()
                                                </Action>
                                            </Macro>
                                            <Macro Name="StepBack" XML_Guid="{C8E5718C-0D09-4FD2-8CE4-87AD4C209897}">
                                                <Event Name="MceRemote.Mce.Rewind" XML_Guid="{5E07A3C6-A0F8-4627-9CFF-B4F6296C25A2}" />
                                                <Action XML_Guid="{AB8F7D3A-0A48-40AC-9741-0334BCAA87EF}">
                                                    XBMC2.StepBack()
                                                </Action>
                                            </Macro>
                                            <Macro Name="BigStepForward" XML_Guid="{4CE5BDDD-4CF8-42FC-9F8F-EEACD1B92120}">
                                                <Action XML_Guid="{175ACFFB-9824-410B-9D83-69B6ED74B1EA}">
                                                    XBMC2.BigStepForward()
                                                </Action>
                                            </Macro>
                                            <Macro Name="BigStepBack" XML_Guid="{E8D306C0-5B65-48F1-8AFB-50A9CF61A03B}">
                                                <Action XML_Guid="{9CB6E91A-3C0A-4E19-B793-21C06D1CC568}">
                                                    XBMC2.BigStepBack()
                                                </Action>
                                            </Macro>
                                            <Macro Name="SmallStepBack" XML_Guid="{599BCBE9-0033-455A-888F-796C84E8FAF4}">
                                                <Action XML_Guid="{3B98E34C-D31E-4D61-92DE-2C091AE97673}">
                                                    XBMC2.SmallStepBack()
                                                </Action>
                                            </Macro>
                                            <Macro Name="OSD" XML_Guid="{FBA5F8F4-6054-4254-A385-D714D0E91E24}">
                                                <Action XML_Guid="{FD4B1FCD-3F09-4DA5-9661-6A77614D7F19}">
                                                    XBMC2.OSD()
                                                </Action>
                                            </Macro>
                                            <Macro Name="AspectRatio" XML_Guid="{9640632F-C04F-4055-9423-AB110C10DF8E}">
                                                <Action XML_Guid="{A7E0AB84-4B93-4066-9DB3-317BDAF748EE}">
                                                    XBMC2.AspectRatio()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ShowSubtitles" XML_Guid="{F1E0D702-759E-49F5-B041-FBE1D8B777D0}">
                                                <Action XML_Guid="{97ADE122-4323-46C4-ACBF-E10BAB36CEE7}">
                                                    XBMC2.ShowSubtitles()
                                                </Action>
                                            </Macro>
                                            <Macro Name="NextSubtitle" XML_Guid="{3DB5BD3E-76E0-4B74-BD9E-566FFDABD99B}">
                                                <Event Name="MceRemote.Mce.Skip" XML_Guid="{F1A6CF8F-8838-4673-8F16-9DB4BA1EE35B}" />
                                                <Action XML_Guid="{BDA7F0B8-2289-4538-8C2A-6FC60070E03E}">
                                                    XBMC2.NextSubtitle()
                                                </Action>
                                            </Macro>
                                            <Macro Name="SubtitleDelay" XML_Guid="{266F00D9-3D59-48C2-A63D-640162FBA427}">
                                                <Action XML_Guid="{A4EFC128-12C5-49D1-AD16-CE0FAB36887F}">
                                                    XBMC2.Subtitledelay()
                                                </Action>
                                            </Macro>
                                            <Macro Name="SubtitleDelayMinus" XML_Guid="{923F9760-5B9D-4FA6-A635-A39C4F6D38E0}">
                                                <Event Name="MceRemote.Mce.ChannelDown" XML_Guid="{4A7148F8-5449-404C-9D71-17E4FE4DFFA1}" />
                                                <Action XML_Guid="{BECB6CE3-872C-4E54-93CE-32F978C489EF}">
                                                    XBMC2.SubtitleDelayMinus()
                                                </Action>
                                            </Macro>
                                            <Macro Name="SubtitleDelayPlus" XML_Guid="{1CD4BA82-EC0C-4EE8-B1D6-0A734051BC9E}">
                                                <Event Name="MceRemote.Mce.ChannelUp" XML_Guid="{400EBCCD-3B05-42EE-B7BC-E4CB0620EE64}" />
                                                <Action XML_Guid="{8DB984BB-0B46-440C-9ED3-1E179910F025}">
                                                    XBMC2.SubtitleDelayPlus()
                                                </Action>
                                            </Macro>
                                            <Macro Name="AudioDelay" XML_Guid="{9454C1BC-FD29-4227-A2A3-94DA4817E08A}">
                                                <Action XML_Guid="{5827C59A-D493-4ED9-8864-1FA931FD4E16}">
                                                    XBMC2.Audiodelay()
                                                </Action>
                                            </Macro>
                                            <Macro Name="AudioDelayMinus" XML_Guid="{57C1F904-3E48-4FC8-8ABB-EAFE43975110}">
                                                <Action XML_Guid="{7C97D473-4B50-4889-857D-0AEA7648D20C}">
                                                    XBMC2.AudioDelayMinus()
                                                </Action>
                                            </Macro>
                                            <Macro Name="AudioDelayPlus" XML_Guid="{1145C2E7-331A-493A-8A21-E6D1924D743E}">
                                                <Action XML_Guid="{9FD83B81-D9C6-4E74-8082-8C06134B147C}">
                                                    XBMC2.AudioDelayPlus()
                                                </Action>
                                            </Macro>
                                            <Macro Name="AudioNextLanguage" XML_Guid="{4A721B18-BB94-4B19-A06C-9FBCAFCC1865}">
                                                <Action XML_Guid="{67BCA5D0-F7DB-493B-B4B0-ACBC97F26F8E}">
                                                    XBMC2.AudioNextLanguage()
                                                </Action>
                                            </Macro>
                                            <Macro Name="MplayerOSD" XML_Guid="{EDF864E6-2A26-4383-89AC-1DA10E4B02BE}">
                                                <Action XML_Guid="{17BCD6B7-A63B-4BB3-A426-3A1EA39AECAD}">
                                                    XBMC2.mplayerosd()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ShowTime" XML_Guid="{C71DEBB4-2127-434B-84FB-064B73507364}">
                                                <Action XML_Guid="{C90AF921-F042-4AED-9DC6-5219A890A6D9}">
                                                    XBMC2.ShowTime()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ShowVideoMenu" XML_Guid="{32A8D7A4-6308-426B-8FFD-E6D7F4E39127}">
                                                <Event Name="MceRemote.Mce.Details" XML_Guid="{14FCEA62-AFDB-4B29-9107-9E01D075ACBB}" />
                                                <Action XML_Guid="{8A32A12D-1212-4656-92DC-0431164DCD2F}">
                                                    XBMC2.ShowVideoMenu()
                                                </Action>
                                            </Macro>
                                            <Macro Name="IncreasePAR" XML_Guid="{33FB00AF-B0A6-40CF-8509-C4ECFA6A8D8A}">
                                                <Action XML_Guid="{91918E72-7650-414C-8FA4-B155F6B6B2BA}">
                                                    XBMC2.Increasepar()
                                                </Action>
                                            </Macro>
                                            <Macro Name="DecreasePAR" XML_Guid="{A12B6F55-48D8-43F7-9D0D-8B5B6DF43361}">
                                                <Action XML_Guid="{65C15FA6-973C-4134-96F7-DFEEF4C4D63B}">
                                                    XBMC2.Decreasepar()
                                                </Action>
                                            </Macro>
                                        </Folder>
                                        <Folder Name="Picture slideshow" Enabled="False" XML_Guid="{D37EBBE8-BCC1-4863-BD87-011A0C5315F3}">
                                            <Macro Name="NextPicture" XML_Guid="{FE1667F4-1F0D-4303-9DAF-C5FB86F90E44}">
                                                <Action XML_Guid="{CBB44560-0592-45AC-AE96-D44DB6B72465}">
                                                    XBMC2.NextPicture()
                                                </Action>
                                            </Macro>
                                            <Macro Name="PreviousPicture" XML_Guid="{8AE2A9D1-E829-4AFC-8721-A10747F51C19}">
                                                <Action XML_Guid="{E6B62FB5-816D-4B72-8259-A68E425F810A}">
                                                    XBMC2.PreviousPicture()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomOut" XML_Guid="{D0DED4BB-71FF-4A94-8049-E00103EDD797}">
                                                <Action XML_Guid="{2B68558E-5889-4650-B373-07F2358D0CDC}">
                                                    XBMC2.ZoomOut()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomIn" XML_Guid="{6F5C6B4B-27B7-4E2A-8D5E-E3E7A0F506EE}">
                                                <Action XML_Guid="{3EB4A173-1457-4496-B62C-712A659F3CB7}">
                                                    XBMC2.ZoomIn()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomNormal" XML_Guid="{C501CCCB-0419-482B-B8CE-85AF167410FC}">
                                                <Action XML_Guid="{A8C544EE-EDA2-45D2-8315-BAAEAE4E80CF}">
                                                    XBMC2.ZoomNormal()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomLevel1" XML_Guid="{4F5E0CEB-34F9-43A0-B0A6-450A1E12FB4C}">
                                                <Action XML_Guid="{74715027-35B5-457B-BD55-94548840C746}">
                                                    XBMC2.ZoomLevel1()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomLevel2" XML_Guid="{46C7F589-6708-4766-8BB6-9EEFC85180BE}">
                                                <Action XML_Guid="{DA2A2713-4C87-4160-98D3-E1AA000BB80B}">
                                                    XBMC2.ZoomLevel2()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomLevel3" XML_Guid="{33FD0B03-CD35-48F9-99D4-B837FED04E87}">
                                                <Action XML_Guid="{747F6006-DA64-48E1-BE33-DA9DFD2056C9}">
                                                    XBMC2.ZoomLevel3()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomLevel4" XML_Guid="{A64205FF-DFBE-4201-847E-362E9B82B40D}">
                                                <Action XML_Guid="{DEE2B77A-C7C6-4B0C-90B6-7B46D9F654A0}">
                                                    XBMC2.ZoomLevel4()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomLevel5" XML_Guid="{FE7C76D2-F1BE-4D43-A921-6D9A3F2DABEE}">
                                                <Action XML_Guid="{EEE2482F-E9BE-4E44-8E41-6B80D5E277A4}">
                                                    XBMC2.ZoomLevel5()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomLevel6" XML_Guid="{7E341843-B359-445F-A7BC-0CC2E6FABBA7}">
                                                <Action XML_Guid="{03886178-6171-4A3C-A073-69142ACD7A6F}">
                                                    XBMC2.ZoomLevel6()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomLevel7" XML_Guid="{BD3E1560-7480-4696-B322-436BBEFBD627}">
                                                <Action XML_Guid="{491CF710-8116-44E8-8061-B47BD6FC1023}">
                                                    XBMC2.ZoomLevel7()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomLevel8" XML_Guid="{A1AB2206-C07A-4A50-BE8A-5C64A38E88EC}">
                                                <Action XML_Guid="{59E33F55-E1E8-4BD2-81B3-826FF2EC457F}">
                                                    XBMC2.ZoomLevel8()
                                                </Action>
                                            </Macro>
                                            <Macro Name="ZoomLevel9" XML_Guid="{72B883FE-8499-47F2-88E5-D61A1CFD9401}">
                                                <Action XML_Guid="{64E2CA77-3BE5-4497-851F-87C69B6C24CC}">
                                                    XBMC2.ZoomLevel9()
                                                </Action>
                                            </Macro>
                                            <Macro Name="AnalogMove" XML_Guid="{B5F87EEF-70EC-4940-A56A-FD97401E7214}">
                                                <Action XML_Guid="{C0BED537-25D3-4F3E-B60C-7DF9AF435A13}">
                                                    XBMC2.AnalogMove()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Rotate" XML_Guid="{F5BE602B-3A1C-4903-8FEA-8DA90024CE15}">
                                                <Action XML_Guid="{1D61DBAF-20D9-49A7-BA12-13A41CF28F45}">
                                                    XBMC2.Rotate()
                                                </Action>
                                            </Macro>
                                        </Folder>
                                        <Folder Name="Media playing" Enabled="False" XML_Guid="{6FC92013-8677-476F-B97B-6E022203FD68}">
                                            <Macro Name="Play" XML_Guid="{9B76610F-2660-4D74-ABDD-005AEEEE6CA2}" Expanded="True">
                                                <Action XML_Guid="{DF41630C-0758-425F-AD5C-9C3D66BD07C3}">
                                                    XBMC2.Play()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Pause" XML_Guid="{1035BC7C-15FC-4013-AB14-75B200DDE316}" Expanded="True">
                                                <Action XML_Guid="{D6510FB5-3FDB-4E20-B2C3-46F859BFA6D0}">
                                                    XBMC2.Pause()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Stop" XML_Guid="{F06160D7-5FB3-4D07-B021-175762BA802E}">
                                                <Action XML_Guid="{0B7D9E12-9A29-4482-93D1-E30FAEF541AC}">
                                                    XBMC2.Stop()
                                                </Action>
                                            </Macro>
                                            <Macro Name="FastForward" XML_Guid="{684FB0E6-885A-4E86-8DEC-0A6B9F85DD20}">
                                                <Action XML_Guid="{03C0C3A0-330B-4868-A37D-0381DD0EC58A}">
                                                    XBMC2.FastForward()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Rewind" XML_Guid="{9EFB257A-A324-4A9B-AC6E-CDDF49859E7A}">
                                                <Action XML_Guid="{2428D106-9352-4227-9876-2C325F8403BB}">
                                                    XBMC2.Rewind()
                                                </Action>
                                            </Macro>
                                            <Macro Name="SkipNext" XML_Guid="{60F61D68-3A52-4F8A-BE99-D19186409466}">
                                                <Action XML_Guid="{57DD16AF-66EB-4D48-919C-F70401016D72}">
                                                    XBMC2.SkipNext()
                                                </Action>
                                            </Macro>
                                            <Macro Name="SkipPrevious" XML_Guid="{9478AA12-37DE-4022-882E-A2125E324ED7}">
                                                <Action XML_Guid="{FAEF5DEA-6381-42C1-87FE-7B26AF3888EC}">
                                                    XBMC2.SkipPrevious()
                                                </Action>
                                            </Macro>
                                            <Macro Name="FullScreen" XML_Guid="{D30D4301-16ED-4B07-BBE3-6E495DC83DA6}">
                                                <Action XML_Guid="{BBC3C2E2-00A0-4AF2-BD6A-C7C0412A2749}">
                                                    XBMC2.FullScreen()
                                                </Action>
                                            </Macro>
                                            <Macro Name="CodecInfo" XML_Guid="{DE09A0B8-832A-42EA-BD2A-375E116EB582}">
                                                <Action XML_Guid="{5F28DF16-9C2B-40B1-9C46-4F08664E1E4E}">
                                                    XBMC2.CodecInfo()
                                                </Action>
                                            </Macro>
                                            <Macro Name="AnalogSeekForward" XML_Guid="{80366A8A-AA91-4400-87E0-0381724A512F}">
                                                <Action XML_Guid="{31116003-85AD-4C91-B16A-AAE00195061C}">
                                                    XBMC2.AnalogSeekForward()
                                                </Action>
                                            </Macro>
                                            <Macro Name="AnalogSeekBack" XML_Guid="{6EFC1D77-01F8-4A41-B98E-7592FFAA57C8}">
                                                <Action XML_Guid="{BA705642-2435-496B-8C61-8802158BFABE}">
                                                    XBMC2.AnalogSeekBack()
                                                </Action>
                                            </Macro>
                                            <Macro Name="AnalogFastForward" XML_Guid="{5BB679F1-55E4-453C-AE01-3BEC9192F0F3}">
                                                <Action XML_Guid="{6A2268CB-88FA-439C-8199-88CE3AC44DA4}">
                                                    XBMC2.AnalogFastForward()
                                                </Action>
                                            </Macro>
                                            <Macro Name="AnalogRewind" XML_Guid="{4C9BB649-6319-4EF9-ABDE-6F4E60505DF3}">
                                                <Action XML_Guid="{B40E7062-A9A5-4208-9347-E91670A66D88}">
                                                    XBMC2.AnalogRewind()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Party Mode" XML_Guid="{FE0D0291-B701-4B6E-9422-DC1556886405}">
                                                <Action XML_Guid="{FCD2E635-12AC-4928-B99A-6D29AB097758}">
                                                    XBMC2.PartyMode()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Random" XML_Guid="{3B4A63E1-E32D-4A9E-87FC-976F5F38B3CF}">
                                                <Action XML_Guid="{840947BC-5148-46DF-8F34-E03A9C096258}">
                                                    XBMC2.Random()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Repeat" XML_Guid="{61B7303B-662C-4CF4-908B-37D965267110}">
                                                <Action XML_Guid="{8192D3D1-A690-4016-8A6A-5627E527B7CA}">
                                                    XBMC2.Repeat()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Update Video Library" XML_Guid="{62B1D342-336D-46E2-82CB-4E88CEF55697}">
                                                <Action XML_Guid="{3BE1630D-0746-4A33-AE2C-1DB9860C4839}">
                                                    XBMC2.UpdateVideoLibrary()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Update Music Library" XML_Guid="{A6483EC4-E83F-4E1D-BC4D-C14054F7E979}">
                                                <Action XML_Guid="{636B39E6-AACD-4BE7-888C-A7011DABE846}">
                                                    XBMC2.UpdateMusicLibrary()
                                                </Action>
                                            </Macro>
                                            <Macro Name="IncreaseRating" XML_Guid="{AC800FA6-D7C7-46F3-A942-C2A028095523}">
                                                <Action XML_Guid="{0625C98B-0279-4089-8B26-E090773278FC}">
                                                    XBMC2.IncreaseRating()
                                                </Action>
                                            </Macro>
                                            <Macro Name="DecreaseRating" XML_Guid="{9273F108-A601-4D6B-B152-E3EEF72328C3}">
                                                <Action XML_Guid="{D1A700A2-4838-460C-A98E-62CC4DF7B1C6}">
                                                    XBMC2.DecreaseRating()
                                                </Action>
                                            </Macro>
                                            <Macro Name="EjectTray" XML_Guid="{948071E2-E067-4F6D-B44F-913DF76F67DE}">
                                                <Action XML_Guid="{D5EA659F-0AD8-4795-BC5B-4E6E55F5516E}">
                                                    XBMC2.EjectTray()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Record" XML_Guid="{B8D5EBB2-87A1-45D2-B5AD-954C95943638}">
                                                <Action XML_Guid="{24E413CB-E5D8-4519-AFBE-44C6A7274BA1}">
                                                    XBMC2.Record()
                                                </Action>
                                            </Macro>
                                            <Macro Name="PlayDVD" XML_Guid="{0FBB1C6F-6E60-41D0-AB28-8BAE607153BF}">
                                                <Action XML_Guid="{17E93E7B-4DBB-4D6F-A0E4-021B1B1F9ADE}">
                                                    XBMC2.PlayDVD()
                                                </Action>
                                            </Macro>
                                            <Macro Name="LastFM.Love" XML_Guid="{7C53D9B6-7672-4A17-92E4-3AEC8AF8BB73}">
                                                <Action XML_Guid="{FA0BC7FE-3EC5-4ACE-ADCC-7DBB0BDA8A6C}">
                                                    XBMC2.LastFMLove()
                                                </Action>
                                            </Macro>
                                            <Macro Name="LastFM.Ban" XML_Guid="{84CE3DCA-2A11-41D8-838F-2D71F8552277}">
                                                <Action XML_Guid="{48D5C856-84E7-4F3B-9B2C-84A9BDC2922B}">
                                                    XBMC2.LastFMBan()
                                                </Action>
                                            </Macro>
                                        </Folder>
                                        <Folder Name="Playlist" Enabled="False" XML_Guid="{3C987B50-6CC6-4F73-9E80-8995D5B883CC}">
                                            <Macro Name="Playlist" XML_Guid="{9B6B2E2C-DB19-4389-9070-A16814BFA0A1}">
                                                <Action XML_Guid="{FDCA44E4-7B2E-4B44-A9D2-D62A2DC017B2}">
                                                    XBMC2.Playlist()
                                                </Action>
                                            </Macro>
                                            <Macro Name="Queue" XML_Guid="{A2CBEFDE-E705-45C5-9E9B-70E4EE932AC6}">
                                                <Action XML_Guid="{AE3A1FA1-AA0F-4A42-AFE4-B7D5144D0B82}">
                                                    XBMC2.Queue()
                                                </Action>
                                            </Macro>
                                            <Macro Name="MoveItemUp" XML_Guid="{CFF2197A-6B0B-4383-8D04-4A848917AB45}">
                                                <Action XML_Guid="{53D86268-5A3F-43F8-9A14-2A68269F159C}">
                                                    XBMC2.MoveItemUp()
                                                </Action>
                                            </Macro>
                                            <Macro Name="MoveItemDown" XML_Guid="{61E758FD-3B96-4C05-9710-B7ACFD83FB48}">
                                                <Action XML_Guid="{DF5C7DCE-B04B-4E9F-99B5-40426702FDF0}">
                                                    XBMC2.MoveItemDown()
                                                </Action>
                                            </Macro>
                                        </Folder>
                                    </Folder>
                                    <Folder Name="General" XML_Guid="{F5B1DA43-6FDC-41EB-B260-563989AB4C5C}">
                                        <Macro Name="Left" XML_Guid="{182D6AF8-CA5B-4D1D-9DE6-4734EFE0C180}">
                                            <Action XML_Guid="{05B67BA1-E51A-4BC6-92A8-67E4A68FDCB7}">
                                                XBMC2.Left()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Right" XML_Guid="{E98810CA-B338-4EA2-BA8F-36BE5AE09943}">
                                            <Action XML_Guid="{18F697A5-4324-4150-929C-1C24212B0C27}">
                                                XBMC2.Right()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Up" XML_Guid="{646ADA2F-809E-4F8D-A807-06D90C623EE9}">
                                            <Action XML_Guid="{FB29225D-70E7-4210-96E1-8580F0935F62}">
                                                XBMC2.Up()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Down" XML_Guid="{8A652469-7FAE-45FD-BE48-ADE9A079518F}">
                                            <Action XML_Guid="{332EC745-895A-4176-A2F8-220D3AE71F9C}">
                                                XBMC2.Down()
                                            </Action>
                                        </Macro>
                                        <Macro Name="PageUp" XML_Guid="{AEBF35E5-BF3D-4B78-A4D4-D8D9B8C36586}">
                                            <Action XML_Guid="{3AEE7D2B-CD1F-433A-BFED-F66421DB9316}">
                                                XBMC2.PageUp()
                                            </Action>
                                        </Macro>
                                        <Macro Name="PageDown" XML_Guid="{DA34BBD4-4531-4371-A2B3-0CA32BCD673E}">
                                            <Action XML_Guid="{635CDF4E-E462-4924-BCE0-F29DA12347E5}">
                                                XBMC2.PageDown()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Select" XML_Guid="{1898ECFB-68FA-412A-93C7-59D848C36C7F}">
                                            <Action XML_Guid="{6E362B70-794C-482C-BE7D-5C91BF9D3C8D}">
                                                XBMC2.Select()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Highlight" XML_Guid="{4ED914C8-DA5D-435F-9C5B-A51AEE907BF9}">
                                            <Action XML_Guid="{04427E99-E1C4-46A5-8CC1-34174BEA682F}">
                                                XBMC2.Highlight()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Parentfolder" XML_Guid="{7DD28233-D628-4F60-A3E7-40FC2DFEEBFB}">
                                            <Action XML_Guid="{7DC0D823-96A5-46B6-A833-FACFE2257CB0}">
                                                XBMC2.Parentfolder()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Back" XML_Guid="{ED04F854-44CE-4DBE-BD64-1CE8E98DB03A}">
                                            <Action XML_Guid="{686CB029-35CF-4D1C-B5C5-7F7235E41A78}">
                                                XBMC2.Back()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ParentDir" XML_Guid="{EB1DDD39-93A7-4173-BF74-D586F5A3218F}">
                                            <Action XML_Guid="{CCB3C633-D03B-4A65-850B-6BA7481364D6}">
                                                XBMC2.ParentDir()
                                            </Action>
                                        </Macro>
                                        <Macro Name="PreviousMenu" XML_Guid="{CE8EC9BC-139F-47B0-9F30-949238116A3A}">
                                            <Action XML_Guid="{3887D198-16FE-408E-AF9C-6CFE909C2AF6}">
                                                XBMC2.PreviousMenu()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Info" XML_Guid="{5E782789-6E0D-4446-967B-F9F5EE8B163D}">
                                            <Event Name="MceRemote.Mce.Escape" XML_Guid="{1785DAC7-B7BC-46E9-AEAD-F4725BE7E05D}" />
                                            <Action XML_Guid="{F7C7F526-8737-4C05-B160-112E79C3FE3C}">
                                                XBMC2.Info()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Screenshot" XML_Guid="{A2239EDF-386D-427F-9F8F-B08AD485D361}">
                                            <Action XML_Guid="{4AEB2828-EC82-4F44-A3EC-6FB015FFBE18}">
                                                XBMC2.Screenshot()
                                            </Action>
                                        </Macro>
                                        <Macro Name="PowerOff" XML_Guid="{E33A2ABA-CF8F-4B03-8C85-7A8E914DF605}">
                                            <Action XML_Guid="{AA4EFE72-F8CD-4D27-A900-95F162B8EF5E}">
                                                XBMC2.PowerOff()
                                            </Action>
                                        </Macro>
                                        <Macro Name="VolumeUp" XML_Guid="{6146EF9B-482F-4E52-B419-577D4FC758CF}">
                                            <Action XML_Guid="{8F7BB92F-F437-408D-A5AE-C47DD7695B1D}">
                                                XBMC2.VolumeUp()
                                            </Action>
                                        </Macro>
                                        <Macro Name="VolumeDown" XML_Guid="{37630F52-2488-4C95-A448-A4AAFA4504D8}">
                                            <Action XML_Guid="{2C7E0FA3-F12B-4EFA-8B43-CE5CD39CC9E2}">
                                                XBMC2.VolumeDown()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Mute" XML_Guid="{3ED47F3C-D201-41E9-937B-1DB321054E39}">
                                            <Action XML_Guid="{AF6BEF88-35C3-4643-9906-EE023FE0A060}">
                                                XBMC2.Mute()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ContextMenu" XML_Guid="{CF1DA7AE-F530-491B-AC4A-8596615052B1}">
                                            <Event Name="MceRemote.Mce.Details" XML_Guid="{94BC97B5-0434-423C-B2D2-BFC1877DEEA9}" />
                                            <Action XML_Guid="{DD067F5A-CEEC-4E48-B955-77043D02DF24}">
                                                XBMC2.ContextMenu()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ScrollUp" XML_Guid="{3ADDAA8D-87A1-4EF8-A5F2-3A89DF7C6648}">
                                            <Action XML_Guid="{02920536-8069-4A0B-BBCD-C324A0BF7D3E}">
                                                XBMC2.ScrollUp()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ScrollDown" XML_Guid="{88820BE2-0BC7-425C-AAF3-3D6AEF1C929C}">
                                            <Action XML_Guid="{9F4855B6-156E-4027-9B10-79EFEBA08B45}">
                                                XBMC2.ScrollDown()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Close" XML_Guid="{09A54CB6-56ED-4075-B689-6ED766BABB2B}">
                                            <Action XML_Guid="{78595BED-49CF-4266-804D-EDA38D27534E}">
                                                XBMC2.Close()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Number0" XML_Guid="{BB082BB1-9307-4082-B2C2-92EE27E50CA1}">
                                            <Action XML_Guid="{02E75802-76A2-4521-9298-51B008E8C36A}">
                                                XBMC2.Number0()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Number1" XML_Guid="{CE7FD810-4CFD-4C54-A34D-EF380F808872}">
                                            <Action XML_Guid="{894E72AD-0BFA-48DE-88B4-54C489CAA674}">
                                                XBMC2.Number1()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Number2" XML_Guid="{EF92F6BD-B9DD-4077-A630-404EC07F0E83}">
                                            <Action XML_Guid="{DF3728DD-286D-4E3F-9112-2C8677E2FA64}">
                                                XBMC2.Number2()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Number3" XML_Guid="{D5D3E738-8ED0-4A04-AFCA-98600A049077}">
                                            <Action XML_Guid="{6B3F8940-E0DB-41EB-A36D-EA09989FF032}">
                                                XBMC2.Number3()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Number4" XML_Guid="{029AE64B-E613-4912-A48E-512292F4816A}">
                                            <Action XML_Guid="{7652825E-382A-4FDF-909D-3F38C35DDDC4}">
                                                XBMC2.Number4()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Number5" XML_Guid="{ECFA3E38-7DE9-46C0-BB26-E0490A96EA0E}">
                                            <Action XML_Guid="{922BE21A-4CED-4FF9-89D5-872F76C9D8A2}">
                                                XBMC2.Number5()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Number6" XML_Guid="{F92405F7-9E00-42B9-A81A-886F7C2B6AF4}">
                                            <Action XML_Guid="{4F2003FC-62EA-40D9-8A8E-959A5FA64A49}">
                                                XBMC2.Number6()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Number7" XML_Guid="{D9AF521D-7548-4889-8834-137AEC108F11}">
                                            <Action XML_Guid="{D4FA78AC-15CD-4087-8C62-6B99D98F629B}">
                                                XBMC2.Number7()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Number8" XML_Guid="{8B5FCA04-BDF0-493B-9621-FB753BF0FEBD}">
                                            <Action XML_Guid="{B5DD4B5D-2815-4801-95A9-106A2042E2F9}">
                                                XBMC2.Number8()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Number9" XML_Guid="{07A6109D-5A35-4DE8-ADE8-6619186592E2}">
                                            <Action XML_Guid="{77603592-F37D-40F7-9B03-F9D7D7136C48}">
                                                XBMC2.Number9()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Guide" XML_Guid="{4F972D45-C2BF-4CA6-AD2C-8FC39C1D4DE3}">
                                            <Event Name="MceRemote.Mce.Guide" XML_Guid="{67C27E9C-86FC-473C-98C3-9848B8ED7A21}" />
                                            <Action XML_Guid="{A0FFCD90-AEC1-4A08-874A-56164C18AF08}">
                                                XBMC2.Remoteguide()
                                            </Action>
                                            <Action XML_Guid="{91F7FF63-916B-4817-931E-ACCCF544B5E5}">
                                                EventGhost.StopProcessing()
                                            </Action>
                                        </Macro>
                                    </Folder>
                                    <Folder Name="Screen calibration" XML_Guid="{7501F2C4-AB5F-4239-B035-B5C3ED286351}">
                                        <Macro Name="NextCalibration" XML_Guid="{EFE238B8-8BB1-49C2-B6B9-2DE081A16F02}">
                                            <Action XML_Guid="{CAAC58E1-2C53-4D88-8A22-9949F946A2A8}">
                                                XBMC2.NextCalibration()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ResetCalibration" XML_Guid="{C365209E-9A3F-4190-830F-2E96100775F6}">
                                            <Action XML_Guid="{3B8CAC97-482C-401D-8B8D-9E9711504273}">
                                                XBMC2.ResetCalibration()
                                            </Action>
                                        </Macro>
                                        <Macro Name="AnalogMove" XML_Guid="{DA7D5321-2DD6-4AFD-B11B-91233BF72695}">
                                            <Action XML_Guid="{BB57807F-58E0-4A29-870B-E9A240867FB5}">
                                                XBMC2.AnalogMove()
                                            </Action>
                                        </Macro>
                                        <Macro Name="NextResolution" XML_Guid="{95AAF9F5-12CF-448D-A1BC-9C1EAC3CBFA8}">
                                            <Action XML_Guid="{1766F3A8-A571-4C6E-87A0-959CF9518511}">
                                                XBMC2.NextResolution()
                                            </Action>
                                        </Macro>
                                    </Folder>
                                    <Folder Name="File Manager" XML_Guid="{23D4DB71-2744-4403-B6F5-1A952B2DF0F8}">
                                        <Macro Name="Delete" XML_Guid="{7951C823-221D-4514-805F-9179FE37B208}">
                                            <Action XML_Guid="{3D417F18-920E-4554-A290-557A497D0B52}">
                                                XBMC2.Delete()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Copy" XML_Guid="{D6FDC436-45CE-4097-9E1C-163776263161}">
                                            <Action XML_Guid="{38D27075-18C2-486A-903E-74AAA7A0D872}">
                                                XBMC2.Copy()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Move" XML_Guid="{251906AE-0FF6-43A4-847F-4BEA2D25D6A7}">
                                            <Action XML_Guid="{4BCF177C-A72F-4089-B665-9EEA19881E30}">
                                                XBMC2.Move()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Rename" XML_Guid="{CDA35E84-0BE6-4EAA-8560-991382C2FBD1}">
                                            <Action XML_Guid="{6FA0E680-BBDC-41A1-9C91-24D6860E0583}">
                                                XBMC2.Rename()
                                            </Action>
                                        </Macro>
                                    </Folder>
                                    <Folder Name="On-screen keyboard" XML_Guid="{42EC9A4E-4330-4B04-AE4F-2A8F1723D403}">
                                        <Macro Name="BackSpace" XML_Guid="{CB6769A2-3E0A-4DD5-9B82-DBA8AF7AF145}">
                                            <Action XML_Guid="{E13987C3-5F1E-4EC2-B138-C17593DE183D}">
                                                XBMC2.BackSpace()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Shift" XML_Guid="{E21580F6-9ABE-45AA-8216-F2356F7BE42A}">
                                            <Action XML_Guid="{97764632-147F-4CE5-8F3F-F101D6ABB18C}">
                                                XBMC2.Shift()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Symbols" XML_Guid="{A9B0E2D9-D033-47F3-A51B-21CEFE4139B7}">
                                            <Action XML_Guid="{7D0F507F-4550-46EC-B7C6-963A7FDAF1C1}">
                                                XBMC2.Symbols()
                                            </Action>
                                        </Macro>
                                        <Macro Name="CursorLeft" XML_Guid="{A557EB56-2DCB-42A1-8ECD-7E3F8535DBD6}">
                                            <Action XML_Guid="{516A3663-1D05-4B58-8F85-9CAEFB3F4125}">
                                                XBMC2.CursorLeft()
                                            </Action>
                                        </Macro>
                                        <Macro Name="CursorRight" XML_Guid="{F1E7B5A1-6686-49C1-AD39-C20BD5629AA6}">
                                            <Action XML_Guid="{5B5CFAA5-9365-413B-8DD9-DBAFB4CFD8F5}">
                                                XBMC2.CursorRight()
                                            </Action>
                                        </Macro>
                                    </Folder>
                                    <Folder Name="Shutdown related" XML_Guid="{AC3277FC-1388-4DC5-B51D-950C3308B0EA}">
                                        <Macro Name="Quit" XML_Guid="{EE45B134-2220-4AB3-BF92-057FA8761078}" Expanded="True">
                                            <Action XML_Guid="{7BCAB4CA-D4B1-467F-875D-D963AC4BE00F}">
                                                XBMC2.Quit()
                                            </Action>
                                        </Macro>
                                        <Macro Name="RestartApp" XML_Guid="{2FCD4094-4377-49C7-814A-21D4B2A5B701}">
                                            <Action XML_Guid="{EE22F798-5C26-48CD-8537-1CC2B2259324}">
                                                XBMC2.RestartApp()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Reset Computer" XML_Guid="{A5D3E593-6D99-4021-8EF7-10F4A84C387E}">
                                            <Action XML_Guid="{F4F7ABA5-5460-4F76-B912-576B52B13576}">
                                                XBMC2.Reset()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Shutdown Computer" XML_Guid="{3C3ACB3E-AFA2-40B5-A499-5BBBE82EE749}">
                                            <Action XML_Guid="{00DD29BC-94BF-47F4-93EE-212218820A86}">
                                                XBMC2.Shutdown()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Powerdown" XML_Guid="{97384394-E780-4DB6-B0CC-37F8D03EE4BD}">
                                            <Action XML_Guid="{D344BFCD-B659-424A-B8FF-357EFBD990ED}">
                                                XBMC2.Powerdown()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Suspend" XML_Guid="{8F0F10EB-3A25-40BD-ACCE-8A8E933B38F0}">
                                            <Action XML_Guid="{50D52E2A-1083-413E-B305-4AD2E2DD29F3}">
                                                XBMC2.Suspend()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Hibernate" XML_Guid="{BDA85D69-0776-4808-87BC-6C8501F1A47E}">
                                            <Action XML_Guid="{25C361EE-0922-4672-9167-B5F91E958784}">
                                                XBMC2.Hibernate()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Reboot Computer" XML_Guid="{C3159ADA-EC93-4753-86D0-86797BF65752}">
                                            <Action XML_Guid="{CFAB5EE2-D46F-4C3B-A2C5-C9A1ADAF55D3}">
                                                XBMC2.Reboot()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Restart Computer" XML_Guid="{84C1A0DF-6E16-4BFE-A91B-B5A506A7DE48}">
                                            <Action XML_Guid="{70BC186F-42FC-4145-84DF-64B6FD275CB4}">
                                                XBMC2.Restart()
                                            </Action>
                                        </Macro>
                                    </Folder>
                                    <Folder Name="Uncategorized actions" XML_Guid="{EA416FAC-9FD8-4407-A476-AB13B46860F9}">
                                        <Macro Name="JumpSMS2" XML_Guid="{A31C0DFE-322D-4DB6-BC02-27159CFE999A}">
                                            <Action XML_Guid="{295078FC-6F0F-4526-A58B-C8A2A4F5B004}">
                                                XBMC2.JumpSMS2()
                                            </Action>
                                        </Macro>
                                        <Macro Name="JumpSMS3" XML_Guid="{02A5F22A-CB39-4465-9437-7F4E2DB6F167}">
                                            <Action XML_Guid="{3F467E75-CBFC-4DE1-87F1-7060C447DBE8}">
                                                XBMC2.JumpSMS3()
                                            </Action>
                                        </Macro>
                                        <Macro Name="JumpSMS4" XML_Guid="{6ECAF067-A7E8-4A21-BA9D-D666030B0710}">
                                            <Action XML_Guid="{73290E87-FF50-42D7-A442-B5239A6BE2D1}">
                                                XBMC2.JumpSMS4()
                                            </Action>
                                        </Macro>
                                        <Macro Name="JumpSMS5" XML_Guid="{2502ADA4-739E-4679-87A8-21B4E356BEB3}">
                                            <Action XML_Guid="{D8007951-E87B-490E-9AF6-FCA5315D1F3A}">
                                                XBMC2.JumpSMS5()
                                            </Action>
                                        </Macro>
                                        <Macro Name="JumpSMS6" XML_Guid="{4D32115D-5563-478E-9822-E635D0D2446C}">
                                            <Action XML_Guid="{FCC3BC25-7812-4BA1-85BE-15D428EAA920}">
                                                XBMC2.JumpSMS6()
                                            </Action>
                                        </Macro>
                                        <Macro Name="JumpSMS7" XML_Guid="{909EE203-D8A0-4048-A415-302BAAAE0B79}">
                                            <Action XML_Guid="{957AEF24-2306-454F-ACC5-31F3EB0396D6}">
                                                XBMC2.JumpSMS7()
                                            </Action>
                                        </Macro>
                                        <Macro Name="JumpSMS8" XML_Guid="{67926B45-CC1B-4A93-B1FB-D974070E3FB1}">
                                            <Action XML_Guid="{F49785C4-AA5F-43CF-949E-2E6D0EAD5538}">
                                                XBMC2.JumpSMS8()
                                            </Action>
                                        </Macro>
                                        <Macro Name="JumpSMS9" XML_Guid="{ECEDB9E4-A65F-4549-8059-B88F18947084}">
                                            <Action XML_Guid="{43A9B6FF-8FD5-412C-9FEC-92DB72FE3E92}">
                                                XBMC2.JumpSMS9()
                                            </Action>
                                        </Macro>
                                        <Macro Name="FilterClear" XML_Guid="{65BFFC46-8E6F-462A-9608-F7582A455D33}">
                                            <Action XML_Guid="{CF2901AD-4425-4DC6-8485-1D8281DB6EEC}">
                                                XBMC2.FilterClear()
                                            </Action>
                                        </Macro>
                                        <Macro Name="FilterSMS2" XML_Guid="{93BB145E-439A-49BE-BEC5-398D0E5F192F}">
                                            <Action XML_Guid="{EF10584A-AA3F-4111-8B28-6E70A7024BDF}">
                                                XBMC2.FilterSMS2()
                                            </Action>
                                        </Macro>
                                        <Macro Name="FilterSMS3" XML_Guid="{BA805E71-57B9-4B6B-AAB9-DF83F0505B2A}">
                                            <Action XML_Guid="{FB0ED3A8-B676-4CBE-A178-5D73E2D39C77}">
                                                XBMC2.FilterSMS3()
                                            </Action>
                                        </Macro>
                                        <Macro Name="FilterSMS4" XML_Guid="{A5E8B55C-732A-4AF0-8642-22329CB26D7C}">
                                            <Action XML_Guid="{A7DA967D-6A4E-4D9C-A470-20FC72EA952C}">
                                                XBMC2.FilterSMS4()
                                            </Action>
                                        </Macro>
                                        <Macro Name="FilterSMS5" XML_Guid="{2B770AED-FA3D-4D00-9215-DBB15BC20D8B}">
                                            <Action XML_Guid="{ED50984A-83B2-4BA4-87EA-28131DA8F150}">
                                                XBMC2.FilterSMS5()
                                            </Action>
                                        </Macro>
                                        <Macro Name="FilterSMS6" XML_Guid="{B515BA3D-9CC1-4082-8549-7CF099F089F2}">
                                            <Action XML_Guid="{9F7C891F-A13F-44C3-83FE-A456ACBAEA1A}">
                                                XBMC2.FilterSMS6()
                                            </Action>
                                        </Macro>
                                        <Macro Name="FilterSMS7" XML_Guid="{469DC6D8-CD37-47B0-B485-902EA9D7D65F}">
                                            <Action XML_Guid="{DCE09408-2461-4CCC-B7E8-C78A53408956}">
                                                XBMC2.FilterSMS7()
                                            </Action>
                                        </Macro>
                                        <Macro Name="FilterSMS8" XML_Guid="{0B6F6FD5-1EAF-48AC-9879-864122F87624}">
                                            <Action XML_Guid="{99339D87-3983-4C34-BB2B-41A92FF0EF1F}">
                                                XBMC2.FilterSMS8()
                                            </Action>
                                        </Macro>
                                        <Macro Name="FilterSMS9" XML_Guid="{79F96DB7-7C30-4E3F-9C7C-CEEF99FB842E}">
                                            <Action XML_Guid="{724F71D3-D77D-4CAE-A315-891F5F41CD92}">
                                                XBMC2.FilterSMS9()
                                            </Action>
                                        </Macro>
                                        <Macro Name="FirstPage" XML_Guid="{3067D0E9-0B33-437D-BBF1-63BFF557598A}">
                                            <Action XML_Guid="{57F1FEDF-0D54-4464-8A82-0672B9688394}">
                                                XBMC2.FirstPage()
                                            </Action>
                                        </Macro>
                                        <Macro Name="LastPage" XML_Guid="{AC909BC4-CB50-4F42-83B1-015C224D5C71}">
                                            <Action XML_Guid="{288C20D9-F348-4D80-BC64-A151F7B34D40}">
                                                XBMC2.LastPage()
                                            </Action>
                                        </Macro>
                                        <Macro Name="HideSubMenu" XML_Guid="{F570D0B3-FE81-4598-BEA8-9AFF14066F87}">
                                            <Action XML_Guid="{3CD80E9A-958E-4BBC-AD17-A687EE147B80}">
                                                XBMC2.HideSubMenu()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ToggleSource" XML_Guid="{7FB1E4BC-C6D3-4909-8893-761E4880589F}">
                                            <Action XML_Guid="{DD735194-97D9-42E4-8BD9-C18B362B7CB1}">
                                                XBMC2.ToggleSource()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Remove" XML_Guid="{5A125507-F8B4-4385-87C0-AF8FCAB2B720}">
                                            <Action XML_Guid="{10174540-34D0-4A4B-A82D-46A000303B3F}">
                                                XBMC2.Remove()
                                            </Action>
                                        </Macro>
                                        <Macro Name="AudioToggleDigital" XML_Guid="{2E668B90-0F17-4AC1-AC39-36DE3E651ECF}">
                                            <Action XML_Guid="{3E2E0C98-0ABE-4FA6-85DB-5CE4B9B76BB2}">
                                                XBMC2.AudioToggleDigital()
                                            </Action>
                                        </Macro>
                                        <Macro Name="OSDLeft" XML_Guid="{7C672A42-C64F-4006-9851-0DEE04EBC22A}">
                                            <Action XML_Guid="{C4ADA811-2867-4B0F-95D6-865EEB360C53}">
                                                XBMC2.OSDLeft()
                                            </Action>
                                        </Macro>
                                        <Macro Name="OSDRight" XML_Guid="{607CD750-83FF-42C8-90AA-9644D13B47CF}">
                                            <Action XML_Guid="{0076602F-A639-4B37-AC06-9F88C3220338}">
                                                XBMC2.OSDRight()
                                            </Action>
                                        </Macro>
                                        <Macro Name="OSDUp" XML_Guid="{469B7DC9-1C12-44C2-8839-A1E9235F5752}">
                                            <Action XML_Guid="{6BFC7678-1790-41E1-B7EC-B864636F9653}">
                                                XBMC2.OSDUp()
                                            </Action>
                                        </Macro>
                                        <Macro Name="OSDDown" XML_Guid="{45EE832A-2A1C-4C43-871A-70DFD212672F}">
                                            <Action XML_Guid="{DBD6EC8C-DEF6-4D7D-B6A3-059B7971A836}">
                                                XBMC2.OSDDown()
                                            </Action>
                                        </Macro>
                                        <Macro Name="OSDSelect" XML_Guid="{BDD06E77-A07A-40B9-B1C1-59290EC57186}">
                                            <Action XML_Guid="{7F43AFF9-45FD-4422-BC0F-C80E706AC6B8}">
                                                XBMC2.OSDSelect()
                                            </Action>
                                        </Macro>
                                        <Macro Name="OSDValuePlus" XML_Guid="{54987420-BA29-46B1-A796-67B794FB05F2}">
                                            <Action XML_Guid="{6BA83084-326C-4FFC-8A02-DDD93BF80573}">
                                                XBMC2.OSDValuePlus()
                                            </Action>
                                        </Macro>
                                        <Macro Name="OSDValueMinus" XML_Guid="{37E23655-472F-427F-A66F-CB96E31FDC51}">
                                            <Action XML_Guid="{67F6BC63-4C72-459C-B132-72B3AD6C2298}">
                                                XBMC2.OSDValueMinus()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ToggleWatched" XML_Guid="{1393FB14-8759-4491-9507-697497C8CCC2}">
                                            <Action XML_Guid="{33047E42-71B2-4544-B3CE-2068DBE71F66}">
                                                XBMC2.ToggleWatched()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ScanItem" XML_Guid="{92F7685A-1BBF-495E-9D98-F0460A8DFA13}">
                                            <Action XML_Guid="{1B188F08-17D6-4257-A0B3-54C353416C18}">
                                                XBMC2.ScanItem()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Enter" XML_Guid="{8D82EE0D-FE6D-4D36-92A6-5AAA7B64C1C0}">
                                            <Action XML_Guid="{69C4203C-654D-475C-9E70-32E95189BE40}">
                                                XBMC2.Enter()
                                            </Action>
                                        </Macro>
                                        <Macro Name="IncreaseRating" XML_Guid="{4ECCC796-8286-4BF6-A333-A1EB4A0DE0D1}">
                                            <Action XML_Guid="{DFEC1A5A-808C-4F32-A6F8-FDD55A6DFD7D}">
                                                XBMC2.IncreaseRating()
                                            </Action>
                                        </Macro>
                                        <Macro Name="DecreaseRating" XML_Guid="{2F587D17-4035-4C9F-8A49-274FBDC982A2}">
                                            <Action XML_Guid="{6D8BEF0A-578A-4740-9322-AD0E3642207F}">
                                                XBMC2.DecreaseRating()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ToggleFullScreen" XML_Guid="{6A5C66ED-E21F-4B64-957A-CE6EB4BEF166}">
                                            <Action XML_Guid="{9D57C853-04D8-48CF-A3DC-C617C0BA8686}">
                                                XBMC2.ToggleFullScreen()
                                            </Action>
                                        </Macro>
                                        <Macro Name="NextScene" XML_Guid="{B460A159-E61F-44BD-A6E5-A3A35BDD44F3}">
                                            <Action XML_Guid="{99EBA8E9-608F-4875-B4B1-EC16CC6288DC}">
                                                XBMC2.NextScene()
                                            </Action>
                                        </Macro>
                                        <Macro Name="PreviousScene" XML_Guid="{027F9DBF-246E-44EC-A422-94DE8FDB55DC}">
                                            <Action XML_Guid="{8945FD07-F725-46D0-8DA4-771A838D659E}">
                                                XBMC2.PreviousScene()
                                            </Action>
                                        </Macro>
                                        <Macro Name="NextLetter" XML_Guid="{D6C03900-B927-4E85-A12E-E7CB4FC811B8}">
                                            <Action XML_Guid="{122FA77E-6EC2-4863-BD8A-4D97BC1780EE}">
                                                XBMC2.NextLetter()
                                            </Action>
                                        </Macro>
                                        <Macro Name="PrevLetter" XML_Guid="{5DA6AB79-F947-47C2-A18A-71F1F3C911C5}">
                                            <Action XML_Guid="{0295EDF6-C780-42A6-A01D-1EC607D6BA2B}">
                                                XBMC2.PrevLetter()
                                            </Action>
                                        </Macro>
                                        <Macro Name="VerticalShiftUp" XML_Guid="{F17888E7-3B0E-4BBB-93FB-539E0CF8E03D}">
                                            <Action XML_Guid="{12E30BF9-3CB2-479F-B598-47ECC4C09676}">
                                                XBMC2.Verticalshiftup()
                                            </Action>
                                        </Macro>
                                        <Macro Name="VerticalShiftDown" XML_Guid="{D96822E8-0BD7-4EDE-A75C-C1A2F6272DFC}">
                                            <Action XML_Guid="{A40A3A61-258E-4F7C-8030-081133258A99}">
                                                XBMC2.Verticalshiftdown()
                                            </Action>
                                        </Macro>
                                        <Macro Name="PlayPause" XML_Guid="{883841EB-BDE9-4D7C-9F15-5D5C0BD4BBB8}">
                                            <Action XML_Guid="{612994D1-45E0-422D-9C7E-9E662DBD96A9}">
                                                XBMC2.Playpause()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ReloadKeymaps" XML_Guid="{BDB063B1-6D4E-4C8C-ABE7-50699E172581}">
                                            <Action XML_Guid="{AFD8B810-2B56-4525-BFFA-0274A8287984}">
                                                XBMC2.Reloadkeymaps()
                                            </Action>
                                        </Macro>
                                        <Macro Name="GuiProfile" XML_Guid="{D3F16F81-F091-4E98-AD22-E185F32B99FB}">
                                            <Action XML_Guid="{CC1F7DF9-1141-489F-8276-EBBE8D1E5580}">
                                                XBMC2.Guiprofile()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Red" XML_Guid="{57C3BA25-D3E1-44C5-9854-3F1F7E49F9F4}">
                                            <Action XML_Guid="{3FE02D18-00EE-4F01-B97B-4D8238F7247F}">
                                                XBMC2.Red()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Green" XML_Guid="{DA688564-7AE8-4EFF-B76B-0DE531F6DA23}">
                                            <Action XML_Guid="{74CC402B-CB74-4B1B-81E0-74425B1FB156}">
                                                XBMC2.Green()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Yellow" XML_Guid="{5A605EBC-DC17-4D4D-9A39-310D84551084}">
                                            <Action XML_Guid="{426E7114-DA67-4640-BDC6-77087EB30060}">
                                                XBMC2.Yellow()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Blue" XML_Guid="{A2320CFB-CFF2-492B-9412-9151ACC065B3}">
                                            <Action XML_Guid="{C08A19C4-A6A6-48AC-99AE-97D21D43BD48}">
                                                XBMC2.Blue()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Subtitleshiftup" XML_Guid="{BD719083-BD95-4CC3-B680-1204BAA5DF87}">
                                            <Action XML_Guid="{47FE9671-49A6-4614-9764-63161FD10B03}">
                                                XBMC2.Subtitleshiftup()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Subtitleshiftdown" XML_Guid="{A59B6076-00F5-46D2-9626-C76452647FDD}">
                                            <Action XML_Guid="{4E87C805-66A2-4B48-9494-F79BC6791508}">
                                                XBMC2.Subtitleshiftdown()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Subtitlealign" XML_Guid="{4489CC33-CC6B-4857-9458-BCABEF9D6F08}">
                                            <Action XML_Guid="{D5BDDDFC-412D-4F7F-9D8F-EBD425E3E638}">
                                                XBMC2.Subtitlealign()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Help" XML_Guid="{BE7FF94A-C33E-4616-AAB3-2060F02DCCF2}">
                                            <Action XML_Guid="{13637233-7221-427C-9B1A-3FDBAF89599C}">
                                                XBMC2.Help()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Minimize" XML_Guid="{03BB0E27-5BD7-4D91-AE02-32FB17459859}">
                                            <Action XML_Guid="{57F9D00C-BC3B-4D5A-8C8E-834A166A6F8E}">
                                                XBMC2.Minimize()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Mastermode" XML_Guid="{4240EE04-87B9-4B76-AEBD-0C22F0B7CB29}">
                                            <Action XML_Guid="{142C75CB-2100-4EB2-BAF6-C4C149306841}">
                                                XBMC2.Mastermode()
                                            </Action>
                                        </Macro>
                                        <Macro Name="TakeScreenshot" XML_Guid="{6FF1BCF0-C96D-4302-952C-EE509F5933F0}">
                                            <Action XML_Guid="{2EC09857-B645-4D0B-8CD9-04E57B9370E5}">
                                                XBMC2.TakeScreenshot()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ReloadSkin" XML_Guid="{81A811FE-613B-475F-920E-2CA4F8E6E5A1}">
                                            <Action XML_Guid="{23062792-2AC1-4BBC-AFB1-E17F160C877B}">
                                                XBMC2.ReloadSkin()
                                            </Action>
                                        </Macro>
                                        <Macro Name="UnloadSkin" XML_Guid="{C0B27A1F-7D84-4C8C-BE8D-AB4F67DF5905}">
                                            <Action XML_Guid="{76C588BC-A068-4852-96AC-823C350FFAEE}">
                                                XBMC2.UnloadSkin()
                                            </Action>
                                        </Macro>
                                        <Macro Name="RefreshRSS" XML_Guid="{AB8E30B4-62E8-44BB-BBAD-8ACCCBC178EA}">
                                            <Action XML_Guid="{23F27008-3CC2-4E1C-9E7A-67C79C2688FA}">
                                                XBMC2.RefreshRSS()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Playlist.Clear" XML_Guid="{AA06B973-D7D0-47B3-BF00-B1E42CA9BEBD}">
                                            <Action XML_Guid="{617259E2-DAD6-40D5-9DDB-31C3E28CF7B9}">
                                                XBMC2.Playlist.Clear()
                                            </Action>
                                        </Macro>
                                        <Macro Name="RipCD" XML_Guid="{5EBA6512-3BB8-4C31-9455-5AEA001CC6F1}">
                                            <Action XML_Guid="{247C5379-7AB6-4EC2-86DD-838A7329B77D}">
                                                XBMC2.RipCD()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Skin.ResetSettings" XML_Guid="{2A30AE2A-E047-4930-84F7-383E16A7F770}">
                                            <Action XML_Guid="{0955A2C9-8323-49FE-B81C-23EBB20467A4}">
                                                XBMC2.Skin.ResetSettings()
                                            </Action>
                                        </Macro>
                                        <Macro Name="System.LogOff" XML_Guid="{EA5942E2-E761-46BB-8830-CC84337E87A3}">
                                            <Action XML_Guid="{B1F0070A-CCDC-488E-828B-4825F4ED2745}">
                                                XBMC2.System.LogOff()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Container.Refresh" XML_Guid="{8E67C59A-4AED-46B9-9AD3-D1AB360BCFF2}">
                                            <Action XML_Guid="{23C5C23D-6EDE-4503-B4B7-75B2831F8F8C}">
                                                XBMC2.Container.Refresh()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Container.Update" XML_Guid="{3C04C423-8515-473C-A135-06D111857B5A}">
                                            <Action XML_Guid="{CFAAA695-B1F7-4DC7-9FAB-09A8F9A308B5}">
                                                XBMC2.Container.Update()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Container.NextViewMode" XML_Guid="{15ABE938-E5DC-4F3F-9462-95C82C1287C5}">
                                            <Action XML_Guid="{D0D9736E-D944-4AD2-8ECA-9654A843709E}">
                                                XBMC2.Container.NextViewMode()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Container.PreviousViewMode" XML_Guid="{8920411E-D597-4B62-8BBE-016936EE1EEC}">
                                            <Action XML_Guid="{CE2C0219-713F-4E15-9311-4B84436BA0F1}">
                                                XBMC2.Container.PreviousViewMode()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Container.NextSortMethod" XML_Guid="{B79B5F4D-9817-4BAD-88FF-D264D4027352}">
                                            <Action XML_Guid="{E46C6583-CFB8-47B7-A630-7B4F75D53C9B}">
                                                XBMC2.Container.NextSortMethod()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Container.PreviousSortMethod" XML_Guid="{48C8DE7D-5E9C-4A64-83E0-DB92A39B130F}">
                                            <Action XML_Guid="{E6816E12-6B2F-4668-ABA1-40323C1B5339}">
                                                XBMC2.Container.PreviousSortMethod()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Container.SortDirection" XML_Guid="{2A2CC525-3BEA-48D5-8E5D-AC0C1F9E1750}">
                                            <Action XML_Guid="{F42B207F-3D09-4CB2-A987-935BA53E1BCE}">
                                                XBMC2.Container.SortDirection()
                                            </Action>
                                        </Macro>
                                        <Macro Name="UpdateAddonRepos" XML_Guid="{AEA59E88-983F-45FD-B647-70874F4BF32F}">
                                            <Action XML_Guid="{080C2C27-BAF1-4AE2-AF2A-1A8C688A1078}">
                                                XBMC2.UpdateAddonRepos()
                                            </Action>
                                        </Macro>
                                        <Macro Name="UpdateLocalAddons" XML_Guid="{3A009242-C569-4820-9486-5A14415CFEAA}">
                                            <Action XML_Guid="{0C06E848-556B-4EDE-A6F6-D00A9FA8799F}">
                                                XBMC2.UpdateLocalAddons()
                                            </Action>
                                        </Macro>
                                        <Macro Name="ToggleDPMS" XML_Guid="{9F088203-485C-4D60-ADAB-4B4DC6F0071D}">
                                            <Action XML_Guid="{07E9E1F5-DF0C-4769-B452-58E4AF4B6511}">
                                                XBMC2.ToggleDPMS()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Weather.Refresh" XML_Guid="{E9517831-4A2A-49AE-86D7-21B23D548A8A}">
                                            <Action XML_Guid="{7F9C4D1B-215E-4B63-AC46-8FF2087267E3}">
                                                XBMC2.Weather.Refresh()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Weather.LocationNext" XML_Guid="{108BB2EE-BE5C-40CE-B1F0-AC02E9FBA4ED}">
                                            <Action XML_Guid="{8766A6E7-AF0C-4A07-AA62-E933CBE1C9D3}">
                                                XBMC2.Weather.LocationNext()
                                            </Action>
                                        </Macro>
                                        <Macro Name="Weather.LocationPrevious" XML_Guid="{8E84A8E8-31BD-4CA9-82E3-C97FB2D58230}">
                                            <Action XML_Guid="{8EC8ED49-E73C-48E4-98DE-2E15F32964B7}">
                                                XBMC2.Weather.LocationPrevious()
                                            </Action>
                                        </Macro>
                                        <Macro Name="LIRC.Stop" XML_Guid="{110633B0-F777-4781-86D3-FA36EC917C5D}">
                                            <Action XML_Guid="{A8E34F1E-B241-4537-863D-1087232A9087}">
                                                XBMC2.LIRC.Stop()
                                            </Action>
                                        </Macro>
                                        <Macro Name="LIRC.Start" XML_Guid="{94CC1208-273F-46B3-B30B-CC518CBE5EB5}">
                                            <Action XML_Guid="{B99F3A6E-F8F6-4FF4-9535-E4BE742438C3}">
                                                XBMC2.LIRC.Start()
                                            </Action>
                                        </Macro>
                                        <Macro Name="LCD.Suspend" XML_Guid="{CDC4DDF2-8711-4B56-9CF3-0B01735B1CD2}">
                                            <Action XML_Guid="{55FD2EC0-E06F-4700-ABEA-100BF7BBED86}">
                                                XBMC2.LCD.Suspend()
                                            </Action>
                                        </Macro>
                                        <Macro Name="LCD.Resume" XML_Guid="{4FFE0791-8480-4112-A24D-E2D7A7C985DE}">
                                            <Action XML_Guid="{BD4749CD-159F-4B6B-9D75-63117067A73F}">
                                                XBMC2.LCD.Resume()
                                            </Action>
                                        </Macro>
                                    </Folder>
                                </Folder>
                                <Folder Name="Windows" XML_Guid="{63D6354B-66F7-4140-948D-99D8E11BCF1D}">
                                    <Macro Name="Show Movies Screen" XML_Guid="{60622FD7-AEFE-4030-9778-91328074F606}">
                                        <Event Name="AutoRemote.Message.m8.filme" XML_Guid="{8B681332-065E-47CC-AF96-0BA88942B936}" />
                                        <Action XML_Guid="{B5652093-9C1F-42A8-9A70-803B0BAFA1A1}">
                                            XBMC2.MyMovies()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Show TV Shows Screen" XML_Guid="{37D9440C-574A-47C9-AA1D-50E6E95DBF89}">
                                        <Event Name="AutoRemote.Message.m8.serien" XML_Guid="{AB2C2FF5-44FB-4964-BE6A-80B94AA4A6E7}" />
                                        <Action XML_Guid="{0828EC68-D4B4-48AD-823E-7B79ADA199AB}">
                                            XBMC2.MyTVShows()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Show Shutdown Menu" XML_Guid="{992557AB-C040-400F-9072-29CA171760A1}">
                                        <Action XML_Guid="{E86D58A3-7027-458E-85D7-715BDDECF8F1}">
                                            XBMC2.ShutdownMenu()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Home" XML_Guid="{D5424026-9B3A-43C3-8C88-7AE0C844571C}">
                                        <Event Name="MceRemote.Mce.Start" XML_Guid="{37C08BC7-8F5A-4C88-A80D-A11C8FFCF09B}" />
                                        <Event Name="AutoRemote.Message.m8.home" XML_Guid="{23F8ECFD-7B3F-4664-A930-2BDD8BA99A6A}" />
                                        <Action XML_Guid="{E94D717F-9884-4B42-8D5B-ADA3F67114A3}">
                                            XBMC2.Home()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Programs" XML_Guid="{67BC9530-10DC-4CE2-A9DA-88136DAAF70D}">
                                        <Action XML_Guid="{8BA14047-1952-4947-BC0C-9B8BD7AB8E54}">
                                            XBMC2.Programs()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Pictures" XML_Guid="{880395CC-2178-4AF6-83C8-800EA48ED10C}">
                                        <Action XML_Guid="{4BCD2A6F-63A9-43B1-BF4D-D5150803232B}">
                                            XBMC2.Pictures()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Files" XML_Guid="{F8151AEA-33B8-4977-8274-E4E9332853F5}">
                                        <Action XML_Guid="{CCF57F69-8256-483E-9E7E-404846C44375}">
                                            XBMC2.Files()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Settings" XML_Guid="{A309A3D0-CF6A-4070-BE20-45F1E887E582}">
                                        <Action XML_Guid="{506872E9-424C-49D0-BC3E-4BE70F137B9E}">
                                            XBMC2.Settings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Music" XML_Guid="{6F0F500F-9D2F-470E-88C5-72644597CD39}">
                                        <Action XML_Guid="{6B43C875-23AE-4992-9DBD-B0517DCF1F36}">
                                            XBMC2.Music()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Musicfiles" XML_Guid="{57CA2184-0CC4-42DD-B4CC-986931FAA150}">
                                        <Action XML_Guid="{268F7399-9020-44A3-AD8B-018CA3B8CA94}">
                                            XBMC2.Musicfiles()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Musiclibrary" XML_Guid="{679D43DE-12F6-4222-944F-1830FD6FA05C}">
                                        <Action XML_Guid="{F9CA336A-74D7-4DA7-B7D4-7AC00824F92D}">
                                            XBMC2.Musiclibrary()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Musicplaylist" XML_Guid="{C6F2B575-9E5B-47B9-83E5-088531691420}">
                                        <Action XML_Guid="{FDCA7EBB-E2AE-4B8F-9ACF-31C8E102B57B}">
                                            XBMC2.Musicplaylist()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Musicplaylisteditor" XML_Guid="{F9B34C14-299C-4C2D-B5E9-0F7DBD9DECA8}">
                                        <Action XML_Guid="{32281F58-C021-4F38-86BB-F8E6AC0CEB7D}">
                                            XBMC2.Musicplaylisteditor()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Musicinformation" XML_Guid="{D5F3D33C-55E7-4154-930F-33B6584CC6E1}">
                                        <Action XML_Guid="{00303E9D-40A5-40BB-AA95-1143F235D1E8}">
                                            XBMC2.Musicinformation()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Video" XML_Guid="{FC103037-CEF8-47A7-8F1A-B42DC506A475}">
                                        <Action XML_Guid="{4C4C7F0D-0490-4995-AE69-49DB37AC8E0C}">
                                            XBMC2.Video()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Videofiles" XML_Guid="{38B63113-96AC-4B53-877D-2706D66BD51B}">
                                        <Action XML_Guid="{3D2AF2D6-05D2-49B6-BEDF-09C5E29D59F2}">
                                            XBMC2.Videofiles()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Videolibrary" XML_Guid="{F3E35A49-3072-4418-8CE7-D85220CEFE1C}">
                                        <Action XML_Guid="{DA27FF0C-6E45-4FB1-83D1-1B6CE736C677}">
                                            XBMC2.Videolibrary()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Videoplaylist" XML_Guid="{88EC12DD-FAD1-4443-858C-DB114F0F0F13}">
                                        <Action XML_Guid="{6535EBFD-ED51-4FFB-B625-BDC38408AAB7}">
                                            XBMC2.Videoplaylist()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Systeminfo" XML_Guid="{FBF02CAA-DEE7-4DB6-B437-124F1FC9EA99}">
                                        <Action XML_Guid="{0B6B9115-9367-492A-B874-5F6F38A51CDF}">
                                            XBMC2.Systeminfo()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Guicalibration" XML_Guid="{EC996FC3-2E42-4BC0-AD3A-B851AFDA08A5}">
                                        <Action XML_Guid="{4BACCB09-DCAB-4772-BC24-EBE95CC771A3}">
                                            XBMC2.Guicalibration()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Screencalibration" XML_Guid="{EF9DD048-5FDC-4A4F-B64A-F8CFD3943963}">
                                        <Action XML_Guid="{89A3D14A-57A6-44EA-86ED-A0136F561DF3}">
                                            XBMC2.Screencalibration()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Picturessettings" XML_Guid="{856D4AF6-1AB7-4DE7-8E34-DC27A34ADC67}">
                                        <Action XML_Guid="{2A5339B2-6E59-4BE0-8284-3F223FF98728}">
                                            XBMC2.Picturessettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Programssettings" XML_Guid="{DDD83EDF-C52A-49D5-8755-942557206463}">
                                        <Action XML_Guid="{77B9DA23-7380-4CC7-BE90-4E1BCAD35F20}">
                                            XBMC2.Programssettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Weathersettings" XML_Guid="{C35AA1FD-29B4-4592-8F85-70D4BF246C75}">
                                        <Action XML_Guid="{6E4E7671-CC45-4D8D-A92A-B50E5B070A16}">
                                            XBMC2.Weathersettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Musicsettings" XML_Guid="{B2FFB192-842D-4952-86DD-DF9A752458BE}">
                                        <Action XML_Guid="{6FECBB43-187D-47AB-A42C-3549A039D82A}">
                                            XBMC2.Musicsettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Systemsettings" XML_Guid="{90C4FA46-5BD2-4AAD-9FE7-691D0A38B08F}">
                                        <Action XML_Guid="{69CA9A4A-70AA-46B0-B57F-9421C07BC879}">
                                            XBMC2.Systemsettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Videossettings" XML_Guid="{E832C910-D93F-41F9-B445-53ECEEF870D2}">
                                        <Action XML_Guid="{D2737D4D-CF1C-420D-9043-9C22DCB43FA2}">
                                            XBMC2.Videossettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Networksettings" XML_Guid="{63B711B1-4288-4952-BB83-3A818314913E}">
                                        <Action XML_Guid="{DB62BF6A-6CBD-4BFF-A98F-67AA82FAAC6B}">
                                            XBMC2.Networksettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Appearancesettings" XML_Guid="{45E40ECC-B09B-4A98-B87E-5598406F86C6}">
                                        <Action XML_Guid="{635FA625-39FC-4646-8027-96D10A0DEF00}">
                                            XBMC2.Appearancesettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Scripts" XML_Guid="{9EA20E28-2784-4491-9C9E-C0CD9A53D4B6}">
                                        <Action XML_Guid="{2BB58B15-B0A5-4115-866B-E8E3B8FCFAC1}">
                                            XBMC2.Scripts()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Gamesaves" XML_Guid="{F39A253C-0EF8-4FA5-BE6E-55C6D8EB600C}">
                                        <Action XML_Guid="{9731435A-D5DB-4420-87F7-897F3A6C3975}">
                                            XBMC2.Gamesaves()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Profiles" XML_Guid="{33C6A7DC-6555-4990-99FD-6F62828581B0}">
                                        <Action XML_Guid="{5BF610AA-A0B2-4F12-9BE0-D7C6D6746EBD}">
                                            XBMC2.Profiles()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Virtualkeyboard" XML_Guid="{3BAC8BA6-1C92-4DAF-A3F9-C22F3ADC5D78}">
                                        <Action XML_Guid="{9FD4728A-6BFC-4D9D-AFF9-F51DD9B6D3A4}">
                                            XBMC2.Virtualkeyboard()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Volumebar" XML_Guid="{2884CA9E-B741-461D-8514-D4E4FD415EBE}">
                                        <Action XML_Guid="{F09003CC-DC4F-4F80-87B6-F60A1C4E807F}">
                                            XBMC2.Volumebar()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Favourites" XML_Guid="{32D0A872-65AF-44B3-AEAC-4BFE010D034A}">
                                        <Action XML_Guid="{9ECEB427-CEB2-4DBD-BEBE-48C8C9F85120}">
                                            XBMC2.Favourites()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Musicosd" XML_Guid="{BDC72F74-22CC-4C72-B468-DF237E5630A9}">
                                        <Action XML_Guid="{2A9DAED1-1E9D-4E8E-B893-E87F689F7A97}">
                                            XBMC2.Musicosd()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Visualisationsettings" XML_Guid="{3D8C4F14-DFDE-4B1B-A625-8446C3501377}">
                                        <Action XML_Guid="{0EB7556A-7034-4D33-B9FC-C68B30B2A3D4}">
                                            XBMC2.Visualisationsettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Visualisationpresetlist" XML_Guid="{2F2726E7-A0DA-43AF-BB05-F02B56151321}">
                                        <Action XML_Guid="{C0846CBC-735E-40E7-A6BD-069B4E2BEA9C}">
                                            XBMC2.Visualisationpresetlist()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Osdvideosettings" XML_Guid="{FD522921-5396-4D5C-8857-D284EFC3A1C7}">
                                        <Action XML_Guid="{91A0506C-8268-4F08-B7EF-3502DF9A14BB}">
                                            XBMC2.Osdvideosettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Osdaudiosettings" XML_Guid="{B28F67C4-0ED6-4709-991D-57220234F6FA}">
                                        <Action XML_Guid="{EE1843EC-65B2-4A20-A26D-014F3A4AECDD}">
                                            XBMC2.Osdaudiosettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Videobookmarks" XML_Guid="{9EAE0996-57E0-4F37-A082-1443751EFA19}">
                                        <Action XML_Guid="{44AC9E43-4FB0-4721-A21C-99A4C1347912}">
                                            XBMC2.Videobookmarks()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Profilesettings" XML_Guid="{E6F93765-2707-4D87-A9CB-064567E4CCF3}">
                                        <Action XML_Guid="{D33FFCFF-6690-44EA-BC19-85C1C4E3BEDD}">
                                            XBMC2.Profilesettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Locksettings" XML_Guid="{6A9EA82D-45A2-4633-81A2-D70889576F8C}">
                                        <Action XML_Guid="{B790ED88-34D9-4C14-9402-4C45887A3B3C}">
                                            XBMC2.Locksettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Contentsettings" XML_Guid="{E2E1EC53-CD94-4791-B714-EE5F8D2F316D}">
                                        <Action XML_Guid="{5413BA0E-FCC1-452C-BC82-78ED790F349F}">
                                            XBMC2.Contentsettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Networksetup" XML_Guid="{7717EA64-6F24-47FF-A569-AF2C08C0E5F4}">
                                        <Action XML_Guid="{6155EDD3-E89C-4463-B97E-8672008A86F1}">
                                            XBMC2.Networksetup()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Smartplaylisteditor" XML_Guid="{F7DD464E-DC49-44AB-A372-4A2260546F8C}">
                                        <Action XML_Guid="{5A8E4D11-73B7-4530-8E6D-E966E927AA4E}">
                                            XBMC2.Smartplaylisteditor()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Smartplaylistrule" XML_Guid="{7D4D8265-0DC6-45BE-8CF3-4593BB0DE4EE}">
                                        <Action XML_Guid="{D718082F-98C6-40E3-B8F9-6F182BBCA4DD}">
                                            XBMC2.Smartplaylistrule()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Movieinformation" XML_Guid="{024C844E-0180-42BE-A471-5438F40E2186}">
                                        <Action XML_Guid="{3AFE5F08-2802-4BD3-83AB-8E310678BE12}">
                                            XBMC2.Movieinformation()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Scriptsdebuginfo" XML_Guid="{C622E28A-B446-4172-B2A0-7F5A9ED202C5}">
                                        <Action XML_Guid="{8E177B35-F23A-4424-8C88-E49C0DA166DA}">
                                            XBMC2.Scriptsdebuginfo()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Fullscreenvideo" XML_Guid="{F51B43BF-24F8-410F-9F29-62BE2D3E4C66}">
                                        <Action XML_Guid="{836BF13E-22C7-4CC4-9C6F-9164EC8A1C86}">
                                            XBMC2.Fullscreenvideo()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Visualisation" XML_Guid="{B4A5FD87-BD15-4982-9951-C8C17DB33060}">
                                        <Action XML_Guid="{6B1556FB-0075-4968-8A89-3C10A57E03A8}">
                                            XBMC2.Visualisation()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Slideshow" XML_Guid="{932BFA40-2A78-41C3-AAFA-F383A2E8C8E5}">
                                        <Action XML_Guid="{030B4290-5771-4181-B9E3-400637F341FF}">
                                            XBMC2.Slideshow()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Filestackingdialog" XML_Guid="{6A089C58-DED2-4100-91DE-04BE978CEEE1}">
                                        <Action XML_Guid="{975EB6CA-347C-4626-BFB2-F4128AC27C12}">
                                            XBMC2.Filestackingdialog()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Weather" XML_Guid="{761C798C-FABD-4F94-82E8-89515C411D5D}">
                                        <Action XML_Guid="{16A09FF2-4F65-48F2-970F-4405633D466F}">
                                            XBMC2.Weather()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Screensaver" XML_Guid="{4386318F-D33B-40D2-96CC-3C4616E5170D}">
                                        <Action XML_Guid="{699C2EE5-7EF0-4BC1-B973-D7E1CF253307}">
                                            XBMC2.Screensaver()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Videoosd" XML_Guid="{F0A6F588-64C9-4C17-B7FD-D6FE58E3F577}">
                                        <Action XML_Guid="{3FC38B83-A523-4909-BCB3-34A3B0FF08D1}">
                                            XBMC2.Videoosd()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Videomenu" XML_Guid="{78B509CF-489A-4307-A7E5-99F762C35B9E}">
                                        <Action XML_Guid="{5A15D7D3-17E0-4BDB-9524-A3987F059B2F}">
                                            XBMC2.Videomenu()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Filebrowser" XML_Guid="{72F78C36-2E1E-40E4-A478-6C9D61A507F6}">
                                        <Action XML_Guid="{9E5EFE82-5448-427F-970F-F00D4C75BF60}">
                                            XBMC2.Filebrowser()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Startup" XML_Guid="{78684260-F5A5-4242-961F-14416E253A21}">
                                        <Action XML_Guid="{D87045B6-6836-4783-8535-F14DF941D1C5}">
                                            XBMC2.Startup()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Startwindow" XML_Guid="{96FA18B2-3F18-49A3-986A-4EEB99D228AE}">
                                        <Action XML_Guid="{CC0825F9-DCAF-4322-B543-CC3C0EBCC3BC}">
                                            XBMC2.Startwindow()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Loginscreen" XML_Guid="{5D6661A0-F428-4154-AD5B-9FE5DC1F31F7}">
                                        <Action XML_Guid="{375D3DD6-A9F0-44ED-99DE-710AABCC1824}">
                                            XBMC2.Loginscreen()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Musicoverlay" XML_Guid="{5286F416-4913-4073-8F11-9C66FA232184}">
                                        <Action XML_Guid="{C79CDC98-81E9-4209-B60E-5FC1D7EF1F99}">
                                            XBMC2.Musicoverlay()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Videooverlay" XML_Guid="{525A8ADD-C08A-42AC-A055-5F1FB8BF9158}">
                                        <Action XML_Guid="{A68BF7A2-22DE-4DB7-B206-B14AB0699A27}">
                                            XBMC2.Videooverlay()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Pictureinfo" XML_Guid="{6C005AF6-A5B7-4AC3-855F-B1AD15B39B54}">
                                        <Action XML_Guid="{7AD11148-86C9-4605-9F14-01EE9F17DC8D}">
                                            XBMC2.Pictureinfo()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Pluginsettings" XML_Guid="{D7247EE8-36F2-4E1D-87CF-7A47659B7C5C}">
                                        <Action XML_Guid="{4C7955DA-C3CB-4054-872A-383AD1B6036F}">
                                            XBMC2.Pluginsettings()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Fullscreeninfo" XML_Guid="{AB858324-5321-4974-A299-B3C5E2521004}">
                                        <Action XML_Guid="{CE628126-30E1-4E98-993C-E45B9DFB505D}">
                                            XBMC2.Fullscreeninfo()
                                        </Action>
                                    </Macro>
                                    <Macro Name="Player Controls" XML_Guid="{14C668C4-CA35-4ECC-B404-4A3286650717}">
                                        <Action XML_Guid="{14755E68-3557-464D-B89F-F5D61424ECE2}">
                                            XBMC2.PlayerControls()
                                        </Action>
                                    </Macro>
                                </Folder>
                                <Folder Name="Experimental" XML_Guid="{4883E066-7DDB-493B-8E7C-88BA7E6003CB}">
                                    <Macro Name="JSONRPC" XML_Guid="{C16F570F-DFD4-4EBA-A085-CE79FF569F1D}">
                                        <Action XML_Guid="{3AAF99E7-137D-4D6B-85B8-09FFBFD5B09D}">
                                            XBMC2.JSONRPC()
                                        </Action>
                                    </Macro>
                                    <Macro Name="HTTPAPI" XML_Guid="{6504DF1B-B842-41D2-9906-08AF68884FF2}">
                                        <Action XML_Guid="{6A645230-015D-4BC8-A53C-72B9D62C44DC}">
                                            XBMC2.HTTPAPI()
                                        </Action>
                                    </Macro>
                                    <Macro Name="GetCurrentlyPlayingFilename" XML_Guid="{06E3388D-1F02-4F88-B0CC-8D942DB8D1D1}">
                                        <Action XML_Guid="{45FE0B29-5570-4E20-AB89-CBF61FFFC8B3}">
                                            XBMC2.GetCurrentlyPlayingFilename()
                                        </Action>
                                    </Macro>
                                    <Macro Name="SendNotification" XML_Guid="{76801A57-A2A0-45C6-A788-4DB9283CD43B}">
                                        <Action XML_Guid="{0E264961-6048-44F3-9F16-3555CCEB9655}">
                                            XBMC2.SendNotification(u'Hello', u'world')
                                        </Action>
                                    </Macro>
                                </Folder>
                            </Folder>
                            <Folder Name="System Kodi" XML_Guid="{44410E5A-843E-4DCC-947A-B30EDB771739}" Expanded="True">
                                <Folder Name="Automatics Kodi" XML_Guid="{9F798768-3199-4D54-A49C-EAFC2A524984}">
                                    <Macro Name="OnStartkodi (intern)" XML_Guid="{6F3F9A8B-69B9-4B1E-9CBF-D6406387FF42}">
                                        <Event Name="XBMC2.System.OnStart" XML_Guid="{E8743456-5E9A-4607-8FB8-B3306A15AAD1}" />
                                        <Action Name="Check bitstreaming" Enabled="False" XML_Guid="{C7688DBE-439F-49D9-9B18-486BF64A3340}">
                                            EventGhost.PythonScript(u'def checkbiststreamingkodi():\n    import time\n    print "Checking bitstreaming status of kodi"\n    time.sleep(2)\n    if "AVR" in eg.globals.harm_act:\n        print "Bitstreaming should be switched on, triggering..."\n        eg.TriggerEvent("bitstreaming_kodi_on", prefix = "system.audiorouting")\n        #time.sleep(4)\n        #eg.TriggerEvent("bitstreaming_kodi_on", prefix = "system.audiorouting")\n    else:\n        print "Bitstreaming should be off, triggering..."\n        eg.TriggerEvent("bitstreaming_kodi_off", prefix = "system.audiorouting")\neg.scheduler.AddTask(0.0, checkbiststreamingkodi)\n\n\n')
                                        </Action>
                                        <Action Name="Check if active" XML_Guid="{C826A39A-33E5-474E-A12D-B81ED3902355}">
                                            EventGhost.PythonScript(u'#scriptstart\nscriptname = "on_kodi_loaded"\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\nif not eg.globals.XBMC2_System_OnStart_active:\n    print "eg.globals.XBMC2_System_OnStart_active = 0 - skipping macro"\n    eg.StopMacro()\nelse:\n    if debug: print "eg.globals.XBMC2_System_OnStart_active = 1"\ndef XBMC2_System_OnStart_active():\n    import time\n    eg.globals.XBMC2_System_OnStart_active = 0\n    time.sleep(10)\n    eg.globals.XBMC2_System_OnStart_active = 1\n    print "XBMC2_System_OnStart_active reactivated"\neg.scheduler.AddTask(0.0, XBMC2_System_OnStart_active)\neg.globals.startloop_interrupt = 1\neg.globals.manualswitch2kodi_loop_interrupt = 1\neg.TriggerEvent("kodi_audio_set", prefix = "system.appchange")')
                                        </Action>
                                        <Action Enabled="False" XML_Guid="{B5E7E9A5-C13E-4E79-89CE-7599156C1251}">
                                            EventGhost.Wait(0.5)
                                        </Action>
                                        <Action Name="Interrupt startloop" XML_Guid="{2DB13D73-2072-4883-803B-8E40EEBC8DDB}">
                                            EventGhost.PythonScript(u'eg.globals.startloop_interrupt = 1\neg.globals.manualswitch2kodi_loop_interrupt = 1')
                                        </Action>
                                        <Action XML_Guid="{CE875816-C6B2-4178-9147-44B5C2D172CD}">
                                            System.HideImage(u'off')
                                        </Action>
                                        <Action XML_Guid="{CBAA9634-0C12-4515-B4AE-C13AD0CFFDB4}">
                                            EventGhost.NewJumpIf(eg.GUID('{C1381FFD-3A4C-49C2-BFF6-C894E2E6FF1B}'), 2, True)
                                        </Action>
                                        <Action XML_Guid="{9AFF7700-F71B-461C-B624-8A45AED57D2A}">
                                            EventGhost.NewJumpIf(eg.GUID('{8A5136DA-8EA2-4647-A50A-B600CC9E763F}'), 2, True)
                                        </Action>
                                        <Action Enabled="False" XML_Guid="{E04EB8F9-6C40-405C-8B2B-5914A23501BB}">
                                            XBMC2.SendNotification(u'system eg', u'kodi plugin ok')
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnStartPlayingVideo" XML_Guid="{AB818E18-458B-4C56-81DF-F7AB5EF6BBBF}">
                                        <Event Name="XBMC2.Player.OnPlay.episode" XML_Guid="{D7CE7436-7AA4-4231-8E78-C04259B41AE7}" />
                                        <Event Name="XBMC2.Player.OnPlay.movie" XML_Guid="{6B6157AE-85A8-4A37-B5D1-4956E4FF5B2A}" />
                                        <Event Name="XBMC2.Player.OnPlay.video" XML_Guid="{9B65A456-CD0A-46DF-9E92-C5386E876A9B}" />
                                        <Action XML_Guid="{52280FD9-690C-4FB7-9FA7-C869727B50FD}">
                                            EventGhost.ShowOSD(u'', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;TitanSmall', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0, False)
                                        </Action>
                                        <Action XML_Guid="{66E13223-4D28-4C67-BBA6-8DE51FF553B3}">
                                            EventGhost.PythonCommand(u'eg.globals.fullscreen = 1')
                                        </Action>
                                        <Action XML_Guid="{768C9FD3-347E-4560-80F0-0D74D234CFDA}">
                                            EventGhost.EnableExclusive(eg.GUID('{BDD0A64F-0925-4765-944C-60F6DB775CD4}'))
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnStopPlayingVideo" XML_Guid="{50190A11-D98A-4E87-9293-28CC0D8BFBE9}">
                                        <Event Name="XBMC2.Player.OnStop.episode" XML_Guid="{60FF5C28-3A4C-46D7-89BC-CA0EC4C23CFF}" />
                                        <Event Name="XBMC2.Player.OnStop.movie" XML_Guid="{D0DB27CD-A0FC-4D52-B329-56F76C3F0736}" />
                                        <Event Name="XBMC2.Player.OnStop.video" XML_Guid="{EE832AA6-6CF5-47E8-9C4B-7B8558873599}" />
                                        <Action XML_Guid="{31C9AC84-A060-40C7-9E29-3453608DC409}">
                                            EventGhost.DisableItem(eg.GUID('{BDD0A64F-0925-4765-944C-60F6DB775CD4}'))
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnStartPlayingMusic" XML_Guid="{F76AC5A1-0D02-4A39-923A-49E1B874BDF5}">
                                        <Event Name="XBMC2.Player.OnPlay.song" XML_Guid="{8396003C-7E8D-440B-9F09-CF48888172C1}" />
                                        <Action Name="Set eg.globals.playing = 1" XML_Guid="{E1ECE5C6-FD55-4424-890B-0CC7B21AA27B}">
                                            EventGhost.PythonScript(u'eg.globals.playing = 1')
                                        </Action>
                                        <Action XML_Guid="{257E220C-C432-444C-821E-08988B8F7694}">
                                            EventGhost.PythonCommand(u'eg.globals.fullscreen = 0')
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnStopPlayingMusic" XML_Guid="{3D8B7461-7692-4DF6-B1FE-2C96973F1864}">
                                        <Event Name="XBMC2.Player.OnStop.song" XML_Guid="{53292EDD-228A-48DC-ABD4-D6390A3C9A5C}" />
                                    </Macro>
                                    <Macro Name="OnStartPlayingTV" XML_Guid="{A1396153-667A-4ACA-96CF-360A345F861B}">
                                        <Event Name="XBMC2.Player.OnPlay.channel" XML_Guid="{4E35D044-6C98-4621-BC45-940CB052CCAE}" />
                                        <Action Enabled="False" XML_Guid="{CEA12810-DB07-45F1-98C9-C29CCBD6A716}">
                                            EventGhost.NewJumpIf(eg.GUID('{BDEF814F-3511-4A81-AF89-B86953C26C2D}'), 2, True)
                                        </Action>
                                        <Action XML_Guid="{F8877F14-D21E-43E7-ACF4-89A54024729D}">
                                            EventGhost.EnableItem(eg.GUID('{241D4963-9027-40CC-ABC0-71ACFEC37BEA}'))
                                        </Action>
                                        <Action XML_Guid="{9C018234-5E15-4E1F-8844-97E2C047FAC1}">
                                            EventGhost.EnableItem(eg.GUID('{1D7A886B-8EE3-427C-9E02-500721B37650}'))
                                        </Action>
                                        <Action XML_Guid="{6D96D681-0654-4CDC-A58A-56DE3B14F44E}">
                                            EventGhost.DisableItem(eg.GUID('{AEC4863D-EAA6-4B9D-B3A0-1C5C5627FC23}'))
                                        </Action>
                                        <Action XML_Guid="{2E406070-64E5-463E-BFB0-38A89D18E7E5}">
                                            EventGhost.DisableItem(eg.GUID('{E09CA6B8-916E-4BFE-99F9-9FA5461882CD}'))
                                        </Action>
                                        <Action XML_Guid="{9031BFAC-4113-4C8C-B0B7-349ECAAC9DD5}">
                                            EventGhost.DisableItem(eg.GUID('{7518CD4F-55B3-498B-8330-E9E55F8B2FB9}'))
                                        </Action>
                                        <Action Name="Set eg.globals.playing = 1" XML_Guid="{DEAC00C9-4E51-4027-ADD4-C37F70807FB1}">
                                            EventGhost.PythonScript(u'eg.globals.playing = 1')
                                        </Action>
                                        <Action XML_Guid="{15929FA2-4B54-4B72-9099-94E9C924CB66}">
                                            EventGhost.PythonCommand(u'eg.globals.fullscreen = 1')
                                        </Action>
                                        <Action XML_Guid="{83CAACA4-BD25-4170-9083-E74512866D55}">
                                            EventGhost.EnableExclusive(eg.GUID('{444B83B0-5114-4714-8FFF-97CC90FBB17B}'))
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnStopPlayingTV" XML_Guid="{3286A683-69C5-45DF-87AA-BA2E6E12AA42}">
                                        <Event Name="XBMC2.Player.OnStop.channel" XML_Guid="{8ED85733-F099-4283-BD4A-646352DCCC6F}" />
                                        <Action XML_Guid="{96352BDC-7689-4B97-8254-91449C7DB115}">
                                            EventGhost.DisableItem(eg.GUID('{444B83B0-5114-4714-8FFF-97CC90FBB17B}'))
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnStartPlayingAnything" XML_Guid="{BAB8ABE1-DA12-4F58-B369-7806F33E9E02}">
                                        <Event Name="XBMC2.Player.OnPlay.*" XML_Guid="{78065350-B02E-4002-99B1-A1511AEBB070}" />
                                        <Action Name="set eg.globals.playing " XML_Guid="{52BB0035-3AD9-4A23-99DB-72D3287739CA}">
                                            EventGhost.PythonScript(u'#test\n#eg.globals.first_play = 1\n#/test\neg.globals.playing = 1\neg.plugins.FileOperations.Write(2, u\'{eg.globals.playing}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.playing.txt\', 0, 0, True, False, False, \'cp1252\')\nif eg.globals.debug: print "eg.globals.playing: "+str(eg.globals.playing)')
                                        </Action>
                                        <Action XML_Guid="{A582AC09-C152-45C1-BF66-E3AA8C104A76}">
                                            EventGhost.EnableExclusive(eg.GUID('{65A16967-0349-420C-9683-323178037D88}'))
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnPauseAnything" XML_Guid="{DB7BE499-1D5A-4DD4-8990-106EAFE2F093}">
                                        <Event Name="XBMC2.Player.OnPause.*" XML_Guid="{B1540E57-2197-4121-A484-1212F4FF62FA}" />
                                        <Action Name="set eg.globals.playing " XML_Guid="{A81F3E80-40EA-4AC5-B2A6-8B894117C759}">
                                            EventGhost.PythonScript(u'eg.globals.playing = 0\nprint "eg.globals.playing: "+str(eg.globals.playing )')
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnStopPlayingAnything" XML_Guid="{4242435F-10B8-4C60-81C7-D813C7AB2389}">
                                        <Event Name="XBMC2.Player.OnStop.*" XML_Guid="{81ED625E-D416-42DD-AD05-098CA0481B29}" />
                                        <Action Name="set and log vars" XML_Guid="{827FF0EF-263A-4982-943D-8F5A9153DF22}">
                                            EventGhost.PythonScript(u'eg.globals.playing = 0\nprint "eg.globals.playing: "+str(eg.globals.playing )\neg.plugins.FileOperations.Write(2, u\'{eg.globals.playing}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.playing.txt\', 0, 0, True, False, False, \'cp1252\')\neg.globals.fullscreen = 0')
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnEndPlayingAnything" XML_Guid="{5B9EDE59-EB49-42CA-8C17-BCF0431B1A5B}">
                                        <Action Name="set eg.globals.playing " XML_Guid="{AEA050A6-55A8-4462-AC00-40A36415ABA0}">
                                            EventGhost.PythonScript(u'eg.globals.playing = 0\nprint "eg.globals.playing: "+str(eg.globals.playing )\neg.globals.fullscreen = 0')
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnScreensaverActivated" XML_Guid="{7754EB4C-5074-49DC-92C6-968FFBEFD97B}">
                                        <Event Name="XBMC2.GUI.OnScreensaverActivated" XML_Guid="{597CAD21-9A44-4E58-ACD8-605DB6C69912}" />
                                        <Action Name="Set var" XML_Guid="{E3EAAB8B-8F9A-48C3-865D-809A3A316674}">
                                            EventGhost.PythonScript(u'eg.globals.kodi_screensaveractive = 1\n')
                                        </Action>
                                    </Macro>
                                    <Macro Name="OnScreensaverDeactivated" XML_Guid="{CBCF8532-E387-40FF-9534-39ED159D0DAB}">
                                        <Event Name="XBMC2.GUI.OnScreensaverDeactivated" XML_Guid="{8F9D2BAE-3CC1-4824-8184-E7BC284CEAEA}" />
                                        <Action Name="Set var" XML_Guid="{9BC968BA-AD02-4609-85D9-6CEF344E36FC}">
                                            EventGhost.PythonScript(u'eg.globals.kodi_screensaveractive = 0\n')
                                        </Action>
                                    </Macro>
                                </Folder>
                                <Macro Name="Bring Kodi to front" XML_Guid="{C1381FFD-3A4C-49C2-BFF6-C894E2E6FF1B}" Expanded="True">
                                    <Event Name="MceRemote.Mce.Red" XML_Guid="{48C5E89E-FB7C-45F3-B60F-26CB4E019006}" />
                                    <Event Name="system.appchange.kodi2front" XML_Guid="{5D7E631C-898B-4738-BC91-DB6964326471}" />
                                    <Event Name="routing.kodistarted.koditofront" XML_Guid="{FF7EA217-1495-4F53-BFE5-09C9DC961D61}" />
                                    <Action XML_Guid="{9C266D9D-09B7-4F9A-9F22-16DF85102076}">
                                        Window.FindWindow(u'kodi.exe', u'Kodi', u'Kodi', None, None, None, False, 1.0, 0)
                                    </Action>
                                    <Action XML_Guid="{C59D8ACC-C60D-40A5-9652-ACC6CD6F2B5B}">
                                        Window.BringToFront()
                                    </Action>
                                    <Action Enabled="False" XML_Guid="{A26D2026-15B4-4614-BA6B-9B7206211437}">
                                        Window.FindWindow(u'kodi.exe', u'Kodi', None, None, None, None, True, 2.0, 0)
                                    </Action>
                                    <Action Name="After actions" XML_Guid="{D934A445-C21E-425F-ACEB-AC5C82E29C37}">
                                        EventGhost.PythonScript(u'eg.globals.manualswitch2kodi_loop_interrupt = 1\neg.plugins.EventGhost.ShowOSD(u\'\', eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 1.0, False)\neg.plugins.System.HideImage(u\'mp_off\')\neg.plugins.System.HideImage(u\'kodi_start\')\ndef set_var_currentwindow():\n    eg.TriggerEvent("check_currentwindow", prefix = "system.htpcapp")\neg.scheduler.AddTask(2.0, set_var_currentwindow)\n')
                                    </Action>
                                </Macro>
                                <Macro Name="Check plugin" XML_Guid="{11528493-1370-44B7-AD6E-67B4A1585DA5}">
                                    <Event Name="SchedulGhost.CheckXBMCPlugin" XML_Guid="{A518C98D-29A0-4E12-8845-AC2BFE018C16}" />
                                    <Action Name="Check if kodi running" XML_Guid="{2A704DDF-5B66-4074-8CC8-76C14610E271}">
                                        EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\nif not eg.globals.kodi_running:\n    print "kodi is not running - skipping test"\n    eg.StopMacro()')
                                    </Action>
                                    <Action XML_Guid="{36602475-A8A9-42FD-A294-BAB2FDE5559A}">
                                        EventGhost.PythonCommand(u'eg.globals.xbmc2status = 0')
                                    </Action>
                                    <Action XML_Guid="{87A9C37F-CE63-4A31-9BBC-854F6E862DE7}">
                                        XBMC2.JSONRPC(u'Settings.GetSettingValue', u'{"setting": "audiooutput.audiodevice"}', False)
                                    </Action>
                                    <Action Name="Check xbmc2 plugin" XML_Guid="{A5FEB3B1-EA1D-4DA7-BAF7-C878DBADDF2F}">
                                        EventGhost.PythonScript(u'debug = eg.globals.debug\n#debug = 1\nif debug: print str(eg.result)\nif "value" in eg.result:\n    eg.globals.xbmc2status = 1\n    print "Kodi plugin seeems to be fine"\n    if debug: \n        eg.plugins.EventGhost.ShowOSD(u\'    Debug:\\n    Kodi Plugin OK\', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 1.5, eg.globals.osd_skin)\nelse:\n    if debug: print "Something is wrong"\n    eg.plugins.EventGhost.ShowOSD(u\'   Fehler:\\n    kodi plugin    \', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 4.0, eg.globals.osd_skin)')
                                    </Action>
                                </Macro>
                            </Folder>
                        </Folder>
                    </Folder>
                </Folder>
                <Folder Name="App Exit" XML_Guid="{C692C20D-A1D5-4008-A7D0-11A9BDDE31D1}" Expanded="True">
                    <Folder Name="On Exit htpcapps" XML_Guid="{0C91B02D-16EE-43BA-825C-B7321192DF63}">
                        <Macro Name="Any" XML_Guid="{14AF7651-AE5F-4F50-B91A-C5614BD2DE86}">
                            <Action XML_Guid="{37C5E5CD-0FB8-4548-B8D5-ED2168F692CB}">
                                EventGhost.NewJumpIf(eg.GUID('{EDADDBAE-DCA0-4E95-85E6-1CFF11D87DD8}'), 2, True)
                            </Action>
                            <Action Name="Check for other htpcapp running" XML_Guid="{5CB74B1E-6F86-4BD4-B1D3-1277B10C3D51}">
                                EventGhost.PythonScript(u'if "Kodi" in eg.globals.current_frontwindow:\n    eg.TriggerEvent("kodi_settings_activate", prefix = "eg.appactions")\nif "MediaPortal" in eg.globals.current_frontwindow:\n    eg.TriggerEvent("mp_settings_activate", prefix = "eg.appactions")')
                            </Action>
                        </Macro>
                        <Macro Name="On Exit MP" XML_Guid="{D51E0064-098E-4713-BEBA-EC2837231B65}">
                            <Event Name="Process.Destroyed.MediaPortal" XML_Guid="{646C2B73-3257-4F25-9BDC-20B40F1A3E36}" />
                            <Action Name="Set and log vars" XML_Guid="{0E1B9380-3620-4311-A9AD-B74AEE40C250}">
                                EventGhost.PythonScript(u'import time\nscriptname = "on_exit_mp"\n#debug\ndebug = eg.globals.debug\ndebug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\neg.globals.mp_running = 0\neg.globals.mp_loaded = 0\neg.plugins.FileOperations.Write(87, u\'{eg.globals.mp_loaded}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.mp_loaded.txt\', 0, 0, True, False, False, u\'utf_8\')\nif debug: print "eg.globals.mp_loaded is set to: "+str(eg.globals.mp_loaded)')
                            </Action>
                            <Action XML_Guid="{A8DE773F-8C04-4402-AA4B-57D09475EAFB}">
                                EventGhost.NewJumpIf(eg.GUID('{204FE67C-1E2D-406E-96DE-B539CAFBD8F8}'), 2, True)
                            </Action>
                            <Action XML_Guid="{52C4362C-6DDE-4F58-A901-AD14D11BBE41}">
                                Window.FindWindow(u'dw20.exe', u'MediaPortal', u'#32770', None, None, None, False, 0.0, 0)
                            </Action>
                            <Action XML_Guid="{ADD3BB8C-B562-4805-8E6B-658E52C30849}">
                                Window.BringToFront()
                            </Action>
                            <Action XML_Guid="{C12D0B85-A150-49F8-99D2-E7647C8F7F5F}">
                                Window.Close()
                            </Action>
                            <Action XML_Guid="{8E34F354-6DA2-41F0-B1C7-2A27AC4C34B1}">
                                EventGhost.ShowOSD()
                            </Action>
                        </Macro>
                        <Macro Name="On Exit kodi" XML_Guid="{531DF314-F3C8-42E4-8628-77A17BCB78ED}">
                            <Event Name="Process.Destroyed.kodi" XML_Guid="{7E632595-F542-4AFD-B621-12F3B37F285D}" />
                            <Event Name="Task.Destroyed.Kodi" XML_Guid="{72D1D43D-B009-4022-B439-D2382D04F8FC}" />
                            <Action Name="Set and log vars" Enabled="False" XML_Guid="{ED577D6D-9BE8-477D-9FAB-C02393D5B2E0}">
                                EventGhost.PythonScript(u'import time\nkilled_app = (eg.event.string.split(".", 3)[2]).lower()\ntime.sleep(2)\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\nif eg.globals.kodi_running:\n    eg.globals.htpcapp = "kodi"\nelif eg.globals.mp_running:\n    eg.globals.htpcapp = "mp"\nelse:\n    eg.globals.htpcapp = "OFF"\nprint "eg.globals.htpcapp: "+eg.globals.htpcapp\neg.globals.htpcapp_last = killed_app\nprint "eg.globals.htpcapp_last: "+eg.globals.htpcapp_last\nif not eg.globals.htpcapp_last == "OFF":\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.htpcapp_last}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.htpcapp_last.txt\', 0, 0, True, False, False, \'cp1252\')')
                            </Action>
                            <Action Name="Set vars" XML_Guid="{8B7062F1-0746-463B-9FCC-DEA7FDC06C56}">
                                EventGhost.PythonScript(u'eg.globals.kodi_running = 0')
                            </Action>
                            <Action XML_Guid="{884424F5-EF37-4B56-8E93-3CFD7642BE6E}">
                                StandbyControl.EnableStandbyByApplication(u'kodi', True, 0, 60, 0, 600)
                            </Action>
                            <Action XML_Guid="{4A91EC9C-3149-4F93-AA39-5853A6C6ACB4}">
                                Window.FindWindow(u'dw20.exe', u'MediaPortal', u'#32770', None, None, None, False, 0.0, 0)
                            </Action>
                            <Action XML_Guid="{B6595623-0992-4E7B-8FFB-A1B7564C249F}">
                                Window.BringToFront()
                            </Action>
                            <Action XML_Guid="{D6830039-8CA1-4602-A0EC-DF738CD215A5}">
                                Window.Close()
                            </Action>
                            <Action XML_Guid="{295C0CDB-4619-46E7-AC33-B76EC20C216D}">
                                EventGhost.ShowOSD()
                            </Action>
                        </Macro>
                    </Folder>
                    <Folder Name="Failsave" XML_Guid="{37665AC3-293C-4FBC-9430-AF450A48256C}">
                        <Macro Name="Kill Kodi" Enabled="False" XML_Guid="{66248A93-67B7-4F1F-9E20-23ED89D09443}" Expanded="True">
                            <Event Name="SchedulGhost.EggTimerKillKodi" XML_Guid="{DAD593CF-A5E2-4D3B-982D-CC806FC45312}" />
                            <Action Name="Check if running" XML_Guid="{88EB24B7-4FCA-4F60-8D66-7D3C103A2496}">
                                EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\nif not eg.globals.kodi_running:\n    eg.StopMacro()\nelse:\n    pass')
                            </Action>
                            <Action XML_Guid="{BB6D1E2B-6B9C-484E-BC60-B33F763789E4}">
                                System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\Pskill\\pskill_kodi.bat', u'', 3, False, 3, u'', False, False, u'', False, False, False)
                            </Action>
                        </Macro>
                        <Macro Name="Kill MP" Enabled="False" XML_Guid="{4DA044C2-460B-4277-B9B9-40EC45824772}" Expanded="True">
                            <Event Name="SchedulGhost.EggTimerKillMP" XML_Guid="{124EC57F-45AD-470D-9B5D-03E89D42B7AB}" />
                            <Action Name="Check if running" XML_Guid="{E3D78DB1-1099-4B18-99F4-3C18401BC2A2}">
                                EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\nif not eg.globals.mp_running:\n    eg.StopMacro()\nelse:\n    pass')
                            </Action>
                            <Action XML_Guid="{F1723AE1-3ACD-43A4-A188-368C70DA03F4}">
                                System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\Pskill\\pskill_mediaportal.bat', u'', 3, False, 3, u'', False, False, u'', False, False, False)
                            </Action>
                        </Macro>
                    </Folder>
                </Folder>
            </Folder>
            <Folder Name="Exit HTPC" XML_Guid="{B8180552-F033-4BC8-8DD7-E51599B6C873}">
                <Folder Name="OFF Action" XML_Guid="{371C5200-2251-4C37-8A27-2869CAF438CF}" Expanded="True">
                    <Macro Name="PreOff" XML_Guid="{129CE6C5-0314-4F19-932C-89848B0B2D9E}">
                        <Event Name="MceRemote.Mce.Teletext" XML_Guid="{39B647B0-2F8C-444C-BD44-5E37D55657CD}" />
                        <Action Name="preend loop" XML_Guid="{87C33502-8BE7-487B-88CB-36DF046BB3E3}">
                            EventGhost.PythonScript(u'import time\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\n#\neg.globals.harm_act_recent_trigger = "OFF"\neg.globals.preendloop_interrupt = 0\neg.globals.preendtext = \'B E E N D E N / R O U T I N G\'\neg.plugins.System.DisplayImage(eg.globals.def_bg, 3, 1, False, False, 0, True, 4, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'preoff\')\neg.plugins.EventGhost.ShowOSD(u\'{eg.globals.preendtext}\', eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 3.0, eg.globals.osd_skin)\nif eg.globals.kodi_running or eg.globals.mp_running:\n    eg.plugins.System.PlaySound(u\'D:\\\\Programmdaten\\\\Eventghost\\\\sounds\\\\point1sec.mp3\', 0, False)\n    time.sleep(.100)\n    eg.plugins.System.PlaySound(u\'C:\\\\Windows\\\\Media\\\\Windows Shutdown.wav\', 1, False)\n    if eg.globals.htpcapp == "kodi":\n        eg.plugins.XBMC2.RemoteStop()\n        time.sleep(.300)\n    elif eg.globals.htpcapp == "mp":\n        eg.plugins.MediaPortal.Stop()\n        time.sleep(.300)\ndef preendloop():\n    if not eg.globals.preendloop_interrupt:\n        import time\n        max_outer_loop = 5\n        max_inner_loop = 5\n        #outer loop\n        for y in range (0, max_outer_loop):\n            if not eg.globals.preendloop_interrupt:\n                print "outer preend loop start, run "+str(y+1)\n                #inner loop\n                for x in range(0, max_inner_loop):\n                    print "inner preend loop start, run "+str(x+1)\n                    if not eg.globals.preendloop_interrupt:\n                        eg.plugins.EventGhost.ShowOSD(u\'    {eg.globals.preendtext}\'+(x+1)*"."+(max_inner_loop+1-x)*" "+" ", eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 0.600, eg.globals.osd_skin)\n                        time.sleep(.500)\n                    else:\n                        x = max_inner_loop\n                        #print "inner preendloop interrupt ="+str(eg.globals.preendloop_interrupt)\n                        print "inner preendloop interrupted"\n                #time.sleep(.500)\n            else:\n                y = max_outer_loop\n                #print "outer preendloop interrupt ="+str(eg.globals.preendloop_interrupt)\n                print "outer preendloop interrupted"\n    else:\n        print "def: eg.globals.preendloop_interrupt ="+str(eg.globals.preendloop_interrupt)\n    time.sleep(.500)\n    eg.plugins.System.HideImage(u\'preoff\')\n    print "Image preoff hidden"\neg.scheduler.AddTask(0.0, preendloop)')
                        </Action>
                        <Action XML_Guid="{1B838D48-DB67-4194-B439-122A32FFD22A}">
                            EventGhost.NewJumpIf(eg.GUID('{8A5136DA-8EA2-4647-A50A-B600CC9E763F}'), 2, True)
                        </Action>
                    </Macro>
                    <Macro Name="htpc OFF" XML_Guid="{437742D9-FF01-4792-AE3F-8B0A9AB61EC9}">
                        <Event Name="MceRemote.Mce.LiveTV" XML_Guid="{A5272127-6D2B-448E-995D-54156F9281B1}" />
                        <Event Name="StandbyControl.OSDCountDownFinished" XML_Guid="{AF7E3A76-475F-46E0-9144-87443CE7B8D2}" />
                        <Event Name="StandbyControl.OSDCountDownFinished_onOk" XML_Guid="{2C6F887E-1A2A-4593-ACE4-3A65E76BE198}" />
                        <Action Name="Check off button vs standby for Harmony Action" XML_Guid="{B9306DDF-5D35-454B-9B6C-6519046A8457}">
                            EventGhost.PythonScript(u'import time\nif "StandbyControl" in eg.event.string:\n    eg.result = 1\n    print "Off button triggered by standbycontrol"\nelse:\n    eg.result = 0\n    print "Off button not triggered by standbycontrol / triggered by remote"')
                        </Action>
                        <Action XML_Guid="{5082F625-76D0-4629-900A-299F6B869A32}">
                            EventGhost.NewJumpIf(eg.GUID('{8829550C-1711-4B37-B9B9-DA9E69062D19}'), 0, True)
                        </Action>
                        <Action XML_Guid="{741ED3B2-18DB-4FE1-8B1E-D843FD71F9C2}">
                            StandbyControl.CancelOSDCountDown()
                        </Action>
                        <Action XML_Guid="{221B1F6A-F0F9-46D1-B31D-59F7B53C8F25}">
                            System.SetSystemIdleTimer(True)
                        </Action>
                        <Action XML_Guid="{914B8D39-4D73-4D19-BC02-1C52048BB604}">
                            EventGhost.DisableItem(eg.GUID('{371C5200-2251-4C37-8A27-2869CAF438CF}'))
                        </Action>
                        <Action XML_Guid="{8FCCBCEB-ECDB-45C8-8005-9285C02EB11E}">
                            EventGhost.EnableExclusive(eg.GUID('{AF865C51-9B88-42F4-A3A9-720C42DE7FBC}'))
                        </Action>
                        <Action Name="htpcapp endactions" XML_Guid="{E8990C2B-391C-4D80-8297-19A232B55986}">
                            EventGhost.PythonScript(u'#scriptstart\nscriptname = \'htpcoff_htpcapp_endactions\'\neg.globals.scriptname = scriptname\n#test#\n#\\test#\n#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#/debug\nimport time\nfrom win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\n#\nif eg.globals.kodi_running:\n    if eg.globals.htpcapp == "kodi":\n        eg.plugins.XBMC2.RemoteStop()\n        if eg.globals.htpcapp_singlemode:\n            eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Scripts\\\\mmhtpc\\\\Pskill\\\\pskill_kodi.bat\', u\'\', 3, False, 3, u\'\', False, False, u\'\', False, False, False)\n        time.sleep(1)\n    eg.plugins.XBMC2.RemoteStart()\nif eg.globals.mp_running:\n    if eg.globals.htpcapp == "mp":\n        eg.plugins.MediaPortal.Stop()\n        time.sleep(1)\n        eg.plugins.MediaPortal.LiveTV()\n    #if eg.globals.htpcapp_singlemode:\n    eg.plugins.MediaPortal.Oem8()\n    def killmp():\n        eg.TriggerEvent("killmp", prefix = str(eg.globals.scriptname))\n        if debug: print "Killing mp"\n    eg.scheduler.AddTask(5.0, killmp)\nif not eg.globals.kodi_running and not eg.globals.mp_running:\n    if debug: print "no avrapp was running"\nif not eg.globals.htpcapp == "OFF":\n    print "logging last htpcapp:"\n    eg.globals.htpcapp_last = eg.globals.htpcapp\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.htpcapp_last}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.htpcapp_last.txt\', 0, 0, True, False, False, \'cp1252\')\neg.globals.playing = 0\neg.globals.player_status = "Stopped"\neg.plugins.FileOperations.Write(2, u\'{eg.globals.playing}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.playing.txt\', 0, 0, True, False, False, \'cp1252\')\neg.plugins.FileOperations.Write(2, u\'{eg.globals.player_status}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.player_status.txt\', 0, 0, True, False, False, \'cp1252\')\neg.globals.htpcapp = "OFF"\nif debug:\n    print "eg.globals.playing: "+str(eg.globals.playing)\n    print "eg.globals.player_status: "+str(eg.globals.player_status)\nif debug:\n    from datetime import datetime\n    print "Script ended: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])')
                        </Action>
                        <Action Name="Beenden loop" XML_Guid="{9F853A7D-10E0-4FC5-A1F8-19F7632495AA}">
                            EventGhost.PythonScript(u'import time\neg.globals.preendloop_interrupt = 1\neg.globals.endloop_interrupt = 0\neg.plugins.System.DisplayImage(eg.globals.def_bg, 3, 1, False, False, 0, True, 4, 10, 0, 0, 0, 640, 360, (0, 0, 0), False, True, True, u\'off\')\neg.plugins.System.HideImage(u\'preoff\')\ndef endloop():\n    if not eg.globals.endloop_interrupt:\n        import time\n        max_outer_loop = 5\n        max_inner_loop = 5\n        print \'Running loop with max_outer_loop:max_inner_loop: \'+str(max_outer_loop)+\':\'+str(max_inner_loop)\n        for y in range (max_outer_loop):\n            if not eg.globals.endloop_interrupt:\n                print "outer endloop, run "+str(y+1)\n                for x in range(max_inner_loop):\n                    print "inner endloop, run "+str(x+1)\n                    if not eg.globals.endloop_interrupt:\n                        eg.plugins.EventGhost.ShowOSD(u\'    Beenden\'+(x+1)*"."+(max_inner_loop+1-x)*" "+" ", eg.globals.osd_font_string, eg.globals.osd_font_color, None, eg.globals.osd_pos, (eg.globals.osd_x, eg.globals.osd_y), 0, 0.600, eg.globals.osd_skin)\n                        time.sleep(.500)\n                #time.sleep(.500)\n        time.sleep(.500)\n        eg.plugins.System.HideImage(u\'off\')\n        print "Image off hidden"\neg.scheduler.AddTask(0.0, endloop)')
                        </Action>
                        <Action Name="htpcsys endactions" XML_Guid="{0FCC41D0-50C0-489C-81DD-15E3B2867DAB}">
                            EventGhost.PythonScript(u'scriptname = "htpcsys_endactions"\nfrom datetime import datetime\nprint "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\neg.globals.standbytriggered = 0\neg.globals.harm_act_last = eg.globals.harm_act\neg.plugins.FileOperations.Write(2, u\'{eg.globals.harm_act_last}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.harm_act_last.txt\', 0, 0, True, False, False, \'cp1252\')\neg.globals.harm_act = "OFF"\neg.globals.harm_act_recent_trigger = "OFF"\neg.globals.amp_volume = 25\neg.globals.firststandbyafterresume = 1\n#headset / end audio settings\neg.globals.headset_connected = 0\neg.globals.headset_active = 0\neg.plugins.FileOperations.Write(2, u\'{eg.globals.headset_connected}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.headset_connected.txt\', 0, 0, True, False, False, \'cp1252\')\neg.plugins.FileOperations.Write(2, u\'{eg.globals.headset_active}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.headset_active.txt\', 0, 0, True, False, False, \'cp1252\')\neg.plugins.Window.SendKeys(u\'{Shift+Ctrl+Alt+O}\', False, 2)\n#\n#trigger delayed action\ndef StalledOFFAction():\n    import time\n    time.sleep(45)\n    eg.TriggerEvent("StalledOFFAction", prefix = "htpcOFF.sc_htpcsys_endactions")\neg.scheduler.AddTask(0.0, StalledOFFAction)\n#\n#scriptend\nprint "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])')
                        </Action>
                        <Action XML_Guid="{77389D9F-A121-4714-8DE4-A0CF20739E3A}">
                            EventGhost.PythonCommand(u"eg.plugins.SSH.RemoveHost(u'mmrp01')")
                        </Action>
                        <Action XML_Guid="{405BB5D3-4EEC-4CE8-9EDD-09CF197A0925}">
                            EventGhost.DisableItem(eg.GUID('{A434218E-D2D5-44A8-AD9B-6A50C8B7EDC9}'))
                        </Action>
                        <Action XML_Guid="{D7C69745-C965-40DC-9535-EBC7BA944147}">
                            EventGhost.NewJumpIf(eg.GUID('{102CE50C-E439-415B-8C62-62FA24A42C02}'), 2, True)
                        </Action>
                        <Action Name="vpn running?" XML_Guid="{5662852B-4259-4EA7-ABA5-D17142B44967}">
                            EventGhost.PythonScript(u'if eg.globals.ovpn_running:\n    eg.result = 1\nelse:\n    eg.result = 0')
                        </Action>
                        <Action XML_Guid="{17385553-BF32-42E4-A5BF-1978F3875BF3}">
                            EventGhost.NewJumpIf(eg.GUID('{29532503-B754-48BD-9898-D4B248D5B6AE}'), 0, True)
                        </Action>
                        <Action XML_Guid="{47DE3661-7804-4A1A-91B9-BFBD583618FB}">
                            EventGhost.NewJumpIf(eg.GUID('{5AC2DECD-23E0-473E-AB82-3502A4FBD225}'), 2, True)
                        </Action>
                        <Action Enabled="False" XML_Guid="{2DE4F6BF-21BE-4B56-AD86-992430625B35}">
                            EventGhost.DisableItem(eg.GUID('{A8DD9848-E8D2-461D-BEDC-9035188CE921}'))
                        </Action>
                        <Action Enabled="False" XML_Guid="{E7BDA508-F5CD-405B-BA89-8A50CDE94575}">
                            EventGhost.DisableItem(eg.GUID('{CAD15444-BB3F-4794-B24B-8DB380AF852C}'))
                        </Action>
                        <Action XML_Guid="{36C546F7-90B4-49E3-BD0E-A30C748E62A2}">
                            EventGhost.EnableItem(eg.GUID('{95F161BB-A910-44F6-97F6-E223CF800070}'))
                        </Action>
                    </Macro>
                </Folder>
                <Macro Name="htpc OFF Delayed Action" XML_Guid="{95F161BB-A910-44F6-97F6-E223CF800070}" Expanded="True">
                    <Event Name="htpcOFF.sc_htpcsys_endactions.StalledOFFAction" XML_Guid="{BF3B663F-38BB-468A-A3C7-B99BC97A0F24}" />
                    <Action XML_Guid="{760FB9AC-56F3-4494-A016-A68E40F66E1D}">
                        EventGhost.EnableItem(eg.GUID('{371C5200-2251-4C37-8A27-2869CAF438CF}'))
                    </Action>
                    <Action XML_Guid="{14A14E90-D2E6-4B2A-AE1E-7FDCEF5EF548}">
                        EventGhost.NewJumpIf(eg.GUID('{06BE9695-4473-4A45-B4E5-A2356EA04FD8}'), 2, True)
                    </Action>
                    <Action XML_Guid="{7E4CDF71-3708-4128-8676-014C11ECD0F9}">
                        System.SetSystemIdleTimer(True)
                    </Action>
                </Macro>
                <Folder Name="On System.suspend" XML_Guid="{6B24596A-926C-48BB-89C9-44D8ACA7F34A}" Expanded="True">
                    <Macro Name="On System.suspend" XML_Guid="{C30E7D4D-488F-405A-84F7-7840E24E3D79}">
                        <Event Name="System.Suspend" XML_Guid="{C3541184-29B4-4756-A912-9CB2287D15F4}" />
                        <Action Name="Kill hptcapps" XML_Guid="{C40B3438-BCB3-4960-BDA5-034E818501CC}">
                            EventGhost.PythonScript(u'scriptname = "Kill_htpcapps"\n#debug\ndebug = eg.globals.debug\n#debug = 1\n#/debug\nif eg.globals.htpcapp_singlemode:\n    from win32com.client import GetObject\n    WMI = GetObject(\'winmgmts:\')\n    eg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\n    eg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\n    if eg.globals.kodi_running:\n        eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Scripts\\\\mmhtpc\\\\Pskill\\\\pskill_kodi.bat\', u\'\', 3, False, 3, u\'\', False, False, u\'\', False, False, False)\n        if debug: print "kodi killed"\n    if eg.globals.mp_running:\n        eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Scripts\\\\mmhtpc\\\\Pskill\\\\pskill_mediaportal.bat\', u\'\', 3, False, 3, u\'\', False, False)\n        if debug: print "mp killed"\n    if not eg.globals.kodi_running or eg.globals.mp_running:\n        if debug: print "No htpcapp had to be killed"\n    eg.globals.htpcapp = "OFF"\nelse:\n    if debug: print "htpcapp_singlemode not true - skipping script "+str(scriptname)')
                        </Action>
                        <Action Name="Reset Headset" XML_Guid="{6C74FCE5-4CCD-4795-95DF-3D94C377CC53}">
                            EventGhost.PythonScript(u'eg.globals.headset_connected = 0\neg.globals.headset_active = 0')
                        </Action>
                        <Action XML_Guid="{1B982E8F-5DC4-4B16-BE3A-A3425DE0CA87}">
                            EventGhost.EnableItem(eg.GUID('{C8429847-2B16-4A88-88D7-63A52090459F}'))
                        </Action>
                        <Action XML_Guid="{CF4DC07A-61AD-4016-A74D-66F429911FB2}">
                            EventGhost.EnableItem(eg.GUID('{82FEB88F-A298-4362-B6FB-7886C994905D}'))
                        </Action>
                        <Action XML_Guid="{80B03389-9220-4F82-92E6-08DD9196DF7E}">
                            EventGhost.DisableItem(eg.GUID('{371C5200-2251-4C37-8A27-2869CAF438CF}'))
                        </Action>
                        <Action XML_Guid="{D42BAAA4-1D9B-4865-AA68-5D87841C16F9}">
                            EventGhost.DisableItem(eg.GUID('{A434218E-D2D5-44A8-AD9B-6A50C8B7EDC9}'))
                        </Action>
                        <Action XML_Guid="{B9CDDB84-2F80-4BB4-886A-53E0FF38A3A1}">
                            System.HideImage(u'*')
                        </Action>
                        <Action XML_Guid="{440FA8A7-EF3B-4BB1-9813-AB9975582991}">
                            EventGhost.FlushEvents()
                        </Action>
                    </Macro>
                </Folder>
            </Folder>
        </Folder>
        <Folder Name="Remote Systems" XML_Guid="{56B5CAB4-082A-40FF-AD5A-B3E4064D8462}" Expanded="True">
            <Folder Name="mmigwhs2011" XML_Guid="{49F69AAE-E7FE-4EB7-A105-9A90CBE1B3E5}">
                <Macro Name="Wake mmigwhs2011" XML_Guid="{92ED4603-56D3-46BC-9A57-63935FB50D18}">
                    <Action XML_Guid="{D1561300-8A10-4D52-BA36-D94BBA8555E9}">
                        System.WakeOnLan(u'00-26-2D-0F-0E-65')
                    </Action>
                </Macro>
                <Folder Name="Get server status" XML_Guid="{05DB680C-C0FE-4376-B398-CE87868E5068}">
                    <Macro Name="Check server status" XML_Guid="{6078852A-D5F4-45D1-BC20-1025F381BA49}">
                        <Action XML_Guid="{7D6808AC-5A0E-49D8-9AC3-D774A5E448A5}">
                            System.Execute(u'D:\\Programmdaten\\Lightsout\\Scripts\\check_status.bat', u'', 3, False, 2, u'', False, False, u'', False, False, False, False)
                        </Action>
                        <Action XML_Guid="{F601E610-D52A-4AC7-974F-2C86148432EF}">
                            EventGhost.ShowOSD()
                        </Action>
                    </Macro>
                    <Folder Name="Results" XML_Guid="{2B38BF60-F338-4C3B-98B3-A4F5CA060C55}">
                        <Macro Name="0 inactive" XML_Guid="{9AA7D93D-CBE4-48E8-8B64-1109C79323AD}">
                            <Event Name="TCP.mmhtpc.lo.inactive" XML_Guid="{5FB81EBC-77A0-40D5-8F90-BE980C15FAB7}" />
                            <Event Name="TCP.mmigwhs2011.sleep" XML_Guid="{4432B910-6750-4899-A90C-013A69E84CAB}" />
                            <Event Name="TCP.mmthpcSystem.active" XML_Guid="{29C69886-9D76-45CC-A462-8C19600526CB}" />
                            <Action XML_Guid="{C716208B-EFC8-4E30-AB20-556E61B413EB}">
                                EventGhost.ShowOSD()
                            </Action>
                        </Macro>
                        <Macro Name="1 active" XML_Guid="{87A4FCB2-5FCA-4F02-98B9-750419834FD6}">
                            <Event Name="TCP.mmhtpc.lo.active" XML_Guid="{9040B544-045D-4733-90E3-FC1605A3C5B6}" />
                            <Event Name="TCP.mmigwhs2011.resume" XML_Guid="{25E4EF90-2DBF-4A36-A17A-9FDA0F1515B5}" />
                            <Event Name="TCP.mmthpcSystem.active" XML_Guid="{2D4567F6-ADA9-4793-A49C-FD48AC72B3E7}" />
                            <Action XML_Guid="{D204D19C-5D4A-46EA-A011-8259852ABCEC}">
                                EventGhost.ShowOSD()
                            </Action>
                        </Macro>
                        <Macro Name="2 servicenotrunning" XML_Guid="{ED44A59D-EFA6-4ABB-8435-259296CCCB38}">
                            <Event Name="TCP.mmhtpc.lo.servicenotrunning" XML_Guid="{534DA2D1-4A05-4A71-8AA6-646C0B1FA6A5}" />
                            <Event Name="TCP.mmthpcSystem.ServiceNotRunning" XML_Guid="{283041D6-4F0F-4BED-8AB3-FE0478B509F0}" />
                            <Action XML_Guid="{132FEC7D-F405-41E0-A782-C5D84D2BAF77}">
                                EventGhost.ShowOSD()
                            </Action>
                        </Macro>
                        <Macro Name="3 ParameterError" XML_Guid="{3C6DAEEC-1ED0-47F8-87B7-80093B29015B}">
                            <Event Name="TCP.mmhtpc.lo.ParameterError" XML_Guid="{F48316F3-6FC2-403B-A600-43FFE0862C9E}" />
                            <Event Name="TCP.mmthpcSystem.parametererror" XML_Guid="{12AD8238-A9D7-48D7-A87A-E2668D444BC7}" />
                            <Action XML_Guid="{3394DDA1-DF58-4EDF-9EB4-692758B776BD}">
                                EventGhost.ShowOSD()
                            </Action>
                        </Macro>
                        <Macro Name="4 Timeout" XML_Guid="{F4AC5E5E-903F-4BD3-BB1B-8B43702AAD7F}">
                            <Event Name="TCP.mmhtpc.lo.timeout" XML_Guid="{A7DDE665-DD62-474C-9A8E-56FBD343E650}" />
                            <Event Name="TCP.mmthpcSystem.timeout" XML_Guid="{D5CDE9F6-0202-4908-A4B4-0251CE5341E6}" />
                            <Action XML_Guid="{9F020B7B-EB66-4820-95A1-CFADC2447412}">
                                EventGhost.ShowOSD()
                            </Action>
                        </Macro>
                    </Folder>
                </Folder>
                <Macro Name="Server schlafen schicken" XML_Guid="{31B891C2-98BB-4AF2-AC4F-E501FC535DDE}">
                    <Action XML_Guid="{8662690A-A213-4F42-8B58-DF78F3A6485E}">
                        EventGhost.ShowOSD(u'     Server wird in Standby geschickt    ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), (0, 0, 0), 1, (0, 10), 0, 3.0, u'mp')
                    </Action>
                    <Action Name="Command: Lightsout: Server nicht mehr aktiv halten" XML_Guid="{009E96A7-49A9-4EEB-ACD9-D4B364588ADD}">
                        System.Execute(u'C:\\Program Files\\Windows Server\\Bin\\LightsOutClient.Commandline.exe', u'-d', 3, False, 2, u'C:\\Program Files\\Windows Server\\Bin', False)
                    </Action>
                    <Action XML_Guid="{BC2CAD37-4D1F-4D25-979F-54B4DFFF10E6}">
                        EventGhost.Wait(2.0)
                    </Action>
                    <Action Name="Command: Lightsout: Server standby" XML_Guid="{2534EC39-C4B2-41AA-9D31-6AD02D842A87}">
                        System.Execute(u'C:\\Program Files\\Windows Server\\Bin\\LightsOutClient.Commandline.exe', u'-s', 3, False, 2, u'C:\\Program Files\\Windows Server\\Bin', False)
                    </Action>
                </Macro>
                <Macro Name="Server aktiv halten" XML_Guid="{2D361958-1747-4204-BAA6-887D9DA88461}">
                    <Action XML_Guid="{7B819AAD-1679-4AFD-9486-4FC40002CBD9}">
                        System.Execute(u'D:\\Programmdaten\\Lightsout\\Scripts\\enable_keep_alive.bat', u'', 3, False, 2, u'', False, False, u'', False, False, False, False)
                    </Action>
                </Macro>
                <Macro Name="Server nicht mehr aktiv halten" XML_Guid="{102CE50C-E439-415B-8C62-62FA24A42C02}">
                    <Action XML_Guid="{F4C486E6-6A4D-4D9F-AE98-4168C52C10ED}">
                        System.Execute(u'D:\\Programmdaten\\Lightsout\\Scripts\\disable_keep_alive.bat', u'', 3, False, 2, u'', False, False, u'', False, False, False, False)
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="AVR" XML_Guid="{FDA039E6-4242-4F87-AC58-9FC8C5933835}">
                <Folder Name="AVR Volume" Enabled="False" XML_Guid="{8361FC12-A318-4E38-97EB-D7B41FFCFC17}">
                    <Folder Name="VolumeControl" XML_Guid="{DAB07FF2-69FD-4334-88C5-24E4431D2A43}" Expanded="True">
                        <Macro Name="UpDown" XML_Guid="{244DA7E7-6259-4FCD-9944-ED07C9F1456B}" Expanded="True">
                            <Event Name="MceRemote.Mce.VolumeUp" XML_Guid="{1543F50A-1F72-43DA-A8BA-E84A0F475D90}" />
                            <Event Name="MceRemote.Mce.VolumeDown" XML_Guid="{1F725949-EE02-4725-B29D-4BD72945AA56}" />
                            <Action Name="AVR_Volume_up_down" XML_Guid="{D150F5D5-ED72-4EFB-AF64-E8A4A79EBC17}">
                                EventGhost.PythonScript(u'scriptname = "AVR_Volume_up_down"\neg.globals.scriptname = scriptname\nimport time\n#\n#debug\ndebug = eg.globals.debug\n#debug = 1\nif debug:\n    from datetime import datetime\n    print "Script start: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    #eg.event.string = \'Up\'\n    #eg.event.string = \'Down\'\n    print "!!! --- Debug is active --- !!!"\n    #eg.TriggerEvent (scriptname, prefix="debugging.sc")\n    #eg.globals.harm_act = "HTPC+AVR+TV"\n#/debug\n#delay execution because of previous triggered run\nif not eg.globals.delay_avrvolcontrol == 0.0:\n    time.sleep(eg.globals.delay_avrvolcontrol)\n    if debug: print "Execution is delayed by "+str(eg.globals.delay_avrvolcontrol)+" because of previously triggered run"\nelse:\n    if debug: print "Execution not delayed"\n#set volume\nif debug: print "Volume before is "+str(eg.globals.amp_volume)\neg.globals.amp_volume_old2 = eg.globals.amp_volume_old\neg.globals.amp_volume_old = eg.globals.amp_volume\n#set direction\neg.globals.vol_change_direction_last = eg.globals.vol_change_direction\neg.globals.vol_change_direction = eg.event.string\nif debug: print "Last direction: "+str(eg.globals.vol_change_direction_last)\nif debug: print "Current direction: "+str(eg.globals.vol_change_direction)\n# Check for direction change\nif not (eg.globals.vol_change_direction_last == eg.globals.vol_change_direction):\n    directionchange = 1\n    eg.globals.avr_volume_interrupt = 0\n    if debug: print "Direction change detected"\nelse:\n    directionchange = 0\nif eg.globals.vol_direction_control and directionchange :\n    if debug: print "vol_direction_control = true and direction change detected - skipping script"\n    eg.globals.avr_volume_interrupt = 1\n    eg.StopMacro()\n    eg.Exit()\nelse:\n    if debug: print "vol_direction_control = false or no direction change detected - proceeding with script"\n#delay by delay_avrvolcontrol\nif debug: print "Delaying execution for "+str(eg.globals.delay_avrvolcontrol)+" sec - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\ntime.sleep(eg.globals.delay_avrvolcontrol)\nif debug: print "Proceeding with execution - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n#reseting delay_avrvolcontrol\neg.globals.delay_avrvolcontrol = 0.0\n#set basics\neg.globals.hhdevice = \'14638751\'\neg.globals.hh_commanddelay = .300\neg.globals.preOSD_duration = .250\neg.globals.vol_direction_control = 1\n# Setting direction Up / Down\nif "Up" in eg.globals.vol_change_direction:\n    eg.globals.hhcommand = \'VolumeUp\'\n    eg.globals.vol_range_min = 0\n    eg.globals.vol_range_max = 60\n    eg.globals.schrittweite = 3\n    if eg.globals.amp_volume_old &lt; 20:\n        eg.globals.schrittweite = 1\n    eg.globals.schrittrichtung = 1\nelif "Down" in eg.globals.vol_change_direction:\n    eg.globals.hhcommand = \'VolumeDown\'\n    eg.globals.vol_range_min = 1\n    eg.globals.vol_range_max = 70\n    eg.globals.schrittweite = 3\n    if eg.globals.amp_volume_old &lt; 23:\n        eg.globals.schrittweite = 1\n    eg.globals.schrittrichtung = -1\neg.globals.realschritt = eg.globals.schrittweite*eg.globals.schrittrichtung\neg.globals.schrittdauer = eg.globals.schrittweite*eg.globals.hh_commanddelay\neg.globals.delay_avrvolcontrol = (eg.globals.schrittweite+1)*eg.globals.hh_commanddelay\nif debug:\n    print "Volume change set to: "+str(eg.globals.realschritt)\n    print "eg.globals.schrittdauer set to: "+str(eg.globals.schrittdauer)\n#Actual volume change\ndef Volume_up_down():\n    scriptname = eg.globals.scriptname\n    debug = eg.globals.debug\n    if debug:\n        from datetime import datetime\n        print "Function Volume_up_down start from "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n        print "!!! --- Debug is active --- !!!"\n    #pre osd\n    if "Beamer" in eg.globals.harm_act:\n        eg.globals.show_pre_osd = 0\n        print "Beamer action - skipping pre OSD"\n    if eg.globals.show_pre_osd:\n        eg.TriggerEvent ("show_osd_generic_preOSD", prefix="avr_control.sc_"+scriptname)\n        print "showing pre osd"\n        time.sleep(eg.globals.preOSD_duration)\n    #set new eg.globals.amp_volume\n    if eg.globals.vol_range_min &lt;= eg.globals.amp_volume &lt;= eg.globals.vol_range_max:\n        eg.globals.amp_volume = eg.globals.amp_volume+(eg.globals.schrittrichtung*eg.globals.schrittweite)\n        if debug: print "New Volume is "+str(eg.globals.amp_volume)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    else:\n        if debug: print "Skipping change of eg.globals.amp_volume because vol out of range - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    #show osd generic with calculated amp_volume\n    eg.TriggerEvent ("show_osd_generic", prefix="avr_control.sc_"+scriptname)\n    if debug: print "OSD triggered"+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    # Loop Control Avr\n    if debug: print "Entering control Avr loop - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    for x in range(0, eg.globals.schrittweite):\n        if not eg.globals.avr_volume_interrupt:\n            eg.globals.show_pre_osd = 0\n            if debug: print "amp volume loop start, run "+str(x+1)+", sending volume change to AVR - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n            eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Harmony\\\\HarmonyHubControl.exe\', u\'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}\', 3, False, 5, u\'\', False, False, u\'\', False, False, False, False)\n            if debug: print "Delaying next volume change by "+str(eg.globals.hh_commanddelay)+" sec - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n            time.sleep(eg.globals.hh_commanddelay)\n            eg.globals.delay_avrvolcontrol = eg.globals.delay_avrvolcontrol-eg.globals.hh_commanddelay\n            if debug: print "delay_avrvolcontrol is now: "+str(eg.globals.delay_avrvolcontrol)+" sec - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3]) \n        else:\n            print "Volume-Loop interrupted - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    time.sleep(eg.globals.hh_commanddelay)\n    eg.globals.delay_avrvolcontrol = 0.0\n    if debug: print "delay_avrvolcontrol is now reset to: "+str(eg.globals.delay_avrvolcontrol)+" sec - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n    # Script End\n    if debug: print "Function Volume_up_down end from: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\neg.scheduler.AddTask(0.0, Volume_up_down)\nif debug: print "Function Volume_up_down started in its own task - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\n# Script End\nif debug: print "Script end: "+str(scriptname)+" - "+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])')
                            </Action>
                        </Macro>
                        <Macro Name="Mute" XML_Guid="{16646ED7-D024-47CE-A6B7-7A384D603293}">
                            <Event Name="MceRemote.Mce.Mute" XML_Guid="{E6C430A9-47C9-458B-BDA4-DE6E573D71A3}" />
                            <Action Name="Mute AVR" XML_Guid="{22A3B48A-609B-4FBD-A67D-99F419533A40}">
                                EventGhost.PythonScript(u'def avrmutetoggle():\n    eg.TriggerEvent ("mute_toggle", prefix = "avr.control")\n    eg.globals.hhdevice = \'14638751\'\n    eg.globals.hhcommand = \'Mute\'\n    eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Harmony\\\\HarmonyHubControl.exe\', u\'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}\', 3, False, 5, u\'\', False, False, u\'\', False, False, False, False)\neg.scheduler.AddTask (0.0, avrmutetoggle)')
                            </Action>
                        </Macro>
                    </Folder>
                </Folder>
                <Folder Name="Power" XML_Guid="{95DD4BA3-CFEF-4ABD-89BA-A71EC22A3882}" Expanded="True">
                    <Macro Name="AVR Power on" XML_Guid="{AFF49AFB-87BB-4DE1-B1DA-72BE3FA147F7}">
                        <Event Name="errorhandling.avr.Power" XML_Guid="{2C086442-BEBC-4431-8D1D-8CDE5F963CB6}" />
                        <Action Name="eg.globals.hhdevice = AVR" XML_Guid="{DE1F9E8A-5F48-470A-84B4-2D46E7287247}">
                            EventGhost.PythonCommand(u"eg.globals.hhdevice = '14638751'")
                        </Action>
                        <Action XML_Guid="{2E709D02-BE0E-43D6-9C37-33B83D40ABEF}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'PowerOn'")
                        </Action>
                        <Action XML_Guid="{BE9D2DFE-B709-42BC-B7A2-240C9EB92EDA}">
                            System.Execute(u'D:\\Programmdaten\\01_Zentral\\Harmony\\HarmonyHubControl.exe', u'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}', 3, False, 5, u'', False, False, u'', False, False, False, False)
                        </Action>
                    </Macro>
                    <Macro Name="AVR Power off" XML_Guid="{48001D2B-D212-413D-9997-6ADE9D9D7595}" Expanded="True">
                        <Event Name="errorhandling.avr.PowerOff" XML_Guid="{E761C909-F77E-4853-9316-B5D5782D13B7}" />
                        <Action Name="eg.globals.hhdevice = AVR" XML_Guid="{EC13F875-198E-49B2-818C-5BF76C4B1ED8}">
                            EventGhost.PythonCommand(u"eg.globals.hhdevice = '14638751'")
                        </Action>
                        <Action XML_Guid="{BBB9C9BD-0C75-4EA1-B86F-A9E40266DF65}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'PowerOff'")
                        </Action>
                        <Action XML_Guid="{AF6EE6B8-B7C4-4E3F-827D-5F6123B0B21B}">
                            System.Execute(u'D:\\Programmdaten\\01_Zentral\\Harmony\\HarmonyHubControl.exe', u'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}', 3, False, 5, u'', False, False, u'', False, False, False, False)
                        </Action>
                    </Macro>
                </Folder>
                <Folder Name="DirectAVRControlOSD" XML_Guid="{D407B614-7373-467F-943C-6D15B5F808C8}" Expanded="True">
                    <Macro Name="HandleDirectAVRVolumeControl" XML_Guid="{EBE0BAB2-5FA5-49B2-BFA6-E8175477A064}" Expanded="True">
                        <Event Name="MceRemote.Unknown.*" XML_Guid="{F4BF3268-3A88-4537-AA69-B4DFA58A4955}" />
                        <Action Name="HandleDirectAVRVolumeControl" XML_Guid="{A922E129-7433-4D34-BB14-74287558B2A4}">
                            EventGhost.PythonScript(u'# script to show osd on picked up direct volume change to the avr\nscriptname = "HandleDirectAVRVolumeControl"\nscriptdescription = "script to show osd on picked up direct volume change to the avr"\n#debug\ndebug = eg.globals.debug\n#debug = 1\n#/debug\n#test\n#eg.event.string = "1.2.BFEAA8"\n#/test\nif debug:\n    print "Script: "+scriptname\n#\n#set previous volumes\neg.globals.amp_volume_old2 = eg.globals.amp_volume_old\neg.globals.amp_volume_old = eg.globals.amp_volume\nif debug: print "Volume values old2 &gt; old: "+str(eg.globals.amp_volume_old2)+" &gt; "+str(eg.globals.amp_volume_old)\n#process the string\n#if debug: print eg.event.string\neg.event.string = eg.event.string.split(\'.\', )\neg.event.string = eg.event.string[2]\nif debug: print eg.event.string\n#ommit non volume events\nif debug: print eg.event.string[-2:]\navrstrings = ["A8", "88"]\nif not eg.event.string[-2:] in avrstrings:\n    if debug: print "This is not an AVR event"\n    eg.StopMacro()\n    eg.Exit()\n#set direction of volume change - BFF9FB6BAEBAFABA8\nif debug: print eg.event.string[:4]\nupstrings = ["BFFA", "BFF2"]\ndownstrings = ["BFFB", "BFF3", "BFF9"]\nmutestrings = ["BFEA", "BFE8"]\nif eg.event.string[:4] in upstrings:\n    eg.globals.VolumeChangeDirection = 1\n    eg.globals.VolumeChangeCaption = "VolumeUp"\n    if debug: print "VolumeChange: 1"\nelif eg.event.string[:4] in downstrings:\n    eg.globals.VolumeChangeDirection = -1\n    eg.globals.VolumeChangeCaption = "VolumeDown"\n    if debug: print "VolumeChange: -1"\nelif eg.event.string[:4] in mutestrings:\n    eg.globals.VolumeChangeDirection = 0\n    eg.globals.VolumeChangeCaption = "Mute"\n    if debug: print "Volume muted"\nelse:\n    if debug: print "This is not a volume event"\n    eg.StopMacro()\n    eg.Exit()\n#set new volume value\nif debug: print "eg.globals.volmax = "+str(eg.globals.volmax)\nif eg.globals.volmax &gt;= eg.globals.amp_volume+eg.globals.VolumeChangeDirection &gt;= 0:\n    eg.globals.amp_volume = eg.globals.amp_volume+eg.globals.VolumeChangeDirection\nif debug: print "New AVR Volume: "+str(eg.globals.amp_volume)\n#trigger system volume change for headset connected\nif eg.globals.headset_active:\n    eg.TriggerEvent(str(eg.globals.VolumeChangeCaption), prefix = scriptname)\n#show osd generic with calculated amp_volume\nif not eg.globals.VolumeChangeDirection == 0:\n    eg.TriggerEvent ("show_osd_generic", prefix="avr_control.sc_"+scriptname)\nelif eg.globals.VolumeChangeDirection == 0:\n    eg.TriggerEvent ("show_osd_mute", prefix="avr_control.sc_"+scriptname)')
                        </Action>
                    </Macro>
                </Folder>
                <Folder Name="Inputs" XML_Guid="{F89332ED-394D-46E9-8EA2-A820FC608611}" Expanded="True">
                    <Macro Name="BD DVD" XML_Guid="{48001D2B-D212-413D-9997-6ADE9D9D7595}" Expanded="True">
                        <Event Name="errorhandling.avr.InputBD" XML_Guid="{E761C909-F77E-4853-9316-B5D5782D13B7}" />
                        <Action Name="eg.globals.hhdevice = AVR" XML_Guid="{EC13F875-198E-49B2-818C-5BF76C4B1ED8}">
                            EventGhost.PythonCommand(u"eg.globals.hhdevice = '14638751'")
                        </Action>
                        <Action XML_Guid="{BBB9C9BD-0C75-4EA1-B86F-A9E40266DF65}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'InputDvd\\/Bd'")
                        </Action>
                        <Action XML_Guid="{AF6EE6B8-B7C4-4E3F-827D-5F6123B0B21B}">
                            System.Execute(u'D:\\Programmdaten\\01_Zentral\\Harmony\\HarmonyHubControl.exe', u'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}', 3, False, 5, u'', False, False, u'', False, False, False, False)
                        </Action>
                    </Macro>
                    <Macro Name="Game" XML_Guid="{48001D2B-D212-413D-9997-6ADE9D9D7595}" Expanded="True">
                        <Event Name="errorhandling.avr.Game" XML_Guid="{E761C909-F77E-4853-9316-B5D5782D13B7}" />
                        <Action Name="eg.globals.hhdevice = AVR" XML_Guid="{EC13F875-198E-49B2-818C-5BF76C4B1ED8}">
                            EventGhost.PythonCommand(u"eg.globals.hhdevice = '14638751'")
                        </Action>
                        <Action XML_Guid="{BBB9C9BD-0C75-4EA1-B86F-A9E40266DF65}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'InputGame'")
                        </Action>
                        <Action XML_Guid="{AF6EE6B8-B7C4-4E3F-827D-5F6123B0B21B}">
                            System.Execute(u'D:\\Programmdaten\\01_Zentral\\Harmony\\HarmonyHubControl.exe', u'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}', 3, False, 5, u'', False, False, u'', False, False, False, False)
                        </Action>
                    </Macro>
                </Folder>
            </Folder>
            <Folder Name="avr_power" XML_Guid="{E54CEA2B-99A3-46F8-ABE4-88C2078AE699}">
                <Macro Name="AVR_power Power on/off" XML_Guid="{59A2D7B0-07FF-442A-9AB2-B0A2DFE40E63}" Expanded="True">
                    <Event Name="errorhandling.avr_power.PowerToggle" XML_Guid="{94619C0A-0B0F-4119-8416-25F8D402EC42}" />
                    <Action Name="eg.globals.hhdevice = AVR Power" XML_Guid="{FC5198A2-748C-427F-A3FD-D09D6CCD5EFA}">
                        EventGhost.PythonCommand(u"eg.globals.hhdevice = '24634989'")
                    </Action>
                    <Action XML_Guid="{55B8552D-5265-4F04-A2C7-21BA8EC38318}">
                        EventGhost.PythonCommand(u"eg.globals.hhcommand = 'InputDock'")
                    </Action>
                    <Action XML_Guid="{61F248BC-0E3A-43E3-82BC-D673F35A04DE}">
                        System.Execute(u'D:\\Programmdaten\\01_Zentral\\Harmony\\HarmonyHubControl.exe', u'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}', 3, False, 5, u'', False, False, u'', False, False, False, False)
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="Beamer" XML_Guid="{62E59A49-C482-41DE-95F2-A495B76629BB}">
                <Macro Name="Switch Tageszeit: User1/2" Enabled="False" XML_Guid="{5B0EF7BC-1773-4ED2-B29A-74D7AF436935}">
                    <Event Name="BeamerStartPhase.End" Enabled="False" XML_Guid="{871769C7-90FA-408D-8FCE-9A9F51BFD99B}" />
                    <Action Name="Python Script: Check time" XML_Guid="{D9F85035-0CEA-41FF-BEA8-F0E15BC7FE43}">
                        EventGhost.PythonScript(u'from datetime import datetime, time\nnow = datetime.now()\nnow_time = now.time()\nif now_time &gt;= time(8,30) and now_time &lt;= time(18,30):\n print "Daytime: Going with User2"\n eg.result = 1\nelse:\n print "Nighttime: Going with User1"\n eg.result = 0\nprint eg.result')
                    </Action>
                    <Action XML_Guid="{09152DCA-827B-4E14-BDA0-FCFC88443C09}">
                        EventGhost.JumpIfElse(eg.GUID('{D8D60247-CD7F-4684-AC5E-AD3C5641196E}'), 0, False, eg.GUID('{5C6C7DA7-960B-4272-ACBE-436D2857889C}'), False)
                    </Action>
                </Macro>
                <Macro Name="Switch Usersetting on Beamer start" XML_Guid="{91015ACE-554A-4EE2-81F6-BC5B40C62A1B}">
                    <Event Name="BeamerStartPhase.End" XML_Guid="{E503F6F2-2FF4-482B-8E46-1D926CE7E8BE}" />
                    <Action Name="Check True/False" XML_Guid="{814478EA-DA28-4947-ADEF-FE6DBF13F186}">
                        EventGhost.PythonScript(u'if eg.globals.luminance == "hell":\n\teg.result = 1\nelif eg.globals.luminance == "dunkel":\n\teg.result = 0\nelse:\n    eg.TriggerEvent("script_error", prefix = "EG")\n')
                    </Action>
                    <Action XML_Guid="{51A5DBFE-F2B7-4AF1-8CA6-831F37875B67}">
                        EventGhost.JumpIfElse(eg.GUID('{34956602-6801-44D3-98C9-213B7D641375}'), 0, True, eg.GUID('{39252FFC-62A6-44A1-854E-197E35DAF2C3}'), True)
                    </Action>
                    <Action Enabled="False" XML_Guid="{39EC67B3-0732-486A-9514-8E42EC4078A7}">
                        EventGhost.ShowOSD(u'              Umgebunglicht ist {eg.globals.luminance}.\n  Beamer Preset auf {eg.globals.beamer_preset} gewechselt.  ', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;TitanSmall', (255, 255, 255), None, 6, (0, 100), 0, 3.0, u'mp')
                    </Action>
                </Macro>
                <Macro Name="Check Sunstate/Usersetting periodically" XML_Guid="{39A5B748-6656-4321-9842-A2A11DC2CEA6}" Expanded="True">
                    <Event Name="SchedulGhost.get_sunstate" XML_Guid="{602C693A-51E5-4062-BBEE-29E358B3697C}" />
                    <Action Name="Beamer aktiv?" XML_Guid="{FAB330E4-5F1A-48DF-80B6-25AF7C4BDD62}">
                        EventGhost.PythonScript(u'if "Beamer" in eg.globals.harm_act:\n    eg.result = 1\n    print eg.result\n    print eg.globals.harm_act\nelse:\n    eg.result = 0\n    print "Beamer nicht aktiv - "+eg.globals.harm_act\n    eg.StopMacro()')
                    </Action>
                    <Action Name="Check what to do" XML_Guid="{90DDB6B8-1DFE-4308-A53B-B9AAAF019849}">
                        EventGhost.PythonScript(u'print eg.globals.luminance\nprint eg.globals.luminance_old\nif "Beamer" in eg.globals.harm_act:\n    if not eg.globals.dimension == "3D":\n        if eg.globals.luminance == eg.globals.luminance_old:\n            print "Keine Aenderung beim Umgebungslicht ("+eg.globals.luminance+")"\n            eg.result = 0\n            eg.StopMacro()\n        else:\n            if eg.globals.luminance == "hell":\n                eg.result = 1\n                print "Aenderung beim Umgebungslicht ("+eg.globals.luminance_old+"zu "+eg.globals.luminance+")"\n            if eg.globals.luminance == "dunkel" :\n                eg.result = 0\n                print "Aenderung beim Umgebungslicht ("+eg.globals.luminance_old+"zu "+eg.globals.luminance+")"\n    else:\n        print "Beamer ist in 3D - skip"\n        eg.StopMacro()\nelse:\n\tprint "Beamer ist nicht aktiv - skip"\n\teg.StopMacro()')
                    </Action>
                    <Action XML_Guid="{494F315D-AE8C-43E8-8848-2406C0D4C119}">
                        EventGhost.JumpIfElse(eg.GUID('{34956602-6801-44D3-98C9-213B7D641375}'), 0, True, eg.GUID('{39252FFC-62A6-44A1-854E-197E35DAF2C3}'), True)
                    </Action>
                    <Action XML_Guid="{D34F5E7A-7EC4-4731-BAAD-84940727CE56}">
                        EventGhost.ShowOSD()
                    </Action>
                </Macro>
                <Macro Name="Preset User 1" XML_Guid="{39252FFC-62A6-44A1-854E-197E35DAF2C3}">
                    <Action XML_Guid="{06F97D12-95D7-4941-8137-E1E81D888D86}">
                        EventGhost.PythonCommand("eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command 22977625 User1', u'mmrp01', False, False, False)")
                    </Action>
                </Macro>
                <Macro Name="Preset User 2" XML_Guid="{34956602-6801-44D3-98C9-213B7D641375}">
                    <Action XML_Guid="{E469BD17-7367-4B3B-B40B-BD0F1D06F09C}">
                        EventGhost.PythonCommand("eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command 22977625 User2', u'mmrp01', False, False, False)")
                    </Action>
                </Macro>
                <Macro Name="EcoBlank" XML_Guid="{FD8CCCC5-4DB6-4F04-965A-069FE04BCC81}">
                    <Action XML_Guid="{286745CF-EFB5-4F5F-8B9C-CBB46AB27011}">
                        EventGhost.PythonCommand("eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command 22977625 EcoBlank', u'mmrp01', False, False, False)")
                    </Action>
                </Macro>
                <Macro Name="3D " XML_Guid="{D9977F13-D7A4-435A-A251-EACE71A6B011}">
                    <Action XML_Guid="{BA5BCE2C-94F8-4105-BA6E-22B23021BE75}">
                        EventGhost.PythonCommand("eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command 22977625 3D', u'mmrp01', False, False, False)")
                    </Action>
                    <Action XML_Guid="{3078219C-DD7E-48EE-B618-E1E3C8CBE76F}">
                        EventGhost.PythonCommand("eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command 22977625 OK', u'mmrp01', False, False, False)")
                    </Action>
                    <Action XML_Guid="{62A08FED-9D0A-476E-A9DA-E2F9F9CBFB4F}">
                        EventGhost.PythonCommand("eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command 22977625 DirectionUp', u'mmrp01', False, False, False)")
                    </Action>
                    <Action XML_Guid="{6C343B5C-9CE0-4D77-8718-06D285121659}">
                        EventGhost.PythonCommand("eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command 22977625 OK', u'mmrp01', False, False, False)")
                    </Action>
                </Macro>
                <Folder Name="Old" Enabled="False" XML_Guid="{52AB5CC3-0D02-4218-A055-CF614B93B8D3}">
                    <Macro Name="User1 (dunkel)" XML_Guid="{5C6C7DA7-960B-4272-ACBE-436D2857889C}">
                        <Action Name="User1" XML_Guid="{772EC4A6-5EA3-4EF8-9CFA-8A821105A98F}">
                            System.Execute(u'C:\\Windows\\System32\\wscript.exe', u'"D:\\Programmdaten\\Harmony\\User1\\user1.vbs"', 3, False, 2, u'D:\\Programmdaten\\Harmony\\User1', False, False, u'', False, False, False)
                        </Action>
                    </Macro>
                    <Macro Name="3D_on_old" XML_Guid="{925F3D10-939A-493A-AAEC-13CD98BF2611}">
                        <Action Name='Start Program: "D:\Programmdaten\Eventghost\Scripts\3D\3d.vbs"' Enabled="False" XML_Guid="{C27DC83F-8595-47E8-8EDE-7240573D8291}">
                            System.Execute(u'C:\\Windows\\System32\\wscript.exe', u'"D:\\Programmdaten\\Harmony\\3D\\3d.vbs"', 3, True, 2, u'D:\\Programmdaten\\Harmony\\3D', False, False, u'', False, False, False)
                        </Action>
                        <Action XML_Guid="{36A36D97-2D4A-4D0D-8F58-234E18AC422D}">
                            EventGhost.NewJumpIf(eg.GUID('{7D4B0AC3-8C7D-4B72-905B-4A4E8C866309}'), 2, True)
                        </Action>
                    </Macro>
                    <Macro Name="User2 (hell)" XML_Guid="{D8D60247-CD7F-4684-AC5E-AD3C5641196E}">
                        <Action Name="User2" XML_Guid="{62E990A2-7B49-4EC3-B7E1-6179491B7DFE}">
                            System.Execute(u'C:\\Windows\\System32\\wscript.exe', u'"D:\\Programmdaten\\Harmony\\User2\\user2.vbs"', 3, False, 2, u'D:\\Programmdaten\\Harmony\\User2', False, False, u'', False, False, False)
                        </Action>
                    </Macro>
                </Folder>
            </Folder>
            <Folder Name="mmrp01" XML_Guid="{ACC16B48-59B7-4C61-9036-7DE28C2FDCD7}">
                <Macro Name="SSH: Add Host: mmrp01" XML_Guid="{F6C2D943-43C5-4236-B559-55288F9F58DC}">
                    <Action XML_Guid="{675804DD-3280-47A8-9EAF-B1EAB24692F7}">
                        EventGhost.PythonCommand("eg.plugins.SSH.AddHost(u'mmrp01', 22, u'MYUSERNAME', u'MYPASSW', u'mmrp01', u'Event', True)")
                    </Action>
                </Macro>
                <Macro Name="Process mmrp01 ssh.New_line" XML_Guid="{6F3F352E-B519-4E0B-807D-9F9BA65ADB67}">
                    <Event Name="SSH.New_line.mmrp01" XML_Guid="{3A7F8D52-8267-4ECD-9BB8-4AC21C99C39E}" />
                    <Action Name="Process mmrp01 new line" XML_Guid="{DDA91664-04B7-460C-B6DF-45C577572890}">
                        EventGhost.PythonScript(u'#debug\ndebug = eg.globals.debug\n#/debug\n#test\n#eg.event.payload = "Current Activity ID is"\n#/test\nif "Current Activity ID is" in eg.event.payload:\n    s = eg.event.payload\n    s2 = int(s.split(\':\')[1])\n    eg.globals.harm_act_id = s2\n    if debug: print s2\n    if s2 == -1:\n        eg.globals.harm_act = "OFF"\n        print "No Harmony Action is active"\n    else:\n        s3 = [s3 for s3 in eg.globals.HarmActList if str(s2) in s3][0].split(\' - \')[1]\n        if debug: "s3: "+s3\n        eg.globals.harm_act = s3\n        if debug: print eg.globals.harm_act\n        eg.TriggerEvent(eg.globals.harm_act,prefix="cust_eg",payload=eg.globals.harm_act)\nif "Activities Available via Harmony : " in eg.event.payload:\n    eg.globals.setHarmActListActive = 1')
                    </Action>
                </Macro>
                <Macro Name="Process mmrp01 ssh.Data" XML_Guid="{EEAF3954-6B74-43CF-9A6F-2C4C5EDAEB76}">
                    <Event Name="SSH.Data.mmrp01" XML_Guid="{3DEDB2D9-6957-4103-9268-A46108CC03B6}" />
                    <Action Name="Python Script: Process mmrp01 data" XML_Guid="{71E00F90-E185-4648-8A3F-A4DF7BF200FB}">
                        EventGhost.PythonScript(u'eg.globals.setHarmActListActive = 0')
                    </Action>
                    <Action XML_Guid="{DB3DB0A5-4B9A-4539-9A61-4AFD86602D2A}">
                        EventGhost.DisableItem(eg.GUID('{9D662DE0-8FF8-4F1B-9097-4BBF013173BF}'))
                    </Action>
                </Macro>
                <Folder Name="HarmonyHubControl ssh" XML_Guid="{0589024D-BBF5-4A0C-B8C3-D4D416A67E5B}">
                    <Macro Name="HarmActOFF" XML_Guid="{367EDFD5-FDDE-4BCE-8C9D-6FAF5E2A61F5}">
                        <Action XML_Guid="{894C0B05-FE2E-40EB-8AF6-D24D75736132}">
                            EventGhost.PythonCommand("eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 start_activity -1', u'mmrp01', False, False, True)")
                        </Action>
                        <Action Name="Log Harmony" XML_Guid="{40D00615-B0A3-4F58-A608-4FA42F9DA9F8}">
                            EventGhost.PythonScript(u'eg.globals.harm_act = "OFF"\neg.globals.amp_volume = 25\neg.plugins.FileOperations.Write(2, u\'{eg.globals.harm_act}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.harm_act.txt\', 0, 0, True, False, False, \'cp1252\')')
                        </Action>
                        <Action XML_Guid="{BA7AB4D5-5D80-4BCE-96B4-B040675ACB30}">
                            EventGhost.Wait(1.0)
                        </Action>
                    </Macro>
                    <Macro Name="Get HarmAct-ID" XML_Guid="{18B85CBC-2011-419B-A395-03D000C08363}" Expanded="True">
                        <Event Name="sc_resume.get_harm_act" XML_Guid="{BEAB24F5-40D6-40B9-9C91-EB7E4576E61C}" />
                        <Action XML_Guid="{8DC1EDF8-9893-40E1-B733-EDDCDCAE00A0}">
                            SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 get_current_activity_id', u'mmrp01', False, False, False)
                        </Action>
                        <Action Enabled="False" XML_Guid="{D67FDEC2-71F3-4CB5-A502-BA5F40291B8C}">
                            EventGhost.PythonCommand(u"eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 get_current_activity_id', u'mmrp01', False, False, False)")
                        </Action>
                        <Action Enabled="False" XML_Guid="{0DBAD6B0-D080-4BC5-BD29-8A1D4E38542A}">
                            EventGhost.Wait(1.0)
                        </Action>
                    </Macro>
                    <Folder Name="HarmActList" XML_Guid="{DE72649C-BD6D-4372-B11E-0D1827532C59}" Expanded="True">
                        <Macro Name="Get HarmActList" Enabled="False" XML_Guid="{39D15F44-AD0B-4A40-8BF8-030A34A5C1A0}" Expanded="True">
                            <Action XML_Guid="{D7FC2051-ACEE-4448-9626-5EA0341C33C0}">
                                FileOperations.Write(2, u'', u'D:\\Programmdaten\\Eventghost\\varlogs\\eg.globals.harmony_actions_list.txt', 0, 0, True, False, False, 'cp1252')
                            </Action>
                            <Action XML_Guid="{5A9CB034-56A0-4458-B584-9725D6F6C2E9}">
                                EventGhost.PythonCommand(u"eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 list_activities', u'mmrp01', False, False, False)")
                            </Action>
                            <Action Name="Initiate List" XML_Guid="{A3D26D60-6CAD-412F-BE9F-4B5AA0AF9483}">
                                EventGhost.PythonScript(u"eg.globals.HarmActList = []\nprint ', '.join(eg.globals.HarmActList)\neg.globals.setHarmActListActive = 1\n")
                            </Action>
                            <Action XML_Guid="{3F485D8A-24A3-4929-884A-E37155EB8ECE}">
                                EventGhost.EnableItem(eg.GUID('{9D662DE0-8FF8-4F1B-9097-4BBF013173BF}'))
                            </Action>
                        </Macro>
                        <Macro Name="Set HarmActList" Enabled="False" XML_Guid="{9D662DE0-8FF8-4F1B-9097-4BBF013173BF}" Expanded="True">
                            <Event Name="SSH.New_line.mmrp01" XML_Guid="{F958FCDA-4DE1-4158-A7D7-D3409C69D060}" />
                            <Action Name="AppendItems" XML_Guid="{61694AB7-5FB0-488B-989F-444F050ECDD1}">
                                EventGhost.PythonScript(u'if eg.globals.setHarmActListActive and " - " in eg.event.payload and not "SUCCESS" in eg.event.payload:\n    eg.globals.HarmActList.append(eg.event.payload)\n    #eg.globals.added_action = eg.event.payload\n    eg.plugins.FileOperations.Write(2, u\'{eg.event.payload}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.harmony_actions_list.txt\', 2, 0, True, False, False, \'cp1252\')\nprint  \'\\n\'.join(eg.globals.HarmActList)')
                            </Action>
                        </Macro>
                    </Folder>
                    <Macro Name="HTPC+AVR+Beamer" XML_Guid="{A375EC9A-9D0A-4E98-BFF9-7421E4432FD2}">
                        <Action XML_Guid="{8D571891-6908-427A-8C0F-EEC7F623A743}">
                            EventGhost.PythonCommand("eg.plugins.SSH.RunCommand(u'/home/MYUSERNAME/HarmonyHubControl/HarmonyHubControl michisch@web.de tHXgJZ4g 192.168.111.210 start_activity 11330929', u'mmrp01', False, False, True)")
                        </Action>
                    </Macro>
                </Folder>
                <Macro Name="SSH: Remove Host: mmrp01" XML_Guid="{0F67CA4D-A84F-4355-9C3E-F88AB1F3D809}">
                    <Action XML_Guid="{64A65DF4-400D-49C1-A571-BEE29186501D}">
                        EventGhost.PythonCommand("eg.plugins.ssh.RemoveHost(u'mmrp01')")
                    </Action>
                </Macro>
            </Folder>
            <Folder Name="harmony hub direkt" XML_Guid="{C7253613-D5DA-437E-987A-8ED3F7737722}">
                <Folder Name="Activities" XML_Guid="{51FC3239-1822-4CCB-8BC7-6723027BF289}">
                    <Macro Name=" HTPC+AVR+TV" XML_Guid="{4AAB99B9-0C31-4947-B31F-6853F8A65A76}" Expanded="True">
                        <Action XML_Guid="{1E250CE8-942A-444F-9A3F-E4946624DE8C}">
                            EventGhost.PythonCommand(u"eg.globals.hhactivity = '5974349'")
                        </Action>
                        <Action XML_Guid="{A80A8062-8059-4D70-BF68-E4AEEAC62F3F}">
                            EventGhost.NewJumpIf(eg.GUID('{19F06478-056C-4FE9-AED1-63FA8E64626F}'), 2, False)
                        </Action>
                    </Macro>
                    <Macro Name=" HTPC+AVR+Beamer" XML_Guid="{0595BB57-B895-4FEC-A1BF-51AFB1E8BEA7}">
                        <Action XML_Guid="{55845ECE-3E97-4A95-BC86-8753913354C0}">
                            EventGhost.PythonCommand(u"eg.globals.hhactivity = '11330929'")
                        </Action>
                        <Action XML_Guid="{F09FC964-CD0E-427C-90BE-9B96CD6DC9BB}">
                            EventGhost.NewJumpIf(eg.GUID('{19F06478-056C-4FE9-AED1-63FA8E64626F}'), 2, False)
                        </Action>
                    </Macro>
                    <Macro Name="HTPC+TV" XML_Guid="{E687E214-EC32-4BA2-BE4A-0B605444215E}">
                        <Event Name="audiorouting.sc_on_headphones_check.goto_HTPC+TV" XML_Guid="{0294515E-CDE8-4634-8F8C-A0A7D84C833A}" />
                        <Action XML_Guid="{BAC2F93B-2C64-42A4-84EB-366AA4671F19}">
                            EventGhost.PythonCommand(u"eg.globals.hhactivity = '8157717'")
                        </Action>
                        <Action XML_Guid="{CE9589F3-FC80-485F-9C30-78A7C841399A}">
                            EventGhost.NewJumpIf(eg.GUID('{19F06478-056C-4FE9-AED1-63FA8E64626F}'), 2, False)
                        </Action>
                    </Macro>
                    <Macro Name="Streaming" XML_Guid="{5BD9EB2E-90F6-4680-A9EF-68B2AA067DCC}">
                        <Action XML_Guid="{86D14C97-06C5-4231-B559-B667337B05E7}">
                            EventGhost.PythonCommand(u"eg.globals.hhactivity = '18822826'")
                        </Action>
                        <Action XML_Guid="{DA60F238-84A4-4BF5-B600-00D617553BB9}">
                            EventGhost.NewJumpIf(eg.GUID('{19F06478-056C-4FE9-AED1-63FA8E64626F}'), 2, False)
                        </Action>
                    </Macro>
                    <Macro Name="Harmony Action off" XML_Guid="{8829550C-1711-4B37-B9B9-DA9E69062D19}">
                        <Action XML_Guid="{8CE3A45A-3846-4CFF-A16A-130C4ED58C8F}">
                            EventGhost.PythonCommand(u"eg.globals.hhactivity = '-1'")
                        </Action>
                        <Action XML_Guid="{719A4539-CB0E-4579-9E97-81BDF87568A5}">
                            EventGhost.NewJumpIf(eg.GUID('{19F06478-056C-4FE9-AED1-63FA8E64626F}'), 2, False)
                        </Action>
                    </Macro>
                    <Macro Name="send activity" XML_Guid="{19F06478-056C-4FE9-AED1-63FA8E64626F}">
                        <Action XML_Guid="{C61F7B42-9F67-47B3-BFB6-921A8337D4FD}">
                            System.Execute(u'D:\\Programmdaten\\01_Zentral\\Harmony\\HarmonyHubControl.exe', u'michisch@web.de tHXgJZ4g 192.168.111.210 start_activity {eg.globals.hhactivity}', 3, False, 5, u'', False, False, u'', False, False, False, False)
                        </Action>
                    </Macro>
                </Folder>
                <Folder Name="Beamer" XML_Guid="{D3A2CC41-485A-4FD8-A41C-EBC51A872649}">
                    <Macro Name="3D " XML_Guid="{7D4B0AC3-8C7D-4B72-905B-4A4E8C866309}">
                        <Action Name="eg.globals.hhdevice = Beamer" XML_Guid="{74F36BCB-7A4F-4A72-979B-1CDEECD5E716}">
                            EventGhost.PythonCommand(u"eg.globals.hhdevice = '22977625'")
                        </Action>
                        <Action XML_Guid="{7ADF0502-53EE-457F-8263-E63C8B2C92D2}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = '3D'")
                        </Action>
                        <Action XML_Guid="{C101C99A-C1F3-4051-A7E0-D18FBE7A8A05}">
                            EventGhost.NewJumpIf(eg.GUID('{EB32C79A-D086-493B-A4C6-CE8ED07B9EFB}'), 2, True)
                        </Action>
                        <Action XML_Guid="{2CDEF11F-7C87-4718-A3FD-0D6DBBFD8E46}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'OK'")
                        </Action>
                        <Action XML_Guid="{FC64DEE6-CE2A-495A-9FCA-6791EA9CAB34}">
                            EventGhost.NewJumpIf(eg.GUID('{EB32C79A-D086-493B-A4C6-CE8ED07B9EFB}'), 2, True)
                        </Action>
                        <Action XML_Guid="{7CF9F779-97C8-432A-A1FF-DCD3EFE137C2}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'DirectionUp'")
                        </Action>
                        <Action XML_Guid="{0D2DAAFA-A911-44DC-9684-307C9A5A058A}">
                            EventGhost.NewJumpIf(eg.GUID('{EB32C79A-D086-493B-A4C6-CE8ED07B9EFB}'), 2, True)
                        </Action>
                        <Action XML_Guid="{FAE0BAAE-746F-42C0-8417-0514911B7E9F}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'OK'")
                        </Action>
                        <Action XML_Guid="{BB8D2F57-3EF3-4A14-B9AA-41EAAB84DDBF}">
                            EventGhost.NewJumpIf(eg.GUID('{EB32C79A-D086-493B-A4C6-CE8ED07B9EFB}'), 2, True)
                        </Action>
                    </Macro>
                </Folder>
                <Folder Name="Issue Device Command" XML_Guid="{E0B886F2-BAE2-494C-B626-3E6F96824FFA}" Expanded="True">
                    <Macro Name="Issue Device Command" XML_Guid="{EB32C79A-D086-493B-A4C6-CE8ED07B9EFB}" Expanded="True">
                        <Action XML_Guid="{6AD7EFE3-1249-483F-B6FC-0A9FED2D8F04}">
                            System.Execute(u'D:\\Programmdaten\\01_Zentral\\Harmony\\HarmonyHubControl.exe', u'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}', 3, False, 5, u'D:\\Programmdaten\\01_Zentral\\Harmony', False, False, u'', False, False, False, False)
                        </Action>
                        <Action Enabled="False" XML_Guid="{9465541B-01F8-4327-90F9-78CA62A14991}">
                            EventGhost.Wait(0.2)
                        </Action>
                    </Macro>
                    <Macro Name="Manual Issue" XML_Guid="{9A52BFE6-F59C-4797-B8C4-5E996344E106}" Expanded="True">
                        <Action Name="eg.globals.hhdevice = Beamer" Enabled="False" XML_Guid="{50746267-5DDD-4534-8443-C2C8708A35D6}">
                            EventGhost.PythonCommand(u"eg.globals.hhdevice = '22977625'")
                        </Action>
                        <Action Name="eg.globals.hhdevice = AVR Power" XML_Guid="{A2C3B708-BBE7-4FE4-98B9-7648E9AC7722}">
                            EventGhost.PythonCommand(u"eg.globals.hhdevice = '24634989'")
                        </Action>
                        <Action Name="eg.globals.hhdevice = AVR" XML_Guid="{82A79018-A0B1-450F-AF29-025268E25077}">
                            EventGhost.PythonCommand(u"eg.globals.hhdevice = '14638751'")
                        </Action>
                        <Action Name="eg.globals.hhdevice = MCE" XML_Guid="{46669E56-F2BF-4FB2-96F2-A65D072528CA}">
                            EventGhost.PythonCommand(u"eg.globals.hhdevice = '16086013'")
                        </Action>
                        <Action Enabled="False" XML_Guid="{C8F159C2-AB5E-489E-8013-7A220E83B1E1}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'Pause'")
                        </Action>
                        <Action Enabled="False" XML_Guid="{82AAC96E-5E20-4588-BC86-F73146C07B33}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'Play'")
                        </Action>
                        <Action Name="eg.globals.hhcommand = 'Music' kodi" XML_Guid="{74E6E550-AF76-421B-B9EF-384473E4B359}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'Music'")
                        </Action>
                        <Action Name="eg.globals.hhcommand = 'PowerToggle' MP" XML_Guid="{0A0BBDB4-78F0-41BA-B46B-C64C72B4FDD5}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'PowerToggle'")
                        </Action>
                        <Action XML_Guid="{257C7D86-25EF-404F-885E-168ADA630476}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'VolumeDown'")
                        </Action>
                        <Action Enabled="False" XML_Guid="{51A51C65-70AC-48B8-95C2-739159686FF8}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'PowerOff'")
                        </Action>
                        <Action Enabled="False" XML_Guid="{1F877FA8-8728-4A59-AA66-6121CAFE237F}">
                            EventGhost.PythonCommand(u"eg.globals.hhcommand = 'PowerOn'")
                        </Action>
                        <Action XML_Guid="{C72B2BB2-4DA5-497A-AF5F-A97774E3BB66}">
                            EventGhost.NewJumpIf(eg.GUID('{EB32C79A-D086-493B-A4C6-CE8ED07B9EFB}'), 2, False)
                        </Action>
                    </Macro>
                </Folder>
            </Folder>
            <Folder Name="TV" XML_Guid="{34136F7E-1664-47E8-A131-728E17A230D7}">
                <Macro Name="TV Mute" XML_Guid="{261ECF9F-0D1C-4568-924E-C36A94073CF7}">
                    <Action Name="Mute TV" XML_Guid="{19DFEE78-06D4-4A59-8899-D8D09443DE03}">
                        EventGhost.PythonScript(u'def tvmutetoggle():\n    #eg.TriggerEvent ("mute_toggle", prefix = "control.tv")\n    eg.globals.hhdevice = \'14638752\'\n    eg.globals.hhcommand = \'Mute\'\n    eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Harmony\\\\HarmonyHubControl.exe\', u\'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}\', 3, False, 5, u\'\', False, False, u\'\', False, False, False, False)\neg.scheduler.AddTask (0.0, tvmutetoggle)')
                    </Action>
                </Macro>
                <Macro Name="TV VolumeUp" XML_Guid="{5E5D1DE3-0EC5-44E5-8338-ECE9343C551B}" Expanded="True">
                    <Action Name="TV VolumeUp" XML_Guid="{DC27DF6A-7703-45DB-9C5F-B5BA41B07CAA}">
                        EventGhost.PythonScript(u'def tvvolup():\n    #eg.TriggerEvent ("mute_toggle", prefix = "control.tv")\n    eg.globals.hhdevice = \'14638752\'\n    eg.globals.hhcommand = \'VolumeUp\'\n    eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Harmony\\\\HarmonyHubControl.exe\', u\'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}\', 3, False, 5, u\'\', False, False, u\'\', False, False, False, False)\neg.scheduler.AddTask (0.0, tvvolup)')
                    </Action>
                </Macro>
                <Macro Name="TV VolumeDown" XML_Guid="{96D41A4A-E107-4585-A248-C1CB4F32A31A}" Expanded="True">
                    <Action Name="TV VolumeDown" XML_Guid="{BF394636-FE58-4E72-ABF8-F8615BB7B2A9}">
                        EventGhost.PythonScript(u'def tvvoldown():\n    #eg.TriggerEvent ("mute_toggle", prefix = "control.tv")\n    eg.globals.hhdevice = \'14638752\'\n    eg.globals.hhcommand = \'VolumeDown\'\n    eg.plugins.System.Execute(u\'D:\\\\Programmdaten\\\\01_Zentral\\\\Harmony\\\\HarmonyHubControl.exe\', u\'michisch@web.de tHXgJZ4g 192.168.111.210 issue_device_command {eg.globals.hhdevice} {eg.globals.hhcommand}\', 3, False, 5, u\'\', False, False, u\'\', False, False, False, False)\neg.scheduler.AddTask (0.0, tvvoldown)')
                    </Action>
                </Macro>
            </Folder>
        </Folder>
        <Folder Name="Externe Daten" XML_Guid="{D945ADCA-4927-478B-8488-9EAE3F0C06E9}">
            <Folder Name="Suntracker" Enabled="False" XML_Guid="{3B8F3221-EA05-4801-8EFD-FE234C1D1873}" Expanded="True">
                <Macro Name="SunTracker:  Course of sun" XML_Guid="{4D9D68EC-4313-434D-8CD4-5DAF6DEE70EF}" Expanded="True">
                    <Action XML_Guid="{ABBA2B39-02C0-4049-A6C1-12F0F1FEA10E}">
                        Suntracker.SuntrackerAction([u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----'], u'Course of sun', u'sunshine ON', u'sunshine OFF', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'----', u'1100', u'----', u'0101,0501,0606,1224,1225,1226', u'0106,0402,0405,0512,0522,0523,0625', 1, 1, 1.5, False, False, False, True, 10, 40, 10, 40, 3, 10, 40, 80, True, 0, 120, 10, '18.0', '59.25', u'GMXX0007:1:GM', 60, u'03', u'10', False, u'metric', 5, u'----', u'1100', u'----', False, 'Main', False)
                    </Action>
                </Macro>
                <Macro Name="SunTracker: GetCurrentCondition" XML_Guid="{31BFA5FF-0EB9-41EE-BC82-6193E9423986}" Expanded="True">
                    <Action XML_Guid="{8AD3194B-0E26-4519-9701-1A0E4D44C7B6}">
                        Suntracker.GetWeatherCondition()
                    </Action>
                    <Action Enabled="False" XML_Guid="{B9E14E8A-4F54-4422-90E6-9EC1935D024C}">
                        EventGhost.PythonScript(u'print eg.result\nprint u""\n')
                    </Action>
                    <Action XML_Guid="{ACDB99DD-8A16-453B-875D-1F292F03FD1B}">
                        EventGhost.PythonCommand(u'print eg.result')
                    </Action>
                </Macro>
                <Macro Name="SunTracker: GetSunState" XML_Guid="{0A760776-E58A-4737-9F3F-9D462396A131}" Expanded="True">
                    <Action XML_Guid="{7A701D31-495C-44A1-82A7-83F60B9166A8}">
                        Suntracker.GetSunState()
                    </Action>
                    <Action XML_Guid="{D041550B-AF97-47E3-802D-E9642D6678F0}">
                        EventGhost.PythonCommand(u'print eg.result')
                    </Action>
                </Macro>
                <Macro Name="Get compensated sun state" XML_Guid="{F04310AD-EA13-45A2-8D06-0877D8B8E10D}" Expanded="True">
                    <Action XML_Guid="{220FB230-2178-4A90-AF5A-816CCAB70187}">
                        Suntracker.GetSunStatusWeatherCompensated(120)
                    </Action>
                    <Action Name="Set vars" XML_Guid="{29300C82-C298-430B-832E-457CEA82B27B}">
                        EventGhost.PythonScript(u'eg.plugins.FileOperations.Write(2, u\'\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.sunstate.txt\', 0, 0, True, False, False, \'cp1252\')\neg.globals.luminance_old = eg.globals.luminance\nif eg.result:\n    eg.globals.luminance = "hell"\n    eg.globals.beamer_preset = "User 2"\n    print "luminance before = "+eg.globals.luminance_old\n    print "luminance new = "+eg.globals.luminance\nelse:\n    eg.globals.luminance = "dunkel"\n    eg.globals.beamer_preset = "User 1"\n    print "luminance before = "+eg.globals.luminance_old\n    print "luminance new = "+eg.globals.luminance\neg.plugins.FileOperations.Write(2, u\'{eg.globals.luminance}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.sunstate.txt\', 2, 0, True, False, False, \'cp1252\')\neg.plugins.FileOperations.Write(2, u\'{eg.globals.luminance_old}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.sunstate.txt\', 2, 0, True, False, False, \'cp1252\')')
                    </Action>
                    <Action Enabled="False" XML_Guid="{FF84D025-186E-4A99-BD15-9343C3F1FDB0}">
                        EventGhost.ShowOSD()
                    </Action>
                </Macro>
                <Macro Name="Get compensated sun state - initial" XML_Guid="{081C45EC-D897-45CE-93C5-146BECADE58B}" Expanded="True">
                    <Action XML_Guid="{84C96931-3042-462E-B88A-7AB7A5B64253}">
                        Suntracker.GetSunStatusWeatherCompensated(120)
                    </Action>
                    <Action Name="Set vars" XML_Guid="{80156D47-9C8B-4A1F-9412-D55AD464A0D6}">
                        EventGhost.PythonScript(u'if eg.result:\n    eg.globals.luminance = "hell"\n    eg.globals.beamer_preset = "User 2"\n    print "luminance before = "+eg.globals.luminance_old\n    print "luminance new = "+eg.globals.luminance\nelse:\n    eg.globals.luminance = "dunkel"\n    eg.globals.beamer_preset = "User 1"\n    print "luminance before = "+eg.globals.luminance_old\n    print "luminance new = "+eg.globals.luminance\neg.globals.luminance_old = eg.globals.luminance\neg.plugins.FileOperations.Write(2, u\'\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.sunstate.txt\', 0, 0, True, False, False, \'cp1252\')\neg.plugins.FileOperations.Write(2, u\'{eg.globals.luminance}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.sunstate.txt\', 2, 0, True, False, False, \'cp1252\')\neg.plugins.FileOperations.Write(2, u\'{eg.globals.luminance_old}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.sunstate.txt\', 2, 0, True, False, False, \'cp1252\')')
                    </Action>
                    <Action XML_Guid="{5BCF06E7-AEA3-4C21-9E93-D8F54ED9F178}">
                        EventGhost.ShowOSD()
                    </Action>
                </Macro>
            </Folder>
        </Folder>
    </Folder>
    <Folder Name="Errorhandling" XML_Guid="{5B43427A-BB9E-4A30-8672-60F8FE445D2E}">
        <Folder Name="Manual Actions" XML_Guid="{69BFC8BA-60D2-4C81-98D6-40DF5BA1BF36}" Expanded="True">
            <Macro Name="Print Vars" XML_Guid="{9D08AA19-0531-45A2-A1F6-C4C202AD1830}" Expanded="True">
                <Action Name="Print Vars" XML_Guid="{CF057C5F-454B-4D71-875B-D6FBA39892C7}">
                    EventGhost.PythonScript(u'print "Harmony: "+str(eg.globals.harm_act)\nprint "Amp-Volume: "+str(eg.globals.amp_volume)\nprint "Last Amp-Volume: "+str(eg.globals.amp_volume_old)\nprint "Even older Amp-Volume: "+str(eg.globals.amp_volume_old2)\nprint "Bitstreaming: "+str(eg.globals.bitstreaming)\nprint "Dimension: "+str(eg.globals.dimension)\nprint "Fullscreen: "+str(eg.globals.fullscreen)\nprint "luminance: "+eg.globals.luminance\nprint "htpcapp: "+eg.globals.htpcapp\nprint "htpcapp_last: "+eg.globals.htpcapp_last\nprint "first_play: "+str(eg.globals.first_play)\nprint "playing: "+str(eg.globals.playing)\nprint "firststandbyafterresume: "+str(eg.globals.firststandbyafterresume)\nprint "eg.globals.failsaverestart: "+str(eg.globals.failsaverestart)\nprint "eg.globals.headset_connected: "+str(eg.globals.headset_connected)\nprint "eg.globals.headset_active: "+str(eg.globals.headset_active)\nprint "eg.globals.checksystemaudio_ON_run: "+str(eg.globals.checksystemaudio_ON_run)\nprint "eg.globals.amp_connected: "+str(eg.globals.amp_connected)')
                </Action>
                <Action XML_Guid="{4E71C905-FCC9-4A40-B309-C1D278AE0B04}">
                    EventGhost.ShowOSD(u'', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;TitanSmall', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 1.0, False)
                </Action>
            </Macro>
            <Macro Name="Print eg.result" XML_Guid="{6D5F08C8-943F-4632-8474-A6EF57F6874D}">
                <Action XML_Guid="{7300C2C2-D4A2-4E9A-B512-03C502D5153E}">
                    EventGhost.PythonScript(u'print eg.result')
                </Action>
            </Macro>
            <Macro Name="Trigger Manual Switch Kodi" XML_Guid="{E216EB26-E7BD-48B2-9C67-5E15EFA4AC03}" Expanded="True">
                <Action XML_Guid="{B682AC2C-BC65-462C-B81F-82D5147F13D7}">
                    EGAppControl.HideWindow()
                </Action>
                <Action Enabled="False" XML_Guid="{8AF96AF0-8CFA-45B5-9FF6-DA1DE9C55A4E}">
                    EventGhost.Wait(2.0)
                </Action>
                <Action XML_Guid="{5BC4351A-39D9-4FBA-B4E9-0D8087EB5514}">
                    EventGhost.PythonScript(u'from datetime import datetime\nprint "Triggering kodi"+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\neg.TriggerEvent ("Mce.Music", prefix="MceRemote")\n#MceRemote.Mce.Power\n#MceRemote.Mce.Music')
                </Action>
            </Macro>
            <Macro Name="Trigger Manual Switch MP" XML_Guid="{A14834AA-738F-4FDE-AD74-4389D968EBEC}">
                <Action XML_Guid="{E6B9859B-B591-4C76-96CD-52AB4F8C6F82}">
                    EGAppControl.HideWindow()
                </Action>
                <Action Enabled="False" XML_Guid="{AE7144FF-EBF8-4BF4-AEA4-8EEC68A59B96}">
                    EventGhost.Wait(2.0)
                </Action>
                <Action XML_Guid="{328674F2-842B-4EC9-9462-688BFF5CD7E4}">
                    EventGhost.PythonScript(u'from datetime import datetime\nprint "Triggering kodi"+str(datetime.now().strftime(\'%H:%M:%S.%f\')[:-3])\neg.TriggerEvent ("Mce.Power", prefix="MceRemote")\n#eg.TriggerEvent ("Mce.Music", prefix="MceRemote")\n\n#MceRemote.Mce.Power\n#MceRemote.Mce.Music')
                </Action>
            </Macro>
            <Macro Name="Trigger Manual Start Action" XML_Guid="{FEF04B06-B738-45DE-87BE-92F94F533F8B}">
                <Action Name="Trigger Manual Start Action" XML_Guid="{86691110-3880-4103-81E2-4716393CEBE9}">
                    EventGhost.PythonScript(u'import time\ndef triggerharmactswitch():\n    import time\n    eg.TriggerEvent ("Mce.Teletext", prefix="MceRemote")\n    time.sleep(3)\n    eg.TriggerEvent ("Mce.Pictures", prefix="MceRemote")\neg.scheduler.AddTask(0.0, triggerharmactswitch)\n#test interrupt\neg.Exit #f\xfcr test auskommentieren\ntime.sleep(2)\neg.globals.endloop_interrupt = 1\neg.globals.startloop_interrupt = 1')
                </Action>
            </Macro>
            <Macro Name="Standby Control: Is Keep Alive" XML_Guid="{F1E81A2F-DB12-4DD1-B4F3-5AB0F68D7867}">
                <Action XML_Guid="{D901EB1F-E22D-485C-94D9-03F03B37D903}">
                    StandbyControl.IsKeepAlive()
                </Action>
                <Action XML_Guid="{60E04191-D1D2-4E61-A46A-F737274D6997}">
                    EventGhost.ShowOSD()
                </Action>
            </Macro>
            <Macro Name="VolumeUp" XML_Guid="{835E4A70-EB3F-45BF-B50B-F1EBC8A5B8C2}">
                <Action Name="Up" XML_Guid="{A4DC483F-515F-458E-B4C5-9BC5034CB044}">
                    EventGhost.PythonScript(u'eg.TriggerEvent ("Mce.VolumeUp", prefix="MceRemote")\n#eg.TriggerEvent ("Mce.VolumeDown", prefix="MceRemote")')
                </Action>
            </Macro>
            <Macro Name="VolumeDown" XML_Guid="{69FA7664-9DF2-41CE-9158-FCE6AC4D00E8}">
                <Action Name="Down" XML_Guid="{4F7994DC-9D4A-4820-A8C7-5A1C9EE8FD12}">
                    EventGhost.PythonScript(u'eg.TriggerEvent ("Mce.VolumeDown", prefix="MceRemote")')
                </Action>
            </Macro>
            <Macro Name="mce" XML_Guid="{D91961E9-A169-4AF7-B7B2-A00D30B0F9E5}">
                <Action XML_Guid="{2FF4B78A-3644-4FD1-9CF4-D6810324E076}">
                    EventGhost.PythonCommand(u'eg.globals.button = "VolumeUp"')
                </Action>
                <Action Name="mce" XML_Guid="{FD682FDE-DE07-4AE4-81D5-705E790356CE}">
                    EventGhost.PythonScript(u'eg.TriggerEvent ("Mce."+eg.globals.button, prefix="MceRemote")')
                </Action>
            </Macro>
        </Folder>
        <Folder Name="ExternalErrorhandling" XML_Guid="{1279E60F-69C2-4A7B-ABB7-53D65AE64D51}" Expanded="True">
            <Macro Name="Errorhandling started, Phase 1" XML_Guid="{AE3B9F61-9DA0-4FA6-A1FE-D7CB0E5FACB7}" Expanded="True">
                <Event Name="TCP.Errorhandling.errorhandling_phase1" XML_Guid="{19852BB8-3770-4487-98BB-AF3ADBA5435E}" />
                <Event Name="MceRemote.Mce.DVDMenu" Enabled="False" XML_Guid="{DAA1CE27-6C6F-47F2-A105-73D39457A4CA}" />
                <Event Name="Main.errorhandling.simulation" XML_Guid="{EC0FAE8C-3242-4A1A-ACE8-0861621711DE}" />
                <Action XML_Guid="{D8E470A2-FF14-4D48-86D0-C663CFCD501E}">
                    EventGhost.DisableItem(eg.GUID('{49B4E1A3-E761-4FCA-9600-7914DE1A6357}'))
                </Action>
                <Action XML_Guid="{077C199E-8E30-4CEF-B3E5-CFC326E2EA62}">
                    EGAppControl.HideWindow()
                </Action>
                <Action XML_Guid="{96E1D7C2-B008-488E-B589-841FB3E5D88A}">
                    System.SetWallpaper(u'D:\\Programmdaten\\MediaPortal\\System Backgrounds\\error.jpg', 0)
                </Action>
                <Action Enabled="False" XML_Guid="{1196CC02-D272-4710-BE3E-134780D9A180}">
                    System.DisplayImage()
                </Action>
                <Action Enabled="False" XML_Guid="{97CD6D74-D066-4FA5-979A-7BC894FA9CD5}">
                    EventGhost.ShowOSD()
                </Action>
                <Action XML_Guid="{75103B34-0B51-4D6E-9C1F-F94501A58D45}">
                    EGAppControl.SaveConfiguration()
                </Action>
                <Action Name="Exit htpcapps" XML_Guid="{12A5E82E-096D-462B-B9B1-7188650FDEF2}">
                    EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\neg.globals.mp_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="MediaPortal.exe"\') ) &gt; 0\nif eg.globals.htpcapp =="mp" or "kodi":\n    eg.globals.htpcapp_last = eg.globals.htpcapp\n    eg.plugins.FileOperations.Write(2, u\'{eg.globals.htpcapp}\', u\'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.htpcapp_last.txt\', 0, 0, True, False, False, \'cp1252\')\nif eg.globals.kodi_running:\n    print "Kodi was running. Will exit it."\n    eg.plugins.XBMC2.RemoteStop()\n    eg.plugins.XBMC2.Quit()\nif eg.globals.mp_running:\n    print "MP was last used app. Will exit it."\n    eg.plugins.MediaPortal.Stop()\n    eg.plugins.MediaPortal.PowerTV()')
                </Action>
                <Action Enabled="False" XML_Guid="{ACB2ADAB-6E62-46A1-A7B5-4E4CA6AF2953}">
                    EGAppControl.ExitApplication()
                </Action>
                <Action Enabled="False" XML_Guid="{FC21FAFC-4777-4FF8-A65B-126A696C13FC}">
                    EventGhost.Wait(5.0)
                </Action>
                <Action Name="Starte Anwendung: errorhandling.bat" Enabled="False" XML_Guid="{9064D24D-2216-4F1E-B5F8-2686429F9BC4}">
                    System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\Hstart\\hstart.exe', u'/NOCONSOLE /RUNAS /WAIT D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\errorhandling_htpc.bat', 0, False, 2, u'', False, False, u'', False, False, False)
                </Action>
                <Action XML_Guid="{BD561F62-28CA-4CB1-BD93-44D7F5CD476F}">
                    EventGhost.StopProcessing()
                </Action>
            </Macro>
            <Macro Name="Zeige OSD:    {eg.event.suffix}    " Enabled="False" XML_Guid="{8D7C41D3-4D89-4C51-BA11-78C252B17B6E}" Expanded="True">
                <Event Name="TCP.Errorhandling.*" XML_Guid="{373DBF5F-B6A8-4E90-9FC4-542F5893422E}" />
                <Event Name="Main.errorhandling.*" XML_Guid="{11BA062F-519B-4741-B52A-56F68E708FD8}" />
                <Action XML_Guid="{38282780-B734-4CEA-AA1E-7E8864D593E7}">
                    EventGhost.ShowOSD()
                </Action>
            </Macro>
            <Macro Name=" Errorhandling Phase 2" Enabled="False" XML_Guid="{AAF4957A-5511-43CC-AC89-57595CE73B1F}">
                <Event Name="TCP.Errorhandling.errorhandling_phase2" XML_Guid="{82630209-1CFE-4128-B418-1ABC16DAF20D}" />
                <Event Name="Main.errorhandling.phase2" XML_Guid="{2B2A340B-E34E-4578-892D-D19D051C71DB}" />
                <Event Name="Main.forced_restart" XML_Guid="{A41EF21D-943D-400B-A5CA-6204A3FEC8FC}" />
                <Action XML_Guid="{8A99EC6C-BC6B-4B91-B5B1-6514C3486644}">
                    System.DisplayImage()
                </Action>
                <Action XML_Guid="{9917ADB1-6D10-46E1-8CC8-480D44724BD4}">
                    EventGhost.ShowOSD()
                </Action>
            </Macro>
            <Macro Name="Errorhandling beendet   " XML_Guid="{4CB6E9FC-657E-47D2-A596-340ECB39AA1B}" Expanded="True">
                <Event Name="TCP.Errorhandling.errorhandling_done" XML_Guid="{ACABD0F8-C6BA-40E3-8FE5-A3CA1C1BED00}" />
                <Event Name="Main.errorhandling.done" XML_Guid="{52ECD6B2-4364-47C0-BC77-AFE3E949FEA6}" />
                <Action XML_Guid="{BE40C8A8-3BE4-47BD-AAC2-0E107240B862}">
                    EventGhost.EnableItem(eg.GUID('{49B4E1A3-E761-4FCA-9600-7914DE1A6357}'))
                </Action>
                <Action XML_Guid="{13DA8214-02D5-4348-8509-593E47D5840C}">
                    System.SetWallpaper()
                </Action>
                <Action XML_Guid="{2F8DB230-9D48-460F-9415-007F158C35B4}">
                    EventGhost.NewJumpIf(eg.GUID('{18B85CBC-2011-419B-A395-03D000C08363}'), 2, True)
                </Action>
                <Action XML_Guid="{C28EA0D1-AE61-44DB-9F27-179D6A5673E6}">
                    EventGhost.ShowOSD()
                </Action>
                <Action XML_Guid="{267C910C-13B5-4E7F-9561-0D6943DEC97A}">
                    EventGhost.Wait(1.0)
                </Action>
                <Action XML_Guid="{B0367C57-EA91-4524-B038-91CC66074E63}">
                    System.HideImage(u'error')
                </Action>
            </Macro>
        </Folder>
        <Macro Name="Restart TVService" Enabled="False" XML_Guid="{3A568303-58AD-4BA9-B943-DBF56FBA14A2}">
            <Action Name="Starte Anwendung: hstart.exe / restart tvservice" XML_Guid="{594B51D6-D337-4AA2-8B28-525F07563035}">
                System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\Hstart\\hstart.exe', u'/NOCONSOLE /RUNAS /WAIT "D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\restart_tvservice.bat"', 0, True, 2, u'', True, False)
            </Action>
        </Macro>
        <Macro Name="Restart MP hart direct" Enabled="False" XML_Guid="{33794886-2D13-4937-B4D2-CF3738CE23CD}">
            <Action XML_Guid="{D2599E0C-0A9F-4025-9DAE-689B8B98B362}">
                System.Execute(u'D:\\Programmdaten\\01_Zentral\\Scripts\\mmhtpc\\Pskill\\pskill_mediaportal.bat', u'', 0, True, 3, u'', True, False)
            </Action>
            <Action XML_Guid="{C16E1507-F9A9-495C-A2BC-226BED71B31E}">
                EventGhost.Wait(2.0)
            </Action>
            <Action Name="Starte MediaPortal.exe" XML_Guid="{062EFFE6-193C-469A-9E1F-1CA5CAA3D936}">
                System.Execute(u'C:\\Program Files (x86)\\Team MediaPortal\\MediaPortal\\MediaPortal.exe', u'', 0, False, 2, u'', False, False)
            </Action>
        </Macro>
        <Macro Name="On Crash MP" Enabled="False" XML_Guid="{2CFC3E0E-5890-4DFB-B5E9-ED54D1A64DA6}">
            <Action XML_Guid="{4AD9727A-30A5-46E5-92B2-2F09AA6C7A6F}">
                Window.FindWindow(u'dw20.exe', u'MediaPortal', None, None, None, None, False, 5.0, 0)
            </Action>
            <Action XML_Guid="{2C0C36F4-DA48-49E8-BCA1-3E1CE11529FA}">
                Window.BringToFront()
            </Action>
            <Action XML_Guid="{2272C96F-C45B-406A-9A28-701DBEDC36E2}">
                Window.SendKeys(u'{Return}', False)
            </Action>
            <Action XML_Guid="{F304C031-7B0B-4B32-B3A1-080280C1346D}">
                EventGhost.Wait(0.5)
            </Action>
            <Action XML_Guid="{28180804-C8B1-4E2C-B7A3-FF272E341375}">
                Window.SendKeys(u'{Return}', False)
            </Action>
            <Action XML_Guid="{E098BD7A-9837-4CEF-AA4C-E7EC367DDBA3}">
                EventGhost.Wait(0.5)
            </Action>
        </Macro>
        <Macro Name="Fehlerbehebung Evenghost" XML_Guid="{621BC7F7-18CA-4D46-806E-DB1A63F42F17}">
            <Action XML_Guid="{68DBF223-17AE-4235-BE4D-4CC007126887}">
                EventGhost.ShowOSD(u'     Starte EventGhost neu    ', u'0;-27;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (129, 197, 248), None, 6, (0, 0), 0, 3.0, u'mp')
            </Action>
            <Action XML_Guid="{4E43A2E6-5031-4CA1-B0E7-DD0B33CFB95D}">
                EventGhost.FlushEvents()
            </Action>
            <Action XML_Guid="{DC289D4C-FDA0-423B-A5B8-AFD1B004C3F9}">
                System.Execute(u'D:\\Programmdaten\\Pskill\\restart eventghost hart.bat', u'', 3, False, 4, u'', False)
            </Action>
        </Macro>
        <Macro Name="Restart EG" XML_Guid="{13C5618D-3D73-465F-BEBB-41D6555CCC81}">
            <Event Name="errohandling.forced_restart.eg" XML_Guid="{A8F2E019-A143-4136-BBF1-7162B81543F2}" />
            <Event Name="errorhandling.sc_CheckSystemAudioStatus.restart_eg" XML_Guid="{FF4D652E-176E-4FBC-9C61-5EEBBF93C3AD}" />
            <Event Name="SchedulGhost.DayRestartEG" XML_Guid="{B28D8A80-B099-45F5-9287-62A932CE67A7}" />
            <Action XML_Guid="{EC39D09B-F24B-4B96-9084-48ED2526CF35}">
                EventGhost.ShowOSD(u'     Errorhandling: Restarting EG - Please wait...     ', u'0;-32;0;0;0;700;0;0;0;0;3;2;1;34;TitanSmall', (255, 255, 255), None, 6, (0, 50), 0, 3.0, u'mp')
            </Action>
            <Action XML_Guid="{62A37791-DCE0-4454-BEE3-5F2E657FF77F}">
                Window.SendKeys(u'{Win+D}', False, 2)
            </Action>
            <Action XML_Guid="{714DCC0A-7A69-4364-9B57-9383D9C55164}">
                EGAppControl.IsConfigDirty()
            </Action>
            <Action Name="if true: save" XML_Guid="{2B763A68-D51D-4048-8572-7CA67BD77781}">
                EventGhost.PythonScript(u"if eg.result:\n    eg.plugins.EGAppControl.SaveConfiguration()\neg.globals.failsaverestart = 1\neg.plugins.FileOperations.Write(2, u'{eg.globals.failsaverestart}', u'D:\\\\Programmdaten\\\\Eventghost\\\\varlogs\\\\eg.globals.failsaverestart.txt', 0, 0, True, False, False, 'cp1252')")
            </Action>
            <Action XML_Guid="{EFB9F8A2-DF41-4327-AC79-DAB0A9557EEB}">
                EGAppControl.RestartProgram()
            </Action>
        </Macro>
        <Macro Name="Show OSD: Scriptfehler" XML_Guid="{02DA057B-61E7-459F-8222-C05B626FF3C9}">
            <Event Name="EG.script_error" XML_Guid="{8987ACA3-93B3-4F7A-93EC-4BD83C88C472}" />
            <Action XML_Guid="{CAA9B122-5BE5-4B13-A926-B4831CF40CE2}">
                EventGhost.ShowOSD(u'Scriptfehler', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;TitanSmall', (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0, u'mp')
            </Action>
        </Macro>
        <Macro Name="Restart Plugin: XBMC2" Enabled="False" XML_Guid="{DB203F0B-5DB6-41C2-8686-A6799C458E4D}">
            <Event Name="sc.kodistart.xbmcplugin_reset" Enabled="False" XML_Guid="{D8515903-2A59-4BCA-B7EE-02C63360A853}" />
            <Event Name="system.onstartkodi.restart_kodi_plugin" XML_Guid="{D152DF31-CD18-443D-804C-2E08937A3A1D}" />
            <Event Name="system.periodicalcheck.restart_kodi_plugin" XML_Guid="{2D4C1182-5698-413E-885C-2830AA24A8F3}" />
            <Action Enabled="False" XML_Guid="{D1C3B61A-DEB5-4D2D-9119-D35CE85F91F5}">
                EventGhost.ShowOSD()
            </Action>
            <Action Name="PreChecks" XML_Guid="{B15BE107-88D5-4EF6-A687-01EA89AE4FA1}">
                EventGhost.PythonScript(u'from win32com.client import GetObject\nWMI = GetObject(\'winmgmts:\')\neg.globals.kodi_running = len( WMI.ExecQuery(\'select * from Win32_Process where Name="kodi.exe"\') ) &gt; 0\nif not eg.globals.kodi_running:\n    print "kodi not running, skipping reset of plugin"\n    eg.StopMacro()\n    #eg.Exit\nelse:\n    print "kodi running, reseting xbmc plugin"\n    eg.globals.XBMC2_System_OnStart_active = 0\n    print "eg.globals.XBMC2_System_OnStart_active = "+str(eg.globals.XBMC2_System_OnStart_active)\n    def XBMC2_System_OnStart_active():\n        import time\n        time.sleep(20)\n        eg.globals.XBMC2_System_OnStart_active = 1\n        print "eg.globals.XBMC2_System_OnStart_active = "+str(eg.globals.XBMC2_System_OnStart_active)\n    eg.scheduler.AddTask(0.0, XBMC2_System_OnStart_active)\n    eg.globals.systemvolume_keep = eg.globals.systemvolumelevel\n    print "Volume to keep: "+str(eg.globals.systemvolume_keep)\n    eg.globals.systemvolumelevel_set = eg.globals.systemvolume_keep\n    if not eg.globals.playing:\n        #eg.plugins.System.MuteOn(u\'Primary Sound Driver\')\n        eg.plugins.System.SetMasterVolume(0.0, u\'Primary Sound Driver\')\n    else:\n        pass')
            </Action>
            <Action XML_Guid="{F30F6FB6-FC58-4AB1-9F1F-97E309EF7B21}">
                EventGhost.DisableItem(eg.GUID('{90A7B874-A917-4CA2-BF53-42FE19931E30}'))
            </Action>
            <Action XML_Guid="{92B2C820-F2C4-407B-B9CA-80C8291700AA}">
                EventGhost.Wait(0.5)
            </Action>
            <Action XML_Guid="{191E449F-610D-4F0C-BDC0-0134C96B6DA6}">
                EventGhost.EnableItem(eg.GUID('{90A7B874-A917-4CA2-BF53-42FE19931E30}'))
            </Action>
            <Action Enabled="False" XML_Guid="{97DAE3A2-A010-4F03-8E4E-D5A9B5F8370A}">
                EventGhost.FlushEvents()
            </Action>
            <Action Name="After Checks" XML_Guid="{9E6A00FB-712B-4AA4-9AF1-3BF2052B3967}">
                EventGhost.PythonScript(u'eg.globals.systemvolumelevel_set = eg.globals.systemvolume_keep')
            </Action>
            <Action XML_Guid="{FB873CDB-A999-43A8-9F3B-BEB4C1495E57}">
                EventGhost.NewJumpIf(eg.GUID('{8A5136DA-8EA2-4647-A50A-B600CC9E763F}'), 2, True)
            </Action>
            <Action Enabled="False" XML_Guid="{8A9B1609-2E86-4189-A6F6-88ACCCE0DF99}">
                EventGhost.ShowOSD(u' ', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;TitanSmall', (255, 255, 255), None, 0, (20, 20), 0, 0.01, None)
            </Action>
        </Macro>
    </Folder>
    <Folder Name="Test Dump" XML_Guid="{31E8DDDA-6DC6-494E-B987-97A0CED38388}" Expanded="True">
        <Folder Name="aktiv" XML_Guid="{E06F3A77-1C84-4EAD-83F4-E739E5BE91A0}">
            <Macro Name="Netzwerk Ereignis Sender: Map: hallo" XML_Guid="{50B0284C-F06E-4DA4-8E5A-EE017C0F2919}">
                <Action XML_Guid="{B6DDAF55-FFBE-46F0-A49C-CC5118F11A91}">
                    NetworkSender.Map(u'mmhtpc.{eg.eventString} [{eg.event.payload}]')
                </Action>
            </Macro>
            <Macro Name="Standby Control: Trigger Standby Timer: True" id="2747" XML_Guid="{E6EE3D31-D522-4C7D-8F5C-01869F94946E}">
                <Action XML_Guid="{72248881-E6E1-44DA-9F16-70D927A1A234}">
                    EventGhost.PythonScript(u'eg.globals.standby_osd_delay = 5.0')
                </Action>
                <Action XML_Guid="{69FD32E8-3C5C-468F-8B3F-0EFFB7FE6B43}">
                    StandbyControl.EnableStandbyByApplication(u'just_started', True, 0, 5, 0, 600)
                </Action>
                <Action XML_Guid="{69FD32E8-3C5C-468F-8B3F-0EFFB7FE6B43}">
                    StandbyControl.EnableStandbyByApplication(u'kodi', True, 0, 10, 0, 600)
                </Action>
                <Action XML_Guid="{69FD32E8-3C5C-468F-8B3F-0EFFB7FE6B43}">
                    StandbyControl.EnableStandbyByApplication(u'maintenance', True, 0, 10, 0, 600)
                </Action>
                <Action XML_Guid="{D4683BB5-20B4-4157-BD0F-0DF6C65CD07C}">
                    StandbyControl.TriggerStandbyTimer(True, False, 5)
                </Action>
                <Action XML_Guid="{7F4C77E0-6FC1-4807-9605-462227751D97}">
                    EventGhost.EnableItem(eg.GUID('{50B0284C-F06E-4DA4-8E5A-EE017C0F2919}'))
                </Action>
            </Macro>
        </Folder>
        <Folder Name="inaktiv" Enabled="False" XML_Guid="{02107032-E028-4A5E-A8B7-544760AC50A4}">
            <Macro Name="Python Editor: Script" XML_Guid="{B9DA35C8-C9D6-4B3B-926D-544C09C52747}">
                <Action XML_Guid="{C7828373-35FC-469B-8325-374EFB03ACB8}">
                    PythonScriptEditor.Script('# runinthread:True\nhallo = "Hallo"\nprint hallo')
                </Action>
            </Macro>
            <Macro Name="Setze Master-Lautstärke #1: 70.00 %" XML_Guid="{1E6D58E6-7113-48A4-AA93-C49A3D7B652A}">
                <Action XML_Guid="{7858B254-B7BB-4241-B6A0-5794FAC85D0F}">
                    System.SetMasterVolume(70.0, u'Kopfh\xf6rer (Jabra MOVE v2.5.0 St')
                </Action>
            </Macro>
            <Macro Name="AudioEndpoint: Get Default Audio Device: 0" XML_Guid="{01737DF0-0EA5-48C5-9CFB-126A3186F95B}">
                <Action XML_Guid="{D18CFD05-7F18-401B-B2DB-537CEC5E2401}">
                    AudioEndpoint.GetDefaultDevice(1, 0)
                </Action>
                <Action XML_Guid="{7E3478BD-9B6B-4E88-AC59-EE7CE559448E}">
                    EventGhost.PythonScript(u'print eg.result')
                </Action>
            </Macro>
            <Macro Name="AudioEndpoint: TX-SR607-14 (NVIDIA High Definition Audio)" XML_Guid="{FA9E26D5-6BA2-4D6F-AACE-5CE7DDAF65F6}">
                <Action XML_Guid="{C16546DE-85CD-4F31-9FE8-C4091649F863}">
                    AudioEndpoint.SetRender(u'{0.0.0.00000000}.{3d8020f8-a3f8-41f4-ac1d-9fbb51813d18}', 0)
                </Action>
            </Macro>
            <Macro Name="Microsoft MCE Remote (Vista+): Get Mce IR device capability" XML_Guid="{90486A1E-D7D9-4B20-8D65-974A8B9BA635}">
                <Action XML_Guid="{20794C7B-80CF-4700-B5D9-1DB85AF4074F}">
                    MCE_Vista.GetDeviceInfo()
                </Action>
            </Macro>
            <Macro Name="Microsoft MCE Remote (Vista+): Test IR Transmit capability" XML_Guid="{758201E8-78E6-4AD4-A4AC-0FB84E6F4F0D}">
                <Action XML_Guid="{7F2E3695-9DD1-46A6-91F3-BD438C7A43DC}">
                    MCE_Vista.TestIR()
                </Action>
            </Macro>
            <Macro Name="Display Image: D:\Programmdaten\Eventghost\pics\bg_gradient2.jpg" XML_Guid="{A27A6BF7-A5E8-424C-9D00-D0F5BE413BF2}">
                <Action XML_Guid="{4E9CD981-ADB5-4E59-9735-28D495B10A37}">
                    System.DisplayImage(u'D:\\Programmdaten\\Eventghost\\pics\\bg_gradient2.jpg', 2, 1, False, False, 0, True, 4, 10, 0, 1000, 0, 640, 360, (0, 0, 0), True, False, True, u'duLuder')
                </Action>
            </Macro>
        </Folder>
        <Macro Name='Springe zu "Standby Control: Trigger Standby Timer: True"' XML_Guid="{EEA18B42-3E5A-4E2B-8D08-AD0460367043}">
            <Action XML_Guid="{129EFF9C-11F3-45D0-8BD8-69180CA94D72}">
                EventGhost.NewJumpIf(XmlIdLink(2747), 2, False)
            </Action>
        </Macro>
    </Folder>
</EventGhost>
