Tool share: Create new trigger

If you have macros or EventGhost Configuration Tree items you wish to share this is the place to do it.
Post Reply
dan Edens
Experienced User
Posts: 120
Joined: Mon Sep 24, 2018 7:57 pm

Tool share: Create new trigger

Post by dan Edens » Sat Nov 02, 2019 1:34 am

Dependencies - Auto-remote for input dialog.

Hey this is a really useful event maker I use.

pop up comes up and you type your new trigger.
sets your clipboard as the XML to paste in an event trigger for " *.{eg.event.payload} " with spaces replaced as "?" so they can be called with underscore from the command line if you're into that sorta thing. xD


Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="WIP">
    <Folder Name="Create New Trigger" XML_Guid="{30336DB7-2695-478C-902F-F5A8BD21AE58}" Expanded="True">
        <Macro Name="Input - Create new trigger" XML_Guid="{F95CC277-02E8-4E34-A03C-4D4A72530207}">
            <Event Name="*.trigger" XML_Guid="{837DD4E6-BA95-4AA5-8AD7-10057D70B555}" />
            <Action XML_Guid="{D3EDF852-A340-49FE-AB71-D0E60C9C5B5E}">
                AutoRemote.ShowInputDialog(u'Create trigger', u'Input a new trigger', u'', u'clipnewtrigger', False)
        <Macro Name="Create trigger" XML_Guid="{0000344D-6DF0-4DFC-A6A7-5769964A2B42}">
            <Event Name="*.clipnewtrigger" XML_Guid="{837DD4E6-BA95-4AA5-8AD7-10057D70B555}" />
            <Action Name="Createnewtrigger" XML_Guid="{5ED1FFBA-DEC4-4829-B656-C354DE23AB40}">
                EventGhost.PythonScript(u'\neg.event.payload = "*."+eg.event.payload.replace(" ", "?")\n\neg.globals.clip = """&lt;?xml version="1.0" encoding="UTF-8" ?&gt;\n&lt;EventGhost Version="WIP"&gt;\n    &lt;Event Name=\\""""+str(eg.event.payload)+"""\\" XML_Guid="{837DD4E6-BA95-4AA5-8AD7-10057D70B555}" /&gt;\n&lt;/EventGhost&gt;"""\neg.plugins.System.SetClipboard(u\'{eg.globals.clip}\')\nprint "Trigger ready to paste."\n')

Post Reply