Author Topic: Launch Pandora via VoxCommando  (Read 10559 times)

0 Members and 1 Guest are viewing this topic.

sirs2k

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Launch Pandora via VoxCommando
« on: May 05, 2014, 03:25:46 PM »
Hi James,

I've been stuck at it for hours and searched everywhere but no joy. A couple of results came up but they were scripts.

I'm tying to achieve this by the commands.

So far I've tried different versions of XJson.Raw>Addons.ExecuteAddon>script.xbmc.pandora

But nothing seems to work.
Just upgraded to Gotham (something tells me I shouldn't have because I probably lost some VOX functionality)?


Thanks for your great work
« Last Edit: May 05, 2014, 03:34:02 PM by sirs2k »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #1 on: May 05, 2014, 03:39:52 PM »
So far I've tried different versions of XJson.Raw>Addons.ExecuteAddon>script.xbmc.pandora

Just to clarify, are you saying that you already tried:
Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="388" name="launch pandora" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Addons.ExecuteAddon&amp;&amp;"addonid":"script.xbmc.pandora"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
</command>

? I ask because I'm not seeing the "addonid" part (I'm basing this on the VC XBMC Frodo config's "download subtitles" plugin example)

... and from where are you finding the "script.xbmc.pandora"? In the Pandora addon documentation, I'm seeing "script.audio.pandora". So maybe try that.
« Last Edit: May 05, 2014, 03:47:32 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #2 on: May 05, 2014, 03:48:54 PM »
If you still can't get it to work using the actual addon ID, please post the command xml that you are trying to use.  It speeds things up for us a lot to see the actual command.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #3 on: May 05, 2014, 04:00:00 PM »
The addon id usually matches the folder name as found in this directory:

C:\Users\USERNAMEHERE\AppData\Roaming\XBMC\addons

But what I find is most helpful for figuring out how to call addons in XBMC (because there are different types of addons that must be called differently) is to create a favourite for it in XBMC and then go look at the favourites.xml that XBMC creates in C:\Users\USERNAMEHERE\AppData\Roaming\XBMC\userdata

This won't tell give you the exact formatting per se because it isn't using JSON but you will see the correct addon ID and also see if it needs to be executed as a script, or opened using activatewindow.

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #4 on: May 05, 2014, 04:51:07 PM »
I agree with James, but also I've had good luck just opening the addon.xml and the script/addon ID is usually in there.
In this case
I had Frodo install and just downloaded the Gotham install
addon id="script.audio.pandora"
Also Gotham literally just got released yesterday, and seems like playback had an issue on early release so you many want to reDL incase you have any other issue, per the main DL page:
Quote
NOTICE: In case you downloaded XBMC 13.0 release on Sunday morning May 4, please re-download and install it again.
Video playback may have been affected in that version.
The addon id usually matches the folder name as found in this directory:

C:\Users\USERNAMEHERE\AppData\Roaming\XBMC\addons

But what I find is most helpful for figuring out how to call addons in XBMC (because there are different types of addons that must be called differently) is to create a favourite for it in XBMC and then go look at the favourites.xml that XBMC creates in C:\Users\USERNAMEHERE\AppData\Roaming\XBMC\userdata

This won't tell give you the exact formatting per se because it isn't using JSON but you will see the correct addon ID and also see if it needs to be executed as a script, or opened using activatewindow.
« Last Edit: May 05, 2014, 05:27:42 PM by vulcanjedi »

sirs2k

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #5 on: May 05, 2014, 11:03:28 PM »
Appreciate the very prompt assistance guys,

I actually never tried to put any code simply because I had no idea how to do it. Now I do though (it goes into voicecommands.xml in root install directory)

I've always just been trialing in LCB (check out the attachments)
Surprisingly also "search youtube", "download subtitles" even "Exit XBMC" aren't working for me while the others are working.


Thanks Volcan will re-download another copy of gotham.

Looking at the voicecommands.xml file this is what it looks like

Code: [Select]
</commandGroup>
    <commandGroup open="True" name="Test" enabled="True" prefix="" priority="0" requiredProcess="" description="">
        <command id="388" name="launch pandora" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>XJson.Raw</cmdType>
                <cmdString>Addons.ExecuteAddon&amp;&amp;"addonid":"script.xbmc.pandora"</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>Let me see</phrase>
        </command>
    </commandGroup>

Downgraded to Frodo 12.3 still no joy.

Thanks guys
« Last Edit: May 06, 2014, 12:49:37 AM by sirs2k »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #6 on: May 06, 2014, 08:34:35 AM »
We are all happy to help.  ;D

Please read our answers a bit more carefully after you ask for help.  You are still using the wrong plugin ID after we specifically pointed that out to you.  That will probably solve your problem.

Please read the forum rules.  There you will see information about how to share xml (which is super easy), as well as other important guidelines that will help you to request support efficiently.  There is a link to the rules in my signature.  Some of these rules apply to troubleshooting VoxCommando specifically.

You don't need to go into your voicecommands.xml file manually, and it is not recommended to do it this way because you end up with improper xml that we can't use without manually editing.
« Last Edit: May 06, 2014, 08:56:12 AM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #7 on: May 06, 2014, 08:41:42 AM »
By the way,

I have not upgraded yet myself, but there are no known compatibility issues between VoxCommando and Gotham.  Gotham may have some of its own teething issues, but I don't think they changed anything in that will affect VoxCommando specifically.

I will be upgrading soon now that Gotham has been released.  It seems like it went from alpha to final release very quickly this time...

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #8 on: May 06, 2014, 10:50:32 AM »
I've always just been trialing in LCB (check out the attachments)
Surprisingly also "search youtube", "download subtitles" even "Exit XBMC" aren't working for me while the others are working.

From your screen capture, there's no indication that the youtube and download subtitles commands didn't work. The only command indicating a problem is the orange line.

[Edit: I see the youtube line looks like it may be grey -- I didn't notice that before, but that's not an error per se.]

In general, if you roll over messages in the history panel, you'll get a popup message providing more details if there are problems. You can also enable logging and look at that file, as well as post the full log to provide more information. http://voxcommando.com/mediawiki/index.php?title=Log

Of course, you would need to have the XBMC subtitles addon and youtube addon already enabled in XBMC for those commands to work, so you may want to double-check that those are in fact enabled within XBMC.

The "Exit XBMC" command is not captured in your image. I'm not sure why that wouldn't work for you.

Can I ask, (a) what version of VC are you using, and (b) did you follow the video tutorial or wiki documentation for installing the XBMC (Frodo) configuration of VC? In particular, the part about installing the VoxTools addon within XBMC? http://voxcommando.com/mediawiki/index.php?title=Installation_XBMC_Frodo.

I have now enabled the Pandora addon in my XBMC Frodo installation and created a VC command per our suggestions above; it seems to be working. I can't really test it because I live in Canada.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="404" name="run Pandora" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Addons.ExecuteAddon&amp;&amp;"addonid":"script.audio.pandora"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>run Pandora</phrase>
</command>
« Last Edit: May 06, 2014, 03:16:44 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #9 on: May 06, 2014, 09:10:46 PM »
I just tested an old Frodo instance on my Mac. Nime5ter's command works brilliantly. On a virgin run you'll be prompted to configure the addon (logon, and I set to auto play last station), if you didnt already after its installation.
closed / reopened XBMC. 'run pandora' instantly streams last station.
Upgraded to  Gotham. Again no issues, I'm on VC2, v1.9.3.1 atm.
I live in the States and audio played immediately so the addon/plugin works. VC works. Command works. Stream works.
This took about 3 mins, thanks I kind of like this command/addon combination :)

