| Author | 
         | 
         
      
        
         
         krommetje Super User 
          
  
  Joined: December 29 2004 Location: Netherlands
 Online Status: Offline Posts: 695
          | 
        
         
          
           | Posted: June 03 2008 at 14:21 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hey all (perhaps an easy question but....)
 
 Been reading a lot, but no posting, but here I am again:
 
 My daughter has a bedside lamp which has a running time of 20min. She is allowed to read for 20min. and then PH shuts the light off. I do this with a hyperlink to start a macro like this: (on my touchscreen in the livingroom)
 
 
Code: 
   
    
    
      
       
 <a href=http://192.168.1.17/maiketijd.psp>Maikelight On>
  | 
       
       | 
    
    | 
 
 
 
 can I change the textcolour according to the status of the light? (address is L3)
 
 Peter
  Edited by krommetje - June 03 2008 at 14:22
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         TonyNo Moderator Group 
          
  
  Joined: December 05 2001 Location: United States
 Online Status: Offline Posts: 2889
          | 
        
         
          
           | Posted: June 03 2008 at 17:30 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Sure. Just put two FONT COLOR statements in an IF that checks the light status. I can post actual code in a few hours.
 
 This would give blue text...
 
 <A HREF=http://192.168.1.17/maiketijd.psp>
 <FONT COLOR="#0000FF">Maikelight On></FONT>
 </A> 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         TonyNo Moderator Group 
          
  
  Joined: December 05 2001 Location: United States
 Online Status: Offline Posts: 2889
          | 
        
         
          
           | Posted: June 03 2008 at 20:28 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
OK, here's some code...
 
 The link is dark yellow when on and grey when off.
 
 
Code: 
   
    
    
      
       <A HREF=/maiketijd.psp>
 <FONT COLOR="<% if( [X10STATL3] = 2, '#7f7f00', '#808080') %>">Maikelight On></FONT>
 </A> | 
       
       | 
    
    | 
 
 
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         krommetje Super User 
          
  
  Joined: December 29 2004 Location: Netherlands
 Online Status: Offline Posts: 695
          | 
        
         
          
           | Posted: June 04 2008 at 08:40 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hey TonyNo,
 
 now I know what went wrong:
 
 this part of the code: %>">Maikelight On> I forgot the "   
 
 oops, elementary mistake      
 
 thanks...
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   |