How to use the System.HasAlarm(alarm) boolean condition?
#1
Lightbulb 
I want to create a custom window to use this condition to pop up a little white text line with a black background at the bottom of the screen, similar to the VideoFullScreen you get which tells you codec info etc. This way, if you put an alarm on XBMC will warn you a couple of minutes before it shuts down whereever you are (home screen, file manager, fullscreen video etc) should you want to cancel it.

I don't know exactly how to go about this though... can anyone point me in the right direction?
Reply
#2
to do this you should use this instead:
Quote:System.AlarmLessOrEqual(alarmname,seconds) Returns true if the alarm with ?alarmname? has less or equal to ?seconds? left. Standard use would be system.alarmlessorequal(shutdowntimer,119), which would return true when the shutdowntimer has less then 2 minutes left.
  • Livingroom - C2D E8400, P5N7A-VM on a Samsung 46" LE46M86 FullHD via HDMI
  • Kitchen - ASRock 330 HT Displayed on a Samsung Lapfit 22" dual touch screen LD220Z
  • Bedroom - LG Laptop on a 32" tv
Reply
#3
watzen Wrote:to do this you should use this instead:

Ah yes... I thought that's what I wrote but I accidentally put the wrong boolean in. I still don't know how to use it though, and I've been trying for ages.

I just want a custom window which, when there is five minutes or less on the shutdown timer, pops up a white text dialogue on a black background at the bottom of the screen, that appears on any screen (Home, Fullscreen Video etc). As it stands I can't even get it to show up a generic text window by using a custom#.xml file, even after following the HOW-TO tutorial in the wiki manual.
Reply
#4
I've never touched alarms, but you probably want to put something like this in Includes.xml:

Code:
<include name="ShutdownNotify">
    <control type="image">
        <posx>x</posx>
        <posy>y</posy>
        <width>w</width>
        <height>h</height>
        <texture>notifyback.png</texture>
        <visible>System.AlarmLessOrEqual(ShutdownAlarm,300)</visible>
    </control>
    <control type="label">
        <posx>x</posx>
        <posy>y</posy>
        <width>w</width>
        <height>h</height>
        <label>The system is shutting down in $INFO[System.Alarmpos]</label>
        <visible>System.AlarmLessOrEqual(ShutdownAlarm,300)</visible>
    </control>
</include>

Then for every window you'd like that to show up, just <include>ShutdownNotify</include>
Reply

Logout Mark Read Team Forum Stats Members Help
How to use the System.HasAlarm(alarm) boolean condition?0