From your screen capture, there's no indication that the youtube and download subtitles commands didn't work. The only command indicating a problem is the orange line.

[Edit: I see the youtube line looks like it may be grey -- I didn't notice that before, but that's not an error per se.]

In general, if you roll over messages in the history panel, you'll get a popup message providing more details if there are problems. You can also enable logging and look at that file, as well as post the full log to provide more information. http://voxcommando.com/mediawiki/index.php?title=Log

Of course, you would need to have the XBMC subtitles addon and youtube addon already enabled in XBMC for those commands to work, so you may want to double-check that those are in fact enabled within XBMC.

The "Exit XBMC" command is not captured in your image. I'm not sure why that wouldn't work for you.

Can I ask, (a) what version of VC are you using, and (b) did you follow the video tutorial or wiki documentation for installing the XBMC (Frodo) configuration of VC? In particular, the part about installing the VoxTools addon within XBMC? http://voxcommando.com/mediawiki/index.php?title=Installation_XBMC_Frodo.

I have now enabled the Pandora addon in my XBMC Frodo installation and created a VC command per our suggestions above; it seems to be working. I can't really test it because I live in Canada.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="404" name="run Pandora" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <cmdString>Addons.ExecuteAddon&amp;&amp;"addonid":"script.audio.pandora"</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>run Pandora</phrase>
</command>

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #10 on: May 06, 2014, 10:29:28 PM »
I tested this on Gotham and it works too.  At least it opens Pandora, but I can't actually go beyond that in Canada.

