Multiple AutoApps Ultimate Remote YouTube

Discussion in 'Guides / Examples / Ideas Forum' started by LEGOlord208, Apr 10, 2016.

  1. LEGOlord208

    LEGOlord208 Member

    Joined:
    Feb 19, 2015
    Messages:
    38
    Likes Received:
    1
    Hello! Once again... On Google Plus I aimed to release one task per day.
    Since I have so few tasks, I am already loosing it.
    Here is the last thing I have ATM.

    Ultimate YouTube control on desktop!

    1. Open RemoteTube.prj.xml in tasker.
    Replace all occurences with "SAMUEL PC" with your own PC.

    2. Open EventGhost on PC.
    Init AutoRemote if you haven't.
    Go somewhere. Copy the following code, and press Ctrl+V in EventGhost.¨
    The code is also in a file if you for some reason would want that
    Code (Text):
    <?xml version="1.0" encoding="UTF-8" ?>
    <EventGhost Version="1722">
        <Folder Name="RemoteTube" Expanded="True">
            <Macro Name="Watch" Expanded="True">
                <Event Name="RemoteTube.watch" />
                <Action>
                    System.Execute(u'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe', u'{eg.event.payload}', 0, False, 2, u'', False, False, u'', False, False, False, False)
                </Action>
                <Action>
                    EventGhost.NewJumpIf(XmlIdLink(15), 2, True)
                </Action>
                <Action>
                    EventGhost.Wait(2.0)
                </Action>
                <Action>
                    Window.SendKeys(u'{F11}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Update Mouse" id="15" Expanded="True">
                <Action>
                    Mouse.MoveAbsolute(0, 0, None, False, False)
                </Action>
                <Action>
                    Mouse.MoveAbsolute(1366, 768, None, False, False)
                </Action>
            </Macro>
            <Macro Name="Set Volume" Expanded="True">
                <Event Name="RemoteTube.vol" />
                <Action>
                    EventGhost.PythonScript(u"eg.result = eg.plugins.System.ChangeMasterVolumeBy(eg.event.payload,\n    u'Speakers (Realtek High Definiti');")
                </Action>
                <Action>
                    EventGhost.ShowOSD(u'Volume: {int(round(eg.result))}', u'0;-24;0;0;0;700;0;0;0;1;0;0;2;32;Arial', (255, 255, 255), (0, 0, 0), 0, (50, 50), 0, 3.0, False)
                </Action>
            </Macro>
            <Macro Name="Close" Expanded="True">
                <Event Name="RemoteTube.close" />
                <Action>
                    Window.SendKeys(u'{F11}', False, 2)
                </Action>
                <Action>
                    Window.SendKeys(u'{Ctrl+W}', False, 2)
                </Action>
            </Macro>
            <Macro Name="Incoming" Expanded="True">
                <Event Name="AutoRemote.Message.remotetube" />
                <Action>
                    EventGhost.PythonScript(u'args = eg.event.payload.arcomm;\nif not isinstance(args, list):\n    args = [args];\nmethod = args[0];\n\nprint method;\nprint args;\n\nif method == "watch":\n    eg.TriggerEvent(u\'RemoteTube.watch\', payload=args[1]);\nelif method == "volume":\n    eg.TriggerEvent(u\'RemoteTube.vol\', payload=args[1]);\nelif method == "close":\n    eg.TriggerEvent(u\'RemoteTube.close\');\nelif method == "rewind":\n    eg.TriggerEvent(u\'RemoteTube.rewind\', payload=args[1]);')
                </Action>
            </Macro>
            <Macro Name="Rewind" Expanded="True">
                <Event Name="RemoteTube.rewind" />
                <Action>
                    EventGhost.NewJumpIf(XmlIdLink(15), 2, True)
                </Action>
                <Action>
                    EventGhost.Wait(0.01)
                </Action>
                <Action>
                    EventGhost.PythonScript(u'def send(pre, am, suf):\n    eg.plugins.Window.SendKeys(pre + am * u\'{Enter}\' + suf,\n        False, 2);\n\naction = eg.event.payload;\n\nif action == "forward":\n    send(u\'{Right}\', 1, u\'{Left}\');\nelif action == "forwardx":\n    send(u\'{Right}\', 5, u\'{Left}\');\n\nelif action == "backward":\n    send(u\'{Left}\', 1, u\'{Right}\');\nelif action == "backwardx":\n    send(u\'{Left}\', 5, u\'{Right}\');\n    \nelif action == "pause":\n    send(u\'\', 1, u\'\');')
                </Action>
            </Macro>
        </Folder>
    </EventGhost>

    If you like this, make sure to let me know :)
    If you have any problems, also let me know :)

    Or just ignore me fully like the most people do ^^
     

    Attached Files:

Share This Page