Author |
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: April 11 2004 at 11:16 | IP Logged
|
|
|
More questions trickling in...
Are the Overwrite/Add option buttons in the CC Design View new? I like!
Is there a way to have the Key values (and other relavent info) shown for buttons selected in the Design View? Trying to add code to manipulate the buttons seems tricky without this ability, unless I'm missing something.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 14 2004 at 14:23 | IP Logged
|
|
|
Tony,
Nope, been there for quite a few versions .
When you say key values and other relevent info, do you mean like the X,Y,WIDTH, and HEIGHT or do you mean like the hotkey to activate the button, etc?
Let me know and I'll try to add what you need,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: April 14 2004 at 20:35 | IP Logged
|
|
|
I refer to the key value to dynamically twiddle buttons on the CC...
ph_setccbtnbcolor ( tab, key, bcolor ) ph_setccbtn ( tab, key, text, x, y, width, height, fcolor, bcolor, border )
ph_setccbtntext ( tab, key, text )
Also, how are colors encoded?
Thanks!
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 16 2004 at 16:27 | IP Logged
|
|
|
Tony,
I gotcha...so in the Design screen, you would like a way info box that shows a buttons key,x,y,height,width, etc. Should be able to do it.
Colors are encoded using the following formula: Red + (256 * Green) + (65536 * Blue). Each component can be from 0 to 255. Check out the "rgb" formula function for more info.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: April 17 2004 at 07:19 | IP Logged
|
|
|
I think the kev value would be sufficient. What is it, anyway?
RGB formula?!
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 22 2004 at 10:02 | IP Logged
|
|
|
Tony,
The key value is just a sequential number to identify "IR" buttons and is part of the primary key for the "IR" table.
HTH,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: April 22 2004 at 13:23 | IP Logged
|
|
|
Thanks. How do these get numbered? In order of creation, location, or something else?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 23 2004 at 15:10 | IP Logged
|
|
|
Tony,
Duhhhhh....I don't know what I was thinking. Too many things going on and not paying attention I guess .
The Key value you are referring to is with the Control Center functions. I was thinking of the Key sequence associated with IR buttons. Now that Ive gotten myself straightened out, I think I can answer your question.
The key value used in the CC functions is an arbitrary value that is assigned during the creation of the Control Center. It's basically a sequential number assigned to each button as the Control Center is built. IR keys are first followed by X10 keys followed by Macro keys followed by Send Keys. Within each group, the keys are sorted by their ID, key_number, code, and type. As you create new keys or adjust the names, etc of existing ones, this key value will change. In other words, you would definately not want to hardcode this value in any of your CC calls.
To work around this limitation, we have the ph_lookupcctab and ph_lookupccbtn functions. These two functions will "on the fly" determine what the key value and tab values are for any buttons using the button identifiers that you're accustomed to.
I'll look into the existing functions to see what I can do to possibly make things easier.
Sorry for the confusion,
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: April 23 2004 at 19:38 | IP Logged
|
|
|
Oh! Cool.
So, to change a macro button color, this is what I need?
[TEMP1] = Macro ID ph_setccbtnbcolor ( ph_lookupcctab( 3, [TEMP1] ), ph_lookupccbtn( 3, [TEMP1], 0, 0), bcolor )
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: April 26 2004 at 09:33 | IP Logged
|
|
|
Tony,
Yep...that would do it for you. Im going to be making some changes so that the Control Center does not actually have to be open to change the button colors. You'll also have the option to make the changes permanent and have them reflected in the web version of the CC as well.
Dave.
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: April 26 2004 at 13:59 | IP Logged
|
|
|
Cool!
My plan was to have button colors change based on the device's current state. Also, maybe adding a blank button to act as an indicator... Maybe a new CC object type? Nah...
|
Back to Top |
|
|