|
remus Wanderer
Joined: 06 Jul 2002 Posts: 53 Location: Australia
|
Posted: Sun Aug 28, 2005 7:06 pm
Displaying an #Alarm as a button? |
I have a set of alarms that I would like to be able to keep a visual track of. When it was only one it was a simple matter of just using the timer. Now that I have 3 that all fire at varying times I was wondering if it is possible to display them within gauge buttons or even just simply as buttons as one displays variables?
|
|
_________________ Once the Known was unknown now its Known...
Do you know it??? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Aug 28, 2005 8:18 pm |
Yep, it's possible. All you need to do is create a button, two variables (one for current value and one for max value), and a *1 alarm for each alarm you want to display.
The button can be any type, though I recommend gauge-type. For gauges, you need to set the minimum/low value to 0, the max value equal to the max-value variable (use the variable name like so: @max), and set the colors as you want. You also need to set the Value field of the gauge to the current-value variable (ie, @current).
The *1 alarm is there to iterate through the countdown. Use #ADD @current -1, where @current is your current-value variable.
In your original alarm, you need to set the max-value variable to the alarm duration. You then need to set the current-value variable to the max-value variable.
If done correctly, you should see the countdown automatically. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Vorax Apprentice
Joined: 29 Jun 2001 Posts: 198 Location: USA
|
Posted: Sun Aug 28, 2005 8:46 pm |
Would it not be better to use named alarms and %alarm(NamedAlarm) for the current value and set max value of the gauge to the miliseconds of the alarm, instead of creating an extra alarm that fires every second?
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Aug 29, 2005 1:50 am |
Doesn't appear to work right. Might just be me or 7.13a, but in order to get the gauge to update I have to click on it. Otherwise it does return the correct values.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
remus Wanderer
Joined: 06 Jul 2002 Posts: 53 Location: Australia
|
Posted: Wed Aug 31, 2005 2:45 pm |
Worked it out. Thanks!
|
|
_________________ Once the Known was unknown now its Known...
Do you know it??? |
|
|
|
|
|