I did notice that Gotham has changed how the "download subtitles" addon works.  I will post an alternate command soon that works with Gotham.

I did not test youtube yet.

I should also mention that Gotham has changed the filenames for the databases, so if you are using the xSQL plugin to generate your payloadXML on Gotham, you will need to adjust the plugin settings to point to the newer files.  Usually you can just browse to the same folder and select the one with the highest number.  I believe this is mentioned in the installation video for Frodo, but for most people the defaults would have worked for Frodo without any modifications, so if you are upgrading it would be an easy thing to miss, especially since XBMC will leave the old files in place and your genXML will seem to work, but it will be using old data!

sirs2k

  • Jr. Member
  • **
  • Posts: 24
  • Karma: 0
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #11 on: May 10, 2014, 08:28:24 AM »
Hey guys,

Sorry I haven't replied, just wanted to let you know that code worked a treat! Thanks Vulcan!

James, I admit I didn't read the all the info I could, sorry mate.

HomieTheClown

  • Jr. Member
  • **
  • Posts: 42
  • Karma: 0
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #12 on: July 27, 2014, 12:27:16 PM »
Hi,

Just joined the community yesterday. Love the program but it's been tough to program so far.  I spent 8 hours yesterday trying to figure out a few things. Only got thing to work.  I have many questions but I want to work on one problem at a time.  

I'm an XBMC user and want to see how what all I can do with the program.  I'm using VC version 2.   I downloaded the MSP 11 program and a few TTS voices.  Oh I run the VoxCommanderSP.exe version.  

So I can't seem to run my pandora add-on in XBMC.  I took a screenshot of the error message I got.  You can also see the exact line that I have in the program's history view.  I also attached two different xml pics.  Now here's one of the MANY things that's got me stumped.  When I try to make a new command in the command builder program(edit button), I pick XJson.Raw and then enter the parameters in.  What I've noticed is, when I open it up to see code, it has <param>Code</param> instead of <cmdString>code</cmdString> which is what I use guys using as an example when you were trying to help the OP out.  

So I don't know what I'm doing wrong. Is he using an older version.  His original post was in May of this year so I figured he's using the newest program.  Does this make any sense lol.  It's driving me crazy.  There's so much more I wanna do but I'm trying to do one thing at a time.   Oh for the record. I edited the xml file and deleted the <param></param> boxes and changed them to the cmdString boxes. (See pics below).  Still gave me the same message.  Or it might have given me the error message "method not found" which I don't understand either. I'll be around working on the program if you have questions.  I hope you can help. :bonk

