PDA

View Full Version : Python script shortcut possible?


bricklayer
2009-03-03, 00:20
Just wondering if it's possible to make a .cut files work with python scripts?

I tried:
<shortcut>
<path>E:\dash\scripts\example.py</path>
<label>Example</label>
<thumb>E:\dash\scripts\example.jpg</thumb>
</shortcut>

And it just reboots XBMC when I click on it :sad:

Or is it possible to launch a script from outside the "scripts" directory? They don't show up if I place it in "Programs".

Thanks in advance!

Waffa
2009-03-03, 00:27
You can ad a command to to your keymap.xml
See List of Built In Functions (http://xbmc.org/wiki/index.php?title=List_of_Built_In_Functions)

You need:
<xxx>XBMC.RunScript(script[,args])</xxx>

xxx= button

bricklayer
2009-03-03, 00:38
I see what you're saying, but I may end up with allot of scripts. I'm basically trying to integrate them into the "My Programs" view. So that I can launch scripts from within the "Programs" view.

I don't necessary want to dedicate a button to this. I need more of a linking system. Or like a shortcut to an xbe that runs a script that's passed to it?

Thanks

Waffa
2009-03-03, 00:42
use :
XBMC.ActivateWindow(window,dir)

rwparris2
2009-03-03, 01:13
I see what you're saying, but I may end up with allot of scripts. I'm basically trying to integrate them into the "My Programs" view. So that I can launch scripts from within the "Programs" view.

I don't necessary want to dedicate a button to this. I need more of a linking system. Or like a shortcut to an xbe that runs a script that's passed to it?

Thanks
If you're good at scripting, just make a plugin that scrapes your scripts directory, then lists & launches scripts. Add said plugin as a source.

Temhil
2009-03-03, 02:26
Hi,

I created quickly a program plugin allowing to see and launch your script from the program plugin window.
It is available here: http://passion-xbmc.org/tpmod/?dl=item144
Or using the script installer Passion XBMC under plugins->programs

bricklayer
2009-03-04, 01:15
Thanks, I'll give it a try.