| Author | 
         | 
         
      
        
         
         patrickm Senior Member 
          
 
  Joined: February 22 2007 Location: United States
 Online Status: Offline Posts: 188
          | 
        
         
          
           | Posted: May 29 2007 at 14:44 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hello,
 I would like to write a macro that would be able access a 2d array for the parameters i.e. device and duration.  I am trying to avoid having to write very long macros with specific variables for each device and duration in the macro and just use a loop with a pointer to an array.
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         TonyNo Moderator Group 
          
  
  Joined: December 05 2001 Location: United States
 Online Status: Offline Posts: 2889
          | 
        
         
          
           | Posted: May 29 2007 at 20:54 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Arrays are only supported in scripts. Sounds like you may be able to handle that, though, since you mentioned "pointer".    
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         patrickm Senior Member 
          
 
  Joined: February 22 2007 Location: United States
 Online Status: Offline Posts: 188
          | 
        
         
          
           | Posted: May 30 2007 at 01:21 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Are the Insteon functions supported from within scripts directly?  I didn't see any listed in the help file, but I believe the help file hasn't been fully updated yet.
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         TonyNo Moderator Group 
          
  
  Joined: December 05 2001 Location: United States
 Online Status: Offline Posts: 2889
          | 
        
         
          
           | Posted: May 30 2007 at 08:11 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
I believe that you can use ph.formula( ph_insteon(xxx) ) for that.
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         eHomeCreations Groupie 
          
 
  Joined: February 02 2007 Location: Ukraine
 Online Status: Offline Posts: 64
          | 
        
         
          
           | Posted: June 04 2007 at 02:38 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Arrays are tables. Can you just create a table and use that?
  __________________  --Steve       http://www. ehomecreations.com
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         patrickm Senior Member 
          
 
  Joined: February 22 2007 Location: United States
 Online Status: Offline Posts: 188
          | 
        
         
          
           | Posted: June 05 2007 at 12:38 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
I searched for tables in the help file and didn't see any references.  A table would work if they exist.
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         TonyNo Moderator Group 
          
  
  Joined: December 05 2001 Location: United States
 Online Status: Offline Posts: 2889
          | 
        
         
          
           | Posted: June 05 2007 at 19:54 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
There is a User Table (UserData1) that you can populate.
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         patrickm Senior Member 
          
 
  Joined: February 22 2007 Location: United States
 Online Status: Offline Posts: 188
          | 
        
         
          
           | Posted: June 05 2007 at 23:48 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
I assume that is accessed by sql commands?
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         TonyNo Moderator Group 
          
  
  Joined: December 05 2001 Location: United States
 Online Status: Offline Posts: 2889
          | 
        
         
          
           | Posted: June 06 2007 at 07:10 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Sorry! Yup.
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   |