Skin change dialog
#1
Hi, I'm new to all this coding so go easy.

Is there a way to auto select one of the options in a yes/no kodi dialog using python?

The reason I ask is that I'm trying to force a skin change using JSON (I know!), currently the default "would you like to keep this change" dialog appears when this happens - I want it to be seamless and would prefer this message not to appear OR to auto select yes

I've tried the built in close all dialogs command but when this is executed the skin reverts to the original one, presumably because there wasn't a "yes" input sent.

is there a way to achieve this?

Thanks,
Will
Reply
#2
perhaps sending a click to the button would work?

Code:
xbmc.executebuiltin('SendClick(10100,11)')

where 10100 is the id of the yes/no dialog and 11 the id of the yes button.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Thanks for getting back to me, Didn't know about sendclick() thanks! The only issue is that the yes/no dialog for the "keep skin changes dialog" doesnt appear to have an id looking at the log file: (10019 is the appearance settings window) the dialog is this one ------ Window Init (DialogYesNo.xml) ------

10:53:29 T:9560 INFO: skin loaded...
10:53:29 T:9560 DEBUG: Activating window ID: 10019
10:53:29 T:9560 DEBUG: ------ Window Init (SettingsCategory.xml) ------
10:53:29 T:9560 INFO: Loading skin file: SettingsCategory.xml, load type: KEEP_IN_MEMORY
10:53:29 T:9560 DEBUG: ------ Window Init () ------
10:53:29 T:9560 DEBUG: ------ Window Init (DialogYesNo.xml) ------
10:53:29 T:9560 INFO: Loading skin file: DialogYesNo.xml, load type: KEEP_IN_MEMORY
10:53:30 T:9560 DEBUG: Keyboard: scancode: 0x4b, sym: 0x0114, unicode: 0x0000, modifier: 0x0
10:53:30 T:9560 DEBUG: CInputManager::OnKey: left (0xf082) pressed, action is Left
10:53:32 T:9560 DEBUG: Keyboard: scancode: 0x1c, sym: 0x000d, unicode: 0x000d, modifier: 0x0
10:53:32 T:9560 DEBUG: CInputManager::OnKey: return (0xf00d) pressed, action is Select
10:53:32 T:9560 DEBUG: ------ Window Deinit (DialogYesNo.xml) ------
10:53:33 T:9560 DEBUG: Keyboard: scancode: 0x38, sym: 0x0134, unicode: 0x0000, modifier: 0x100
10:53:33 T:9560 DEBUG: CInputManager::OnKey: alt-leftalt (0x4f0d4) pressed, action is
10:53:33 T:9560 DEBUG: CWinEventsWin32::WndProcWindow is active
10:53:33 T:9560 DEBUG: CWinEventsWin32::WndProc: Focus switched to process C:\Windows\explorer.exe
Reply
#4
it may not be exposed to the log, but 10100 is the id of the yes/no dialog.
see: http://kodi.wiki/view/Window_IDs

it may also work if you specify the window name instead of id:
Code:
xbmc.executebuiltin('SendClick(yesnodialog,11)')
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
works perfectly - thanks a million!
Reply

Logout Mark Read Team Forum Stats Members Help
Skin change dialog0