Open module from desktop via command line
#1
Is it possible to enter a command line arg to open a specific app within XBMC? Example: I want to create a shortcut on the desktop where XBMC opens directly to Pandora.

Is this possible?
Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
Reply
#2
Guide to launch applications from XBMC
HTPC 1 - Zotac ZBOX ID80U | 4GB RAM | 64GB SSD | Openelec | Confluence
HTPC 2 - Zotac ZBOX ID41U | 4GB RAM | 60GB SSD | Openelec | Confluence
Server - unRAID Server | 3 x 2TB WD Green HDD, 1TB WD Black HDD (Cache) | Sabnzbd | CouchPotato | Sickbeard
Reply
#3
Not launching add-ons from XBMC but launch XBMC from the desktop right into an app. So right now I launch XBMC and then launch pandora within xbmc. I'd like to create a shortcut with command lines that opens xbmc and the pandora add-on immediately.
Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
Reply
#4
No IIRC
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#5
You could create an autoexec.py file in your userdata folder. When XBMC starts it looks to see if there is an autoexec.py, and if there is it executes it. The autoexec.py will need to contain something like:

Code:
import xbmc

xbmc.executebuiltin("RunScript(script.xbmc.pandora)")
Reply
#6
hmmm. Would it be possible to do that conditionally?

I was envisioning being able to create a standard xbmc icon and then a pandora icon. Perhaps I could write a script that would create that script, open xbmc and then delete the script. Therefore, when the pandora shortcut was clicked, the script would run and create the auoexec and run xbmc; When the standard xbmc shortcut is run, then xbmc would open.

I'll play around with it.
Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
Reply
#7
I suppose the cleanest solution would be a command line argument to allow you to pass some sort of information to XBMC, but no such argument exists. However, while it's slightly hacky, it would be easy to do something from a script. For example you could have your script create a file then have autoexec.py read the contents of that file and take some appropriate action.
Reply
#8
Now I'm trying to open Rom Collection Browser using autorun.py and it's still not working. Rom Collection Browser is also a service so perhaps I should use that instead of autorun.py? The documentation said services made autorun.py obsolete in Eden.

ECHO import xbmc > "%appdata%\XBMC\autorun.py"
ECHO xbmc.executescript('C:\Users\allnightpwny\AppData\Roaming\XBMC\addons\script.games.rom.collection.browser\default.py') >> "%appdata%\XBMC\autorun.py"
ping -n 2 127.0.0.1
start "" "c:\Program Files (x86)\XBMC\XBMC.exe"
Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
Reply
#9
I found my issue. Two things:

1) the autoexec.py needs to be in the %appdata%\XBMC\userdata folder not just the %appdata%\XBMC\ folder

2) This script xbmc.executescript('C:\Users\allnightpwny\AppData\Roaming\XBMC\addons\script.gam​es.rom.collection.browser\default.py') is okay EXCEPT the backslash "\" small "a" is an escape sequence. I needed to add extra slashes to get it interpreted properly xbmc.executescript('C:\Users\\allnightpwny\AppData\Roaming\XBMC\\addons\script.gam​es.rom.collection.browser\default.py')

Now it's working perfect!
Frodo Win 8 Pro x64
Fractal Design Node 605 (looks amazing)
i5 3570K, Asus P8Z77V LK
2x80GB Intel 320 SSD, 4TB NAS
GTX 670x2 SLI, 16GB GSkill Ares
Onkyo RC360 with Paradigm piece-by-piece 5.1 build
Nyxboard and AHK full controlled via XBox Controller
Reply

Logout Mark Read Team Forum Stats Members Help
Open module from desktop via command line0