Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Changing button state Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
fasttimes
Groupie
Groupie


Joined: March 12 2006
Online Status: Offline
Posts: 63
Posted: March 28 2006 at 03:17 | IP Logged Quote fasttimes

I'm trying to create a graphic represenation on the control center of my KeypadLinc with 8 buttons.

How can I programmatically change the state from "on" to "off" and vice-versa?

I ask b/c I have a trigger which catches the on button, and performs some light changes, then after 5 minutes, does some more changes then turns the KPL button off. I want to have the control panel match the actual KPL.

Any ideas?
Back to Top View fasttimes's Profile Search for other posts by fasttimes
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: March 28 2006 at 07:20 | IP Logged Quote TonyNo

Take a look at ph_setccbtn.

This formula updates a button (#2 on the Devices tab) to reflect the state of a device (C3) by changing its color...

Code:
ph_setccbtn ( "DEVICES", 2, " ", -1, -1, -1, -1, if( ph_getx10stat( "C3") = 1, rgb ( 255, 255, 255 ), rgb ( 0, 0, 0 ) ), if( ph_getx10stat( "C3") = 1, rgb ( 200, 0, 0 ), rgb ( 0, 200, 0 ) ), -1 )


This needs to be done in a macro that is called out in Setup, Control Center, Run Macro on Open.

Edited by TonyNo - March 28 2006 at 07:34
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: March 28 2006 at 12:53 | IP Logged Quote krommetje

Hey that is a good one!! Might come in handy!!

Peter
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 

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