Page 1 of 1
Changing Text and Text Color from a script
Posted: Wed Jan 25, 2006 5:21 am
by ekraus
I have written an elaborate script that accomplishes several tests and actions.
I have a task button that sets the script to running.
What I would like to do is based on the results of the tests in the script input Text and a specific color in that Task button .
How can I do this?
Thanks Evan
Posted: Thu Jan 26, 2006 8:41 am
by ScottBot
There are no button properties that allow you to change the color of the button, and Task buttons can only have two states, so you may need to take another approach.
What you could do is to create a dummy property that you use to trigger the task with a button. When creating the property (using the Property Manager) assign it values for each of the 'color' states that you need. Then replace the task button with a multi-state property value button and assign the dummy property to the button. Map each state of the button to one of the values of the dummy property and create separate button images (different colors) for each.
Change your task (or create a new one) to trigger when the dummy property value changes.
In your script, simply set the dummy property to the appropriate 'color' value based on the results of your tests. The multi-state button will automatically change it's image (color) when the dummy property value that it is associated to is changed.
Posted: Fri Jan 27, 2006 6:04 am
by ekraus
I have everything done except assigning the dummy property to the "multi-state property value button".
How do I assign that?
Evan
Posted: Fri Jan 27, 2006 8:42 am
by ScottBot
When you create a new multi-state button, the wizard will ask you for the Device and Property. Or if you have an existing multi-state button, just select it in the "Property Change" tab.
Posted: Sat Jan 28, 2006 5:39 am
by ekraus
I have the Multi state button down pat but I only have several choices.
When I use the wizard the device list comes up with choices that are a hardware device or a script device that I have added.
There is no device shown that will allow me to use the dummy property that I created.
How do I create a device that has the dummy properties that will show up in the device list available.
TKS EVAN
Posted: Sat Jan 28, 2006 9:25 am
by ScottBot
Once you have created your specialized Property in the Property Manager, you have two choices.
- Assign the Property to an existing Device. If you right mouse click on a Device in the Tree View, you can select "Add Property" and add your new property to an existing Device (one that it relates to). Warning: some devices won't change the values correctly when values are added this way.
- Create a new Null Device (not a Dummy Device) by selecting the 'no hardware interface required' option in the device wizard. Once the Null Device is in the Tree View, right mouse click on it and add the property as described above.
Posted: Sat Jan 28, 2006 10:09 am
by ekraus
Thanks Scott!
I figured out the null device but didn't mention it!
I also did not know that you could add the property to an existing device.
I am finally getting the hang of the software.
I think I might need to dedicate a PC to running the server.
My responce speed is pretty slow to the software remote.
The x10 smails pace I can deal with.
Once again thanks!
Evan