| Author | 
         | 
         
      
        
         
         BeachBum Super User 
          
  
  Joined: April 11 2007 Location: United States
 Online Status: Offline Posts: 1880
          | 
        
         
          
           | Posted: May 06 2008 at 20:16 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Got it … That’s cool.     Thanks.
  __________________ Pete - X10 Oldie
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         bhlonewolf Senior Member 
          
 
  Joined: March 29 2007
 Online Status: Offline Posts: 198
          | 
        
         
          
           | Posted: May 06 2008 at 21:12 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hmmm ... don't think that works, though, Tony.  Cool idea, and maybe I'm doing something wrong but I think we may need to wait until the next alpha ;)
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: May 06 2008 at 21:19 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
I can do one better  ...
 
 In the GV screen of PowerHome Explorer, just type your formula as the value for the GV.
 
 IS_SUN_UP
 if(ph_seconds(now()) < [SUNRISE] AND ph_seconds(now()) < [SUNSET] , 1, 0)
 
 Then in your macro's Jump command, just code
 
 if({IS_SUN_UP} = 1,1,999)
 
 in the sendkeys field.
 
 The way this works is that the sendkeys field for a "Jump" command is a formula.  So the first thing that happens for a formula is variable substitution.  This would make the formula look like:
 
 if(if(ph_seconds(now()) < [SUNRISE] AND ph_seconds(now()) < [SUNSET] , 1, 0) = 1,1,999)
 
 Next, the system vars for [SUNRISE] and [SUNSET] will be substituted.  When no more substitutions exist, the formula will then be evaluated.
 
 I havent actually tested the above so let me know if it doesnt work  .
 
 Dave.
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         bhlonewolf Senior Member 
          
 
  Joined: March 29 2007
 Online Status: Offline Posts: 198
          | 
        
         
          
           | Posted: May 06 2008 at 21:52 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Ah!  OK -- just tried it and it works.  :)
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         TonyNo Moderator Group 
          
  
  Joined: December 05 2001 Location: United States
 Online Status: Offline Posts: 2889
          | 
        
         
          
           | Posted: May 06 2008 at 23:24 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Cool Dave!
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         BeachBum Super User 
          
  
  Joined: April 11 2007 Location: United States
 Online Status: Offline Posts: 1880
          | 
        
         
          
           | Posted: May 06 2008 at 23:31 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
   
  __________________ Pete - X10 Oldie
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   |