OH PS.  I checked the addon.xml folder for my pandora app and the id according to what I saw is what I have in my xml (script.xbmc.pandora).  No as far as the last section.  I've tried both script.xbmc.pandora & script.audio.pandora. Both don't seem to work.   Oh one last thing...I hope... I don't under what a payload is yet. I don't know if that matters for this problem.I haven't researched anything about it at this time. 
« Last Edit: July 27, 2014, 12:37:04 PM by HomieTheClown »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #13 on: July 27, 2014, 01:22:57 PM »
Welcome Homie,

Thanks for the screenshots, that's helpful.

1) The First Rule of VoxCommando: Do not edit the voicecommands.xml file directly. Edit all commands in the command tree editor.

2) Yes! You're right, and very observant. My xml above is from an earlier version of VC, which is why it looks different, but it doesn't matter. VC2 is backwards compatible, which means you can import older xml and it will work (and be updated to the new format when you save your tree).

3) To use commands that you find on the forum, you can simply select the text in the code box, copy it, and then paste it directly into a group in your command tree. You don't need to re-create the command yourself. See: http://voxcommando.com/mediawiki/index.php?title=XML_on_the_forum

4) It looks like you are not getting the syntax right when you are trying to re-create the command. Instead, try copying the xml above (http://voxcommando.com/forum/index.php?topic=1559.msg13599#msg13599) as per the instructions in #3 and let us know if that works.
« Last Edit: July 27, 2014, 01:35:23 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #14 on: July 27, 2014, 01:34:16 PM »
You haven't told us what version of XBMC you are using but I'm using Gotham 13.1 and the correct addon id is not

script.xbmc.pandora

it is script.audio.pandora which is what we use in the xml posted above.

Even if you were using the correct addon id which I doubt, you have written the second parameter as

Code: [Select]
"script.xbmc.pandora":"script.xbmc.pandora"
when it should actually be

Code: [Select]
"addonid":"script.xbmc.pandora"
or more likely using our addon id:

Code: [Select]
"addonid":"script.audio.pandora"
Who knows, maybe you are using XBMC Frodo, or some older version of pandora and you are correct about the addon id, but if it does not work then be sure to try the one we have suggested.

HomieTheClown

  • Jr. Member
  • **
  • Posts: 42
  • Karma: 0
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #15 on: July 27, 2014, 01:47:03 PM »
Ty fellas!

Thank for responding so fast. I just figured it out finally after looking at one of your other post about downloading subtitles.  I'm using Frodo 12.2.  My problem was the "addonid" field.

After reading the post above I thought the "addonid" field was supposed to be filled in until I saw the download subtitles addon section.  Then I saw you simply left it alone so my param line read as follows
 

<param>Addon.ExecuteAddon</param>
<param>"addononid":"script.xbmc.pandora</param>

I got more questions about other functions, but I want to try to figure it out first before I waste your time. Afterall it's Sunday. :) Thanks again bud.
« Last Edit: July 27, 2014, 01:50:03 PM by HomieTheClown »

HomieTheClown

  • Jr. Member
  • **
  • Posts: 42
  • Karma: 0
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #16 on: July 27, 2014, 01:55:41 PM »
Hey

I had one more quick question regarding Pandora. Is there a way to tell VC to start one of your Pandora stations when you open it?

HomieTheClown

  • Jr. Member
  • **
  • Posts: 42
  • Karma: 0
    • View Profile
Re: Launch Pandora via VoxCommando
« Reply #17 on: July 27, 2014, 02:51:42 PM »
I managed to get it to work but I wanted to show what I did because I think it's kind of hokey how I did it.  Surely there's got to be a better way. (check out the photo)

I basically wanted to have P open up and start playing my 80's station so I put a bunch of up arrows and 1 second pauses to get it to work.  In the beginning I had to add a focus command to focus on the XBMC window or it wouldn't start moving up the station list. Is there a better way of doing this? 

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #18 on: July 27, 2014, 03:34:19 PM »
Hey, if it works, it works. :)

Sometimes, keyboard emulation is the only way.

Ideally, the Pandora addon should allow us to pass it a parameter when we call it, but you would have to ask the developer of the addon about that. As far as we can tell, this addon doesn't accept any parameters, but who knows.

