Author |
|
bhlonewolf Senior Member
Joined: March 29 2007
Online Status: Offline Posts: 198
|
Posted: June 11 2007 at 17:40 | IP Logged
|
|
|
I'm trying to build my first control center by adding a couple of buttons and some text that describes the current state of some global variables.
I'm not quite sure how to pull this off -- I understand the macros/formulas, etc., just can't figure this out.
Any pointers?
Thanks,
Brian
|
Back to Top |
|
|
bhlonewolf Senior Member
Joined: March 29 2007
Online Status: Offline Posts: 198
|
Posted: June 11 2007 at 19:57 | IP Logged
|
|
|
BTW -- I got how to change the text using, say, ph_setccobjtext() ... I'm hoping to do 2 things:
1) plug into the initialize or startup of the form to set all the values. For example, if you want a button to change colors (yellow for on and grey for off), how do set the initial state?
and
2) this probably isn't possible but poll for changes and update the form?
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: June 11 2007 at 22:10 | IP Logged
|
|
|
Changing Control Center button text is not hard.
You'll need to use...
ph_setccobjtext( tabid, id, text )
Something like...
ph_setccobjtext( "AUDIO", "TB10", "{WINAMP ARTIST} - {WINAMP SONG}")
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: June 11 2007 at 22:33 | IP Logged
|
|
|
You would set the initial state in the CC edit mode, then update. You would then specify a macro to run when the CC opens in Setup, Control Center, Run Macro on Open.
I thought there was an update command. I'll dig more.
|
Back to Top |
|
|
bhlonewolf Senior Member
Joined: March 29 2007
Online Status: Offline Posts: 198
|
Posted: June 11 2007 at 22:35 | IP Logged
|
|
|
Hi Tony,
Many thanks for the reply again and I should've explained a bit more -- but in fiddling with it this evening I've probably answered my own question.
I figured how to change the buttons color/text ... but my issue was with automating this process -- for example, when the control center form opens, how to reflect the correct state of the buttons.
Then, I kind of realized I'm guessing it's all done via triggers and macros. I created a macro for refreshing the control center status for each device I care about.
I see a startup macro in the event log getting triggered -- is there a way to specify an additional startup macro to execute?
|
Back to Top |
|
|
bhlonewolf Senior Member
Joined: March 29 2007
Online Status: Offline Posts: 198
|
Posted: June 11 2007 at 22:42 | IP Logged
|
|
|
Ah -- just did a search:
"If you create a macro with an ID of STARTUP, this macro will be executed automatically everytime PowerHome is started."
|
Back to Top |
|
|
bhlonewolf Senior Member
Joined: March 29 2007
Online Status: Offline Posts: 198
|
Posted: June 12 2007 at 00:14 | IP Logged
|
|
|
Thanks Tony -- looks good! Discovering new stuff in PH all the time :)
|
Back to Top |
|
|