Author Topic: XBMC running plugins/scripts  (Read 18857 times)

0 Members and 1 Guest are viewing this topic.

abrenoch

  • Jr. Member
  • **
  • Posts: 14
  • Karma: 1
    • View Profile
XBMC running plugins/scripts
« on: July 29, 2011, 02:41:53 AM »
Hi, just want to say voxcommando is AWESOME and the possibilities it presents are are great!

I am working on making some custom commands.. One of which I would like to be able to launch the 'youtube' xbmc plugin.  Launching it would be nice, but my ultimate goal is being able to search as well from a single command.  So far I havent even really had luck starting the youtube video plugin from a command, and am still learning the way XBMC handles different commands.

As far as launching a script/addon/plugin (do these each need to be handled differently BTW?) I had found a tip in another forum post recommending using:

Code: [Select]
XBMC.Execbuitin|RunScript(plugin.video.youtube)
With no real success.. I'm not even sure that is a valid plugin ID.. I have been trying other methods such as using "plugin://plugin.video.youtube" and a couple others, as well as using the full plugin path, but honestly there have been several different ways I have come across and none of them had been explained very well..

So would anybody have any tips or suggestions initiating the youtube plugin?  Is there any sort of tools I can use that help identify window/button IDs (aside from the XBMC wiki)?  I'm still a bit green to the process but would like to build/share some cool ideas I have been having!

« Last Edit: July 29, 2011, 08:28:44 PM by Wanilton »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2318
  • Karma: 47
    • View Profile
Re: XBMC running plugins/scripts
« Reply #1 on: July 29, 2011, 07:18:02 AM »
Hi, just want to say voxcommando is AWESOME and the possibilities it presents are are great!

I am working on making some custom commands.. One of which I would like to be able to launch the 'youtube' xbmc plugin.  Launching it would be nice, but my ultimate goal is being able to search as well from a single command.  So far I havent even really had luck starting the youtube video plugin from a command, and am still learning the way XBMC handles different commands.

As far as launching a script/addon/plugin (do these each need to be handled differently BTW?) I had found a tip in another forum post recommending using:

Code: [Select]
XBMC.Execbuitin|RunScript(plugin.video.youtube)
With no real success.. I'm not even sure that is a valid plugin ID.. I have been trying other methods such as using "plugin://plugin.video.youtube" and a couple others, as well as using the full plugin path, but honestly there have been several different ways I have come across and none of them had been explained very well..

So would anybody have any tips or suggestions initiating the youtube plugin?  Is there any sort of tools I can use that help identify window/button IDs (aside from the XBMC wiki)?  I'm still a bit green to the process but would like to build/share some cool ideas I have been having!


Hi abrenoch,
welcome to VC Forum.
I am not a specialist for XBMC but you have a fault in your code (Execbuiltin). Correct code: XBMC.Execbuiltin  Runaddon(plugin.video.youtube)  ;)

Kalle
« Last Edit: July 29, 2011, 08:28:58 PM by Wanilton »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC running plugins/scripts
« Reply #2 on: July 29, 2011, 10:48:40 AM »
Hi, just want to say voxcommando is AWESOME and the possibilities it presents are are great!

I am working on making some custom commands.. One of which I would like to be able to launch the 'youtube' xbmc plugin.  Launching it would be nice, but my ultimate goal is being able to search as well from a single command.  So far I havent even really had luck starting the youtube video plugin from a command, and am still learning the way XBMC handles different commands.

As far as launching a script/addon/plugin (do these each need to be handled differently BTW?) I had found a tip in another forum post recommending using:

Code: [Select]
XBMC.Execbuitin|RunScript(plugin.video.youtube)
With no real success.. I'm not even sure that is a valid plugin ID.. I have been trying other methods such as using "plugin://plugin.video.youtube" and a couple others, as well as using the full plugin path, but honestly there have been several different ways I have come across and none of them had been explained very well..

So would anybody have any tips or suggestions initiating the youtube plugin?  Is there any sort of tools I can use that help identify window/button IDs (aside from the XBMC wiki)?  I'm still a bit green to the process but would like to build/share some cool ideas I have been having!



basically if it is a script you use RunScript() and if it is a plugin you use RunAddon()

to see what the addon is actually called and tell if it is a script or a plugin you can look in C:\Users\<yourusername>\AppData\Roaming\XBMC\addons

here you will see a folder called plugin.video.youtube

