Graphic View
Jack Barse
jblists at barse.org
Tue Dec 5 17:08:53 PST 2006
On Dec 5, 2006, at 3:00 PM, Bill Brandt asked:
> Is there a way to display the value of a dimmable unit int eh graphic
> view or is it just the on/off icon?
Yes there is, but it's not explained in the documentation. The info
in the AppleScript dictionary is complete, though.
The command to use is 'set label params of'. Essentially you create a
new text label in the view then use 'set label params' to manipulate
what the label shows. You'll have to find a way to update the view,
too, or the value won't change.
For example, I've got a dimmable lamp called "Fireplace Lamp". The
view, called Basement, has the icon for the lamp itself and a text
field called "Fireplace Lamp Value". I use a repeating event to run a
script called 'update views' that contains this line (among others):
set label params of "Fireplace Lamp Value" in view "Basement" text
(round(value of "Fireplace Lamp")) as string
Every time the 'update views' script runs it reads the value of
Fireplace Lamp and writes the value into the Fireplace Lamp Value
text field. (Now that I think about it, using James' technique of
watching for a status change in a member of a group and using that to
trigger the view update would likely be more elegant that this sort
of clunky way of repeatedly running a script. Sounds like a
project. :-) )
Anyhow, I use this feature to show motion sensor timestamps, as well
as house temp and thermo set points, etc. You can manipulate fonts
and colors via the command, too, so it's pretty easy to convey lots
of info, at least as soon as you figure out the syntax.
HTH,
Jack
More information about the XTensionlist
mailing list