Page 1 of 1
How to parse the "Context" from HB
Posted: Wed Nov 05, 2008 11:32 pm
by James D
Hey forumers,
I was wondering how I can parse or pull the "context" of a panel from HB so I can select different modes on my lighting theme.
Does any one have a script?
Thanks
James D
Re: How to parse the "Context" from HB
Posted: Fri Nov 07, 2008 1:20 pm
by Osler
I don't know if you can get at it with a script....not sure.
Is the panel enter list contexted? You could use this to set the mode if it is. If it isn't contexted, this may be a good feature request.
Osler
Re: How to parse the "Context" from HB
Posted: Fri Nov 07, 2008 5:35 pm
by James D
Yes the panel is "Contexted."
Re: How to parse the "Context" from HB
Posted: Fri Nov 07, 2008 7:31 pm
by Richard Naninck
So what exactly do you want to do. I control all my lights through a single but contexted pop panel controlling a script as well as for my hvac control in all rooms.
You can define buttons in the panel which put a command in somekind of action property which triggers a script to do something. A button can put a single command in the action property which is unique per context.
For example:
You have a button called 'Light On' and it puts somekind of command in somekind of action property like 'Device^Room light^On. For your bedroom context you can then set 'Device^Bedroom^On and for your living room you can use a different context on the same button setting Device^Livingroom^On.
The script will do the rest as long as you send the right commands per context.
Re: How to parse the "Context" from HB
Posted: Fri Nov 07, 2008 7:36 pm
by Osler
Yes, I understand the panel is contexted. I mean the PANEL ENTER LIST. This is where you can set certain things to happen (property changes, task exectution, etc.) when a panel is entered. I am just not certain if those lists are contexted. I am home now, though, and it doesn't appear that those lists are context sensitive. Neither are tasks. The only way I can see to do this is to have a seperate script to open the panel for each context and also change the mode at the same time. Instead of a panel change button, use an execute task button to start the script.
Osler
Edit: I see Richard has already pointed that out.
Re: How to parse the "Context" from HB
Posted: Sat Nov 08, 2008 1:30 am
by James D
Attached is the idea I was looking for. You guys is probably right. And gave another idea to look at. I think I am going to create a property buttons that (when the context is changed) sends a certain property value for that context, then make a "task" will execute what I need.
Re: How to parse the "Context" from HB
Posted: Sat Nov 08, 2008 11:43 am
by Richard Naninck
Do you mean this?
Re: How to parse the "Context" from HB
Posted: Sat Nov 08, 2008 2:32 pm
by James D
Yes. But I got the function I wanted to work by changing the button on the bottom of my panel to change property button then for each context I have a selected value. Then I have a task that executes whatever I want for the selected value.