Kodi Community Forum

Full Version: Multiple actions on one key press
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way to assign keyboard button (or remote) to list of actions (that would be executed in right order)? For example I'd like to have button that will execute actions:

XBMC.ActivateWindow(MyTV);
Select;
FullScreen;

??
You need to write the XBMC equivalent of a macro.

You do this by writing a Python script to do all the actions you want, then map your keystroke to the Run script action. See http://wiki.xbmc.org/?title=List_of_Built_In_Functions for details.

However writing scripts is somewhat involved and there may be a better way to achieve what you want. For example the ActivateWindow function takes a second argument that specifies the folder to open when you activate your selected window, and this sounds as if it's what you're tring to do. See the Wiki article mentioned above for details.

JR
I have a tangent question off this original thread so i figured better to resurrect this post rather than create a new one.

I have a very specific action that i have mapped to a remote button, for reason too long winded to explain on the key press i run a script that mounts a SMB share and copies over a file locally:
Code:
#!/bin/sh
mount -t cifs -o username=****,password=****,rw,sec=ntlm //*.*.*.*/
cp /storage/File /storage/pictures/

Again why i am doing this isn't important, but i would also like to let the user know the action is being performed:
Code:
Notification(header,message)

all the posts ive found about multi actions to a single button use python scrips... this is where i need help, i have zero experience with that.

Is it possible to run the notification from my existing script?

Thanks,
Wasn't searching the right terms...

Assuming its not depreciated, i think i found my answer
Code:
kodi-send -a "Notification(header,message)"