Python script shortcut possible?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bricklayer Offline
Junior Member
Posts: 25
Joined: Sep 2008
Reputation: 0
Post: #1
Just wondering if it's possible to make a .cut files work with python scripts?

I tried:
Code:
<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!
find quote
Waffa Offline
Posting Freak
Posts: 1,163
Joined: May 2008
Reputation: 7
Location: Netherlands
Post: #2
You can ad a command to to your keymap.xml
See List of Built In Functions

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

xxx= button
find quote
bricklayer Offline
Junior Member
Posts: 25
Joined: Sep 2008
Reputation: 0
Post: #3
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
find quote
Waffa Offline
Posting Freak
Posts: 1,163
Joined: May 2008
Reputation: 7
Location: Netherlands
Post: #4
use :
XBMC.ActivateWindow(window,dir)
find quote
rwparris2 Offline
Team-XBMC Python Developer
Posts: 1,341
Joined: Jan 2008
Reputation: 2
Location: US
Post: #5
bricklayer Wrote: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.

Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
find quote
Temhil Offline
Skilled Python Coder
Posts: 395
Joined: Apr 2008
Reputation: 1
Location: Canada
Post: #6
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

[Image: passionxbmc_signature.png]
_____________________________

Repositories Installer: select and install unofficial repositories / TAC.TV: watch videos on TAC.TV
Installer Passion-XBMC: Download and Install Add-ons (pre-Dharma only)

[Image: project_thin_badge.gif]
find quote
bricklayer Offline
Junior Member
Posts: 25
Joined: Sep 2008
Reputation: 0
Post: #7
Thanks, I'll give it a try.
find quote