| Author | 
         | 
         
      
        
         
         mustangcoupe Super User 
          
  
  Joined: August 08 2003 Location: United States
 Online Status: Offline Posts: 308
          | 
        
         
          
           | Posted: January 31 2009 at 14:53 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
ok, ive been around a bit ans I still get confused with ' and " ...
 
 can someone help me here... I am sending a command out using the PH.run command to send CID info to all computers on my network.
 
 here is the basics of what I am tring to do...
 
Code: 
   
    
    
      
       | "C:\Program Files\Windows Home Server\WHSAlert.exe" "Incomming Call" "CID INFO HERE" info 100 | 
       
       | 
    
    | 
 
 
 
 ph.run(file name argument1 argument2 argument3 argument4)
 
 file name: C:\Program Files\Windows Home Server\WHSAlert.exe
 argument1: Incomming call 
 argument2: globalvariable {CID}
 argument3: info
 argument4: 100
 
 each argument needs to be sent in quotes to be processed properly
 
 thanks
 
  __________________ Todd Hannemann
 
 HA newbie   
 
     PowerHome - UPB - ELK     
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         jbbtex Senior Member 
          
 
  Joined: February 15 2007 Location: United States
 Online Status: Offline Posts: 181
          | 
        
         
          
           | Posted: January 31 2009 at 20:18 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
If you haven't already you might try it like this.  I don't use windows script so my example uses ph_run and this is just a guess.
 
 
Code: 
   
    
    
      
       | ph_run("'C:\Program Files\Windows Home Server\WHSAlert.exe '" +  "'Incomming Call '" + "'" + "{CID}" +  "' " + "'info '" + "'100'") | 
       
       | 
    
    | 
 
 
 
 But I'm like you, all the quotes start running together and make my eyes glaze over.
  __________________ Brady
 
 "Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." - Gen. George S. Patton
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         mustangcoupe Super User 
          
  
  Joined: August 08 2003 Location: United States
 Online Status: Offline Posts: 308
          | 
        
         
          
           | Posted: January 31 2009 at 20:45 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
getting better... I dont get a formula error but I do get a -1 response 
  __________________ Todd Hannemann
 
 HA newbie   
 
     PowerHome - UPB - ELK     
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         jbbtex Senior Member 
          
 
  Joined: February 15 2007 Location: United States
 Online Status: Offline Posts: 181
          | 
        
         
          
           | Posted: January 31 2009 at 21:34 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
-1 means there was an error.
 
 Try it by substituting a string for the GV.
 
Code: 
   
    
    
      
       | ph_run("'C:\Program Files\Windows Home Server\WHSAlert.exe '" + "'Incomming Call '" + "'test string '" + "'info '" + "'100'") | 
       
       | 
    
    | 
 
 
 
 edit: Thought I put this in the first time.
 
 If it does work then we can figure out how to get the variable in.
  Edited by jbbtex - February 01 2009 at 03:44
  __________________ Brady
 
 "Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity." - Gen. George S. Patton
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   |