another very useful way to find out how to call addons is to first add it as a favourite in xbmc, and then look in your favourites.xml file found in C:\Users\<yourusername>\AppData\Roaming\XBMC\userdata
« Last Edit: July 29, 2011, 08:29:10 PM by Wanilton »

abrenoch

  • Jr. Member
  • **
  • Posts: 14
  • Karma: 1
    • View Profile
Re: XBMC running plugins/scripts
« Reply #3 on: July 29, 2011, 11:55:36 AM »
basically if it is a script you use RunScript() and if it is a plugin you use RunAddon()

to see what the addon is actually called and tell if it is a script or a plugin you can look in C:\Users\<yourusername>\AppData\Roaming\XBMC\addons

here you will see a folder called plugin.video.youtube

another very useful way to find out how to call addons is to first add it as a favourite in xbmc, and then look in your favourites.xml file found in C:\Users\<yourusername>\AppData\Roaming\XBMC\userdata

Thanks for the tip! I figured the issue would be something along these lines. I have also just noticed another user posted some commands and one does happen to include a script to launch youtube (from what it seems to do in the code anyway, don't have access to my PC to test it)

Code: [Select]
<cmdType>XBMC.ExecBuiltin</cmdType>
<cmdString>ActivateWindow(10025,plugin://plugin.video.youtube/,return)</cmdString>

I'm going to give this a try as soon as I can.. And thanks for the advice on using the favorites.xml, I was wondering if that would work and would have probably been my eventual course of action.. I'm going to see if it will work to directly trigger the search keyboard screen as well.. Just curious does voxcommando have the ability to freely dictate text? Or is this something I would have to initiate externally through windows voice recognition or something?

Quote
Hi abrenoch,
welcome to VC Forum.
I am not a specialist for XBMC but you have a fault in your code (Execbuiltin). Correct code: XBMC.Execbuiltin  Runaddon(plugin.video.youtube)  

Kalle

Thanks for the response Kalle, that actually was not the code verbatim, but just typed from memory.. Good catch though! Hopefully the newer code I found will help!
« Last Edit: July 29, 2011, 08:29:37 PM by Wanilton »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC running plugins/scripts
« Reply #4 on: July 29, 2011, 12:25:00 PM »
Kalle's code will work and so should the ActivateWindow command.

I was not able to get it to go directly to submenus though.  It probably has something to do with the way the strings are UrlEncoded.  (i.e. &  is &amp;   " is &quot; etc)

Yes you can do dictation directly with VC.  Just create a payload dictation.  For an example, you can do the following:

click "edit" to open the "Command Tree Editor"
click the "planet" icon on the right, next to the words "theBin.xml"

this will load some sample commands from the website.  Look for the pandorabot group.

Drag the pandorabot group to the left page to add it to you tree and then take a look at it.

In the pandorabot command the payload (dictation) is being send to the pandorabot.  You could instead send the dictation to the keyboard using sendkeys  {1}.  The hard part will be getting the youtube plugin to open the search menu first.
« Last Edit: July 29, 2011, 08:29:56 PM by Wanilton »

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2318
  • Karma: 47
    • View Profile
Re: XBMC running plugins/scripts
« Reply #5 on: July 31, 2011, 06:04:55 PM »
Hi, just want to say voxcommando is AWESOME and the possibilities it presents are are great!

I am working on making some custom commands.. One of which I would like to be able to launch the 'youtube' xbmc plugin.  Launching it would be nice, but my ultimate goal is being able to search as well from a single command.  So far I havent even really had luck starting the youtube video plugin from a command, and am still learning the way XBMC handles different commands.

As far as launching a script/addon/plugin (do these each need to be handled differently BTW?) I had found a tip in another forum post recommending using:

Code: [Select]
XBMC.Execbuitin|RunScript(plugin.video.youtube)
With no real success.. I'm not even sure that is a valid plugin ID.. I have been trying other methods such as using "plugin://plugin.video.youtube" and a couple others, as well as using the full plugin path, but honestly there have been several different ways I have come across and none of them had been explained very well..

So would anybody have any tips or suggestions initiating the youtube plugin?  Is there any sort of tools I can use that help identify window/button IDs (aside from the XBMC wiki)?  I'm still a bit green to the process but would like to build/share some cool ideas I have been having!


Hi abrenoch,
try this command. It opens search in the XBMC youtube plugin and you can then say: type "Pink Floyd have a cigar" or what ever and to start seach, say: "Enter"
I'm not sure if it works for you, because I'm probably not the same version XBMC, but you can edit the commands.
The only problem is, that always saves the last plugin results, and if the database is not empty, the search-input-window do not open. How to solve the problem I have not found out yet. You must clear the seachresults with a right mouse click and select "delete search results"

Kalle
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC running plugins/scripts
« Reply #6 on: July 31, 2011, 09:46:31 PM »
Hi Kalle.  I think there are some problems with your actions.  They do not work for me, and they do not look correct, except the last one (send enter).

I am of course using the latest version of VC (0.894)

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2318
  • Karma: 47
    • View Profile
Re: XBMC running plugins/scripts
« Reply #7 on: August 01, 2011, 04:41:48 AM »
Hi Kalle.  I think there are some problems with your actions.  They do not work for me, and they do not look correct, except the last one (send enter).

I am of course using the latest version of VC (0.894)
Hi James, I use Ver. 0892 and it works on my xbmc (last alpha version from Wanilton). I have create a favorite for youtube search in XBMC. Then read the data in favorite.xml (from you as described), thats all.

Oh, I forgot to say that XBMC must be run as active window (VC in background)  :bonk

Kalle
« Last Edit: August 01, 2011, 05:05:16 AM by Kalle »
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC running plugins/scripts
« Reply #8 on: August 01, 2011, 09:10:56 AM »
something must have happened when you saved or uploaded it then.

Code: [Select]
<action>
                <cmdType>XBMC.Send</cmdType>
                <cmdString>ExecBuiltinActivateWindow(10025,&amp;quot;plugin://plugin.video.youtube/?path=/root/search/new&amp;amp;action=search&amp;amp;&amp;quot;)</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>

there is no such command in xbmc as: ExecBuiltinActivateWindow

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2318
  • Karma: 47
    • View Profile
Re: XBMC running plugins/scripts
« Reply #9 on: August 01, 2011, 10:54:34 AM »
something must have happened when you saved or uploaded it then.

Code: [Select]
<action>
                <cmdType>XBMC.Send</cmdType>
                <cmdString>ExecBuiltinActivateWindow(10025,&amp;quot;plugin://plugin.video.youtube/?path=/root/search/new&amp;amp;action=search&amp;amp;&amp;quot;)</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>

there is no such command in xbmc as: ExecBuiltinActivateWindow
ok, I'm looking for later
***********  get excited and make things  **********

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC running plugins/scripts
« Reply #10 on: August 01, 2011, 12:32:29 PM »
this seems to work for me, but you need to be running VC on the same machine as XBMC

see attached xml

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2318
  • Karma: 47
    • View Profile
Re: XBMC running plugins/scripts
« Reply #11 on: August 01, 2011, 01:57:02 PM »
this seems to work for me, but you need to be running VC on the same machine as XBMC

see attached xml
Hi James,
your xml work fine, but only for the first time when  I used.
At second time it open not the Virtual Keyboard, but is not important for me, because I do not much use youtube in XBMC.
I just wanted to test for user "abrenoch".
***********  get excited and make things  **********

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: XBMC running plugins/scripts
« Reply #12 on: August 23, 2012, 11:39:37 AM »
Anyone have a more finalized version of this, like the thread seemed to go, I think a youtube plugin call is  agreat idea and like james insinuated the dictation search is an awesome touch otherwise yeah not that helpful to have VC and then type some gawdy search.

So if i was in XBMC and said Luanch Youtube or SEARCH YOUTUBE VOXCOMMANDO Tutorials, how awesome would that be?

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: XBMC running plugins/scripts
« Reply #13 on: August 23, 2012, 12:35:25 PM »
This script works perfectly for me every time, but I had to add a vc.pause of about 2 seconds in front of the sendkeys action, so that it would wait for the search window to appear.

vulcanjedi

  • $upporter
  • Sr. Member
  • *****
  • Posts: 213
  • Karma: 8
    • View Profile
Re: XBMC running plugins/scripts
« Reply #14 on: August 23, 2012, 12:51:37 PM »
is the sendkeys a Windows sendkeys or an XBMC sendkeys? I think you mentioned your variant would require windows only, I guess I was hoping could encapsulate it all in the API call, as I still haven't committed to running a unified windows box as of yet with both VC and XBMC running on the same node.