Kodi Community Forum

Full Version: autohotkey script to RunAddon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been trying to figure out a way to use autohotkey (a windows scripting language) to execute the RunAddon function within the currently running XBMC instance (in other words launch an addon). Does anyone have any advice on how to do this? I have considered trying JSON_RPC using one of the below:
curl: http://curl.haxx.se
or
HTTPRequest: http://www.autohotkey.com/forum/viewtopi...TTPRequest

I might be wrong but JSON_RPC doesn't look like it supports anything similar to RunAddon. Has anyone ever faced this problem before and, if so, did you find a solution?

-cs
What exactly are you trying to do?
Scripting in XBMC can be powerful and AHK might not be neccessary...

cheers
i am trying to create an external application/script that, when executed, will launch a specific addon in the current XBMC session.
The HTTP API is probably the easiest way to do this because you can use curl or any other HTTP client from the external script. See http://wiki.xbmc.org/index.php?title=Arc...r_HTTP_API for details. You can map a key of your choice to open the Add-on then use the SendKey command.

JR
Well normally in a AHK script you would code something like this...
Code:
; Command line
#Space::Run "C:\cygwin\Console-2.00b122-Beta\Console2\Console.exe"
Return

So you would just need to know where the file is so you could script the full path into the code...but add-ons are coded in python so that could complicate things...I'm in the middle of setting up a raid config on my xbmc server so I cant test what opening the addon with python does outside of xbmc while its running or while its not...my guess is you would be better off using any skin like transparency which lets you put addons on your home screen.
in the wiki it says to use the JSON RPC interface instead (because the HTTP api is deprecated). does the JSON RPC interface support RunAddon? Where could I look to find out more information on this?
When the keys were combined, a script was run and copied from the link to the video from the clipboard (windows7) and ran with the link type.
autohotkey kodi jsonrpc  %Clipboard%

http://192.168.1.7:8080/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"Player.Open","params":{"item":{"file":"%Clipboard%"}}}