Need help creating submenu for shutdown timers

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
fixiie Offline
Junior Member
Posts: 7
Joined: Mar 2017
Reputation: 0
Post: #1
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
find quote
fixiie Offline
Junior Member
Posts: 7
Joined: Mar 2017
Reputation: 0
Post: #2
bump Tongue
find quote
PatK Offline
Team-Kodi Member
Posts: 8,331
Joined: Mar 2010
Reputation: 202
Location: Canada
Post: #3
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'.

windows fresh start -> delete C:\Users\User Name\AppData\Roaming\Kodi First time user (wiki) Log file (wiki) Video management (wiki) Artwork (wiki) Supported hardware (wiki) Releases (wiki) Database versions (wiki) Skin features compatibility list (wiki) http://xbmc-skins.com
find quote
smitchell6879 Offline
Fan
Posts: 743
Joined: Jan 2016
Reputation: 15
Post: #4
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.

Windows 10/MySQL/Xiaomi Mi Box
[WIP] UNIPLEX: A Blurred Vision
Madnox Holiday Mod
find quote
fixiie Offline
Junior Member
Posts: 7
Joined: Mar 2017
Reputation: 0
Post: #5
(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.
find quote
fixiie Offline
Junior Member
Posts: 7
Joined: Mar 2017
Reputation: 0
Post: #6
bump! :[
find quote
mikeSiLVO Offline
Posting Freak
Posts: 2,529
Joined: Jan 2013
Reputation: 148
Location: Planet Earth - SOL System - Milky Way Galaxy
Post: #7
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)
find quote
fixiie Offline
Junior Member
Posts: 7
Joined: Mar 2017
Reputation: 0
Post: #8
(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?
find quote
fixiie Offline
Junior Member
Posts: 7
Joined: Mar 2017
Reputation: 0
Post: #9
(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)
(This post was last modified: 2017-03-30 01:18 by fixiie.)
find quote
mikeSiLVO Offline
Posting Freak
Posts: 2,529
Joined: Jan 2013
Reputation: 148
Location: Planet Earth - SOL System - Milky Way Galaxy
Post: #10
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.
find quote