Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Control Center help Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
bhlonewolf
Senior Member
Senior Member


Joined: March 29 2007
Online Status: Offline
Posts: 198
Posted: June 11 2007 at 17:40 | IP Logged Quote bhlonewolf

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 View bhlonewolf's Profile Search for other posts by bhlonewolf
 
bhlonewolf
Senior Member
Senior Member


Joined: March 29 2007
Online Status: Offline
Posts: 198
Posted: June 11 2007 at 19:57 | IP Logged Quote bhlonewolf

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 View bhlonewolf's Profile Search for other posts by bhlonewolf
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: June 11 2007 at 22:10 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: June 11 2007 at 22:33 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
bhlonewolf
Senior Member
Senior Member


Joined: March 29 2007
Online Status: Offline
Posts: 198
Posted: June 11 2007 at 22:35 | IP Logged Quote bhlonewolf

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 View bhlonewolf's Profile Search for other posts by bhlonewolf
 
bhlonewolf
Senior Member
Senior Member


Joined: March 29 2007
Online Status: Offline
Posts: 198
Posted: June 11 2007 at 22:42 | IP Logged Quote bhlonewolf

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 View bhlonewolf's Profile Search for other posts by bhlonewolf
 
bhlonewolf
Senior Member
Senior Member


Joined: March 29 2007
Online Status: Offline
Posts: 198
Posted: June 12 2007 at 00:14 | IP Logged Quote bhlonewolf

Thanks Tony -- looks good! Discovering new stuff in PH all the time :)
Back to Top View bhlonewolf's Profile Search for other posts by bhlonewolf
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum