Kodi Community Forum

Full Version: how to open audio output device dialogselect as shortcut
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I want to open the audio output device dialogselect through custom icon i tried ActivateWindow(12000) but open dialogselect empty

How to open dialogselect for audio output device? I want to make it easy for my father to open with one click if he changed the TV to another screen.
Why do you want this?
If it's about making switching audio settings easier then the audio profiles addon in the official repo does it in a more user-friendly way than you'll ever manage via links to kodi settings.
I want to be easy for my father when he is switching mini pc from TV to another screen and sometimes earphone not going to setting and look for audio. I want it easy with one click , because he is not familiar with tech  Blush
Audio profiles (or similar) is the way to go then.  It doesn't get any easier (once it's configured) - you might even be able to set it up to not need a click.
What I want to open this window with one click then I will choose which input I want:

Image
Can I do it with python script ?
Have you tried using -

xml:
ActivateWindowAndFocus(id1, id2,item1, id3,item2)
Quote:Activate window with id1, first focus control id2 and then focus control id3. if either of the controls is a container, you can specify which item to focus (else, set it to 0).
(2019-02-25, 20:27)Hitcher Wrote: [ -> ]Have you tried using -

xml:
ActivateWindowAndFocus(id1, id2,item1, id3,item2)
Quote:Activate window with id1, first focus control id2 and then focus control id3. if either of the controls is a container, you can specify which item to focus (else, set it to 0).
Thanks for pointing me to that, I tried this           
 <onclick>ActivateWindowAndFocus(systemsettings,-99,1,-79,0,12000)</onclick>

but stopped highlighted on Audio output device without open the dialog! how can I open the dialog for Audio output device?
I tired also this and still couldn't open the dialogselect           
 <onclick>ActivateWindowAndFocus(systemsettings,-99,0,-79,selectdialog,)</onclick>
Try adding another onclick action to select it -

xml:
<onclick>ActivateWindowAndFocus(systemsettings,-99,1,-79,0,12000)</onclick>
<onclick>Select</onclick>
(2019-02-26, 00:09)Hitcher Wrote: [ -> ]Try adding another onclick action to select it -

xml:
<onclick>ActivateWindowAndFocus(systemsettings,-99,1,-79,0,12000)</onclick>
<onclick>Select</onclick>
 yeah it works..not like what I wanted but it open the dialogselect for audio output device. What I was wanted is to open the audio output device dialog without open the systemsettings page can I still achieve that?
I wouldn't have thought so as it part of the system settings not a separate dialog.
(2019-02-26, 10:46)Hitcher Wrote: [ -> ]system

So can I if I open the dialogselect and choose any of audio source will go to main menu immediately? like return to home page
xml:
<onclick>ActivateWindowAndFocus(systemsettings,-99,1,-79,0,12000)</onclick>
<onclick>Select</onclick>
<onclick>ActivateWindow(Home)</onclick>
(2019-02-26, 13:50)Hitcher Wrote: [ -> ]
xml:
<onclick>ActivateWindowAndFocus(systemsettings,-99,1,-79,0,12000)</onclick>
<onclick>Select</onclick>
<onclick>ActivateWindow(Home)</onclick>
 Yeah it's done...Thanks Blush
Pages: 1 2