AutoRemote Add Cortana Commands to your PC

Discussion in 'Guides / Examples / Ideas Forum' started by inanc, Aug 29, 2015.

  1. inanc

    inanc Member

    Joined:
    Mar 20, 2015
    Messages:
    50
    Likes Received:
    6
    Hi everyone , I just made simple autoremote and eventghost example for cortana. Since I dont need to control my android device with cortana , I thought why not adding more features to cortana. Then I made this. And if I am not wrong you can do it without purchasing autoremote! (Joa , please make it clear, Thanks :D)
    First , go to autoremote settings in your chrome browser and add that browser id to itself. Then check send cortana command under it. Also you need to check redirect messages to eventghost. Then copy this to eventghost tree.
    Code (Text):

    <?xml version="1.0" encoding="UTF-8" ?>
    <EventGhost Version="1700">
        <Macro Name="Cortana" Expanded="True">
            <Event Name="AutoRemote.Message.autovoice" />
            <Action>
                EventGhost.PythonScript(u"import webbrowser\n\neventPayload = eg.event.payload\nmyString=str(eventPayload)\nmyString=myString.lower()\n\nprint myString\n\nif 'youtube' in myString:\n    myString.split('\\'')\n    item=myString.split('\\'')[1]\n    item=item.lower()\n    item.split('youtube')\n    searchItem=item.split('youtube')[1]\n    print searchItem\n    webbrowser.open('https://www.youtube.com/results?search_query='+searchItem)\n    \nelif 'what\\'s up' in myString:\n    \n    webbrowser.open('https://web.whatsapp.com/')\n")
            </Action>
        </Macro>
    </EventGhost>
     
    This has 2 options. First one is searching on youtube. You simply say "search on youtube bla bla bla". it will search for "bla bla bla". Second one is , when you say "open whats up" it will browse to whatsapp web. You can add more things with a little searching of python programming.

    If this idea was posted before , sorry for it. I didnt find any.
     
    Imsuckk, Gustavo Coelho and Jonatan like this.
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,362
    Likes Received:
    786
    Awesome! :) I like what you did there with it sending the command to itself :D Very clever.
    Thanks for sharing!
    And you're right, it doesn't need the full version of AutoRemote! :)
     
    inanc likes this.
  3. GodSponge

    GodSponge New Member

    Joined:
    Aug 31, 2015
    Messages:
    5
    Likes Received:
    0
    This is pretty much exactly what I was looking for.
     
  4. Evil Genius

    Evil Genius Member

    Joined:
    Mar 5, 2015
    Messages:
    112
    Likes Received:
    9
    It is still a good idea to support the dev. AutoRemote isn't expensive.
     
  5. Mike Park

    Mike Park New Member

    Joined:
    Dec 22, 2015
    Messages:
    12
    Likes Received:
    0
    Sounds good to me, so you can basically use EventGhost as a PC version of tasker! Could you provide some more detail on how to add the xml into EG as it's not exactly clear on how to do it?
     
  6. inanc

    inanc Member

    Joined:
    Mar 20, 2015
    Messages:
    50
    Likes Received:
    6
    just copy the given xml and paste it in eventghost. There would be a new tab named as "Cortana".
     

Share This Page