Kodi Community Forum
Need help creating submenu for shutdown timers - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Skins Support (https://forum.kodi.tv/forumdisplay.php?fid=67)
+--- Thread: Need help creating submenu for shutdown timers (/showthread.php?tid=310596)



Need help creating submenu for shutdown timers - fixiie - 2017-03-27

So i have the "shortcut" files which triggers a timer, all from 10minutes all the way to 300 minutes. I want to put these on a submenu to my "shutdown" button. I've tried addons like advanced launcher, but it doesn't seem to wanna do what i want at all.

So my question (hopefully a easy one) is; how do i get my kodi to open files from my computer in a submenu category?


example of how it should look:

--- Shutdown ---
- 10 Min - - 60 Min - - 120 Min - - 180 Min - - 240 Min - - 300 Min - - Stop -

help pls! Smile

thanks in advance


RE: Need help creating submenu for shutdown timers - fixiie - 2017-03-27

bump Tongue


RE: Need help creating submenu for shutdown timers - PatK - 2017-03-27

This is really a skin issue, and you're looking for a skin modification. The windows forum is not the best place for this issue, there doesn't seem to be a GUI solution, so it's looks like you might have to get your coding hat.

Moving this thread to 'skinning'.


RE: Need help creating submenu for shutdown timers - smitchell6879 - 2017-03-27

So which do u need help with the sub menu for the shutdown button? Or opening a program? Two totally different questions....

The shutdown but and timer opens can me solved simply but you have to alter .XML and we will need more info before even going into detail on how... The opening a program on you computer I personally don't want to speak on as there many different os and I am not sure the correct way for all.


RE: Need help creating submenu for shutdown timers - fixiie - 2017-03-27

(2017-03-27, 18:45)smitchell6879 Wrote: So which do u need help with the sub menu for the shutdown button? Or opening a program? Two totally different questions....

The shutdown but and timer opens can me solved simply but you have to alter .XML and we will need more info before even going into detail on how... The opening a program on you computer I personally don't want to speak on as there many different os and I am not sure the correct way for all.

I dont really care which method is used, my end goal is the same. To get a button on the home menu called "shutdown" that has 7 submenus that shuts the computer off on a timer. I've altered with the xml before bit, so i know bit about it if that works.


RE: Need help creating submenu for shutdown timers - fixiie - 2017-03-27

bump! :[


RE: Need help creating submenu for shutdown timers - mikeSiLVO - 2017-03-29

If you set the onclick to:
Code:
AlarmClock(Power off timer,Powerdown(),10:00)
That should Power off after 10 min if Kodi can control that on your OS so 60:00 for an hour and 120:00 for 2 hours etc.

For stop make the onclick
Code:
CancelAlarm(Power off timer)
and for the label if you add something like:
Code:
$INFO[System.Alarmpos,Power down in (,)]

I haven't tested it but it should work.

If you do not want a notification mentioning the alarm is started add ,silent after the duration and before the closing parenthesis ")"
Code:
AlarmClock(Power off timer,Powerdown(),10:00,silent)



RE: Need help creating submenu for shutdown timers - fixiie - 2017-03-30

(2017-03-29, 01:20)mikeSiLVO Wrote: If you set the onclick to:
Code:
AlarmClock(Power off timer,Powerdown(),10:00)
That should Power off after 10 min if Kodi can control that on your OS so 60:00 for an hour and 120:00 for 2 hours etc.

For stop make the onclick
Code:
CancelAlarm(Power off timer)
and for the label if you add something like:
Code:
$INFO[System.Alarmpos,Power down in (,)]

I haven't tested it but it should work.

If you do not want a notification mentioning the alarm is started add ,silent after the duration and before the closing parenthesis ")"
Code:
AlarmClock(Power off timer,Powerdown(),10:00,silent)

this sound amazing, even the silent is a ++++. I should just add it in kodi, not in an xml file?


RE: Need help creating submenu for shutdown timers - fixiie - 2017-03-30

(2017-03-29, 01:20)mikeSiLVO Wrote: If you set the onclick to:
Code:
AlarmClock(Power off timer,Powerdown(),10:00)
That should Power off after 10 min if Kodi can control that on your OS so 60:00 for an hour and 120:00 for 2 hours etc.

For stop make the onclick
Code:
CancelAlarm(Power off timer)
and for the label if you add something like:
Code:
$INFO[System.Alarmpos,Power down in (,)]

I haven't tested it but it should work.

If you do not want a notification mentioning the alarm is started add ,silent after the duration and before the closing parenthesis ")"
Code:
AlarmClock(Power off timer,Powerdown(),10:00,silent)


The script works! although im wondering if it works outside of kodi? (when its exited)


Need help creating submenu for shutdown timers - mikeSiLVO - 2017-04-03

No it is a Kodi command being used so will only work while it is running.

Plenty of other options for every OS to do that outside of Kodi.