I did figure out another way, also hackish, but it works. James noticed that the addon has a setting where you can get it to automatically load the last station you played on launch. If you select it, then that station's ID is stored in the addon's user settings file.

It would be nice if we could adjust that setting using a json method, but nothing is jumping out in the documentation. However, I was able to create a command that changes the station by overwriting that settings.xml file, replacing the old station ID with a new one. Hackish, but it worked on my tests. Not sure how robust a solution it is.

A bigger problem, however, is getting the station IDs for all of your stations. Those IDs are the same numbers that you see when you're logged in on the Pandora website and choose one of your stations. If there is a Pandora page that lists all of your stations on one page, in theory you could scrape that to get all the IDs. I don't know much about the service, as I don't use it.

There's no obvious way to get that level of data from XBMC either. (I'm not saying it's impossible -- maybe on the XBMC forum can help you with that.)

But if you want to create your payload XML list manually (or at least create a small payloadXML file with a few of your favourite Pandora stations), here's the command that I used to change between my two stations. It requires an understanding of payloads that you mention you don't yet have.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.0.0.3-->
<command id="471" name="play Pandora station" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Addons.ExecuteAddon</param>
      <param>"addonid":"script.audio.pandora"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>File.Read</cmdType>
    <params>
      <param>C:\Users\[your user name]\AppData\Roaming\XBMC\userdata\addon_data\script.audio.pandora\settings.xml</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegExReplace</cmdType>
    <params>
      <param>"last_station_id".value="\d*"</param>
      <param>"last_station_id" value="{1}"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>File.Write</cmdType>
    <params>
      <param>C:\Users\[your user name]\AppData\Roaming\XBMC\userdata\addon_data\script.audio.pandora\settings.xml</param>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>play pandora station</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">XbmcPayloads\pandora.xml</payloadFromXML>
</command>

You will need to:

1. Edit the file path to your own user path in the command. (In 2 of the command actions -- File.Read, and File.Write)
2. Enable the addon setting to "launch last station played" or whatever it says, in XBMC.
3. Create your own Pandora.xml payload xml file. That's the file that associates your radio station names with the IDs that XBMC needs in order to select the right station.

Start by copying and pasting my command into your tree. Save your tree, exit the command tree editor and then go back in ("Edit"). You'll get a message saying you're missing the payload xml file "pandora.xml". The command will be there, but the pandora.xml payload line will be red.

Double-click the red line, click "new/edit", and start creating your payload xml file. The radio station IDs are the "value", the radio station names or whatever are the "phrase". If you want to have different ways of asking for the same station, put commas between your phrases.

More on payloads:
Payloads: http://voxcommando.com/mediawiki/index.php?title=Payloads
Last section of: http://voxcommando.com/mediawiki/index.php?title=Logical_Command_Builder
« Last Edit: July 27, 2014, 04:21:50 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #19 on: July 27, 2014, 03:44:41 PM »
Screen shot of possible use. Obviously you'll want to save the payload xml file that you've created before exiting the payload xml editor windows.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7715
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Launch Pandora via VoxCommando
« Reply #20 on: July 27, 2014, 03:48:03 PM »
Nime5ter's method is better but if you still want to use keyboard emulation you can use either

XJson.Btn.KB
 or
XJson.Raw     Input.ExecuteAction

I doubt that you need a full second pause between keypresses, but you might still need a pause after opening pandora.

Try this.  It should open pandora and then press up 4 times.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.0.0.3-->
<command id="426" name="open pandora" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Addons.ExecuteAddon</param>
      <param>"addonid":"script.audio.pandora"</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>XJson.Raw</cmdType>
    <params>
      <param>Input.ExecuteAction</param>
      <param>"action":"up"</param>
    </params>
    <cmdRepeat>4</cmdRepeat>
  </action>
  <phrase>open pandora</phrase>
</command>
« Last Edit: July 28, 2014, 02:11:54 PM by jitterjames »