| 
    
     | 
       
        | Author |  |  
        | smarty Super User
 
  
  
 Joined: May 21 2006
 Location: United States
 Online Status: Offline
 Posts: 729
 | 
          I am using "ph_openiewindow" to open an empty .txt file.  I want to display the contents of a couple of P.H. global variables in this window.
           | Posted: January 28 2007 at 14:29 | IP Logged |   |  
           | 
 |  
 I know from this thread the handle of this window, but I do NOT KNOW to display these global variables.  Would I use "sendmsg" or "sendmsg_s"?
 
 I think it might take the form of something like this (but this does not work):
 
 ph_sendmsg(ph_openiewindow("test Window", "C:\empty.txt", 0, -1, -1, 950, 950, 0),"{global1} /cr/lf {global2} /cr/lf", ??, )
 
 USEAGE:
 ph_openiewindow(title,url,flags,x,y,width,height,timeout)
 
 ph_sendmsg_s(handle, msgnum, wparam, string)
 ph_sendmsg(handle, msgnum, wparam, lparam)
 
 Thanks in advance.
 
 
 Edited by smarty - January 28 2007 at 14:42
 
 __________________
 Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
 |  
        | Back to Top |     |  
        |  |  
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          One way to get info into that window is with a url of ph-cgi/directhtml and some HTML.
           | Posted: January 28 2007 at 16:39 | IP Logged |   |  
           | 
 |  
 Something like...
 
 
 
| Code: 
 
    
    | 
      
       | ph_openiewindow( "PH Window",  'http://localhost:8000/ph-cgi/directhtml?html="<html>& lt;body>{global1}<br><br>{global2}</body&g t;</html>"', 128, -1, -1, 800, 600, 10) |  |  |  
 |  
        | Back to Top |       |  
        |  |  
        | smarty Super User
 
  
  
 Joined: May 21 2006
 Location: United States
 Online Status: Offline
 Posts: 729
 | 
          Thanks Tony,
           | Posted: January 28 2007 at 17:04 | IP Logged |   |  
           | 
 |  
 I tried this:
 
 ph_openiewindow( "PH Window",  'http://localhost:8000/ph-cgi/directhtml?html="<html>&    lt;body>"{GLOBAL1}"<br><br> "{GLOBAL2}"</body&g t;</html>"', 128, -1, -1, 800, 600, 10)
 
 It opens the window, but I get the standard:
 
 Action canceled
 Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable.
 
 
 Windowds error message.  I did make sure {Global1} and {Global2} are defined.   I also tried to run this formula from the web center....same error.
 
 What else am I doing wrong.  Other ideas?
 
 Edited by smarty - January 28 2007 at 17:06
 
 __________________
 Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
 |  
        | Back to Top |     |  
        |  |  
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          It looks like the forum trashed the formula. Try this.
           | Posted: January 28 2007 at 17:54 | IP Logged |   |  
           | 
 |  
 Also, if you are not replacing global1 and 2 with different names, you need to use brackets around them, not braces.
 |  
        | Back to Top |       |  
        |  |  
        | smarty Super User
 
  
  
 Joined: May 21 2006
 Location: United States
 Online Status: Offline
 Posts: 729
 | 
          Still no luck.....(thanks for trying Tony
           | Posted: January 30 2007 at 11:54 | IP Logged |   |  
           | 
 |   ). 
 It APPEARS to me that opening a url of ph-cgi/directhtml and some HTML type window to display P.H. Global Variable informtion takes a BUNCH (0.8 sec), LONGER than opening an empty text file window.
 
 Since I am trying to use this displayed information as feedback from button presses (from an IR remote) this delay (0.8 sec) is NO GOOD.
 
 IF it is possible, I sure would like to know how to get this Global Variable information to display in a simple "text type" window (with carriage returns and line feeds - for decent formatting).
 
 Thanks again.
 
 __________________
 Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
 |  
        | Back to Top |     |  
        |  |  
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Then you should try a web page that ph_openiewindow can use and put it in the powerhome/web folder.
           | Posted: January 30 2007 at 13:42 | IP Logged |   |  
           | 
 |  
 status.psp
 
 
| Code: 
 
    
    | 
      
       | <html> <body>
 {global1}<br><br>
 {global2}
 </body>
 </html>
 |  |  |  
 Then use ph_openiewindow("Status", "http://localhost:8000/status.psp", 128, -1, -1, 1600, 1200, 10)
 
 Another option, if this is on the PH machine, would be to just use the Message Box function.
 |  
        | Back to Top |       |  
        |  |  |  |