| Author |  | 
      
        | onhiatus Senior Member
 
  
  
 Joined: May 12 2004
 Location: United States
 Online Status: Offline
 Posts: 279
 | 
          It would be nice to have powerhome be able to monitor specified files and/or folders. Currently this has to be done with polling.
           | Posted: October 11 2007 at 13:25 | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |       | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          Tony,
           | Posted: October 15 2007 at 11:28 | IP Logged |   |  
           | 
 |  
 The only way I know of to do this so far is with polling.  There might be a Windows hook that could be installed, but Im not currently familiar with it.
 
 If you have any info about this, let me know and I'll see what I can do.
 
 Thanks,
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | onhiatus Senior Member
 
  
  
 Joined: May 12 2004
 Location: United States
 Online Status: Offline
 Posts: 279
 | 
          Polling would be overkill, though I imagine that Powerhome could do it more efficiently than a macro...
           | Posted: October 15 2007 at 12:14 | IP Logged |   |  
           | 
 |  
 I'd look at the win32 api - FindFirstChangeNotification seems to fit the bill. See MSDN
 
 If you do have to poll, we could get 90% of the desired functionality by just having ph monitor a specified folder - that seems way more doable.
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | nadler Super User
 
  
 
 Joined: February 25 2006
 Location: United States
 Online Status: Offline
 Posts: 354
 | 
          That would do the trick for me for updating What Playing in itunes.  I don't know how to implement it though.  Right now I'm running a macro every minute.  It causes audio to stutter occasionally.
           | Posted: October 15 2007 at 12:27 | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  | 
        | dhoward Admin Group
 
  
  
 Joined: June 29 2001
 Location: United States
 Online Status: Offline
 Posts: 4447
 | 
          Alrighty,
           | Posted: October 15 2007 at 16:52 | IP Logged |   |  
           | 
 |  
 I went ahead and created a generic PowerHome plugin for file monitoring.  You can download it here: http://www.power-home.com/download/phfilemonitor.zip.
 
 This plugin will create no load on PowerHome and will fire a generic plugin trigger when any monitored file is changed (based upon file date/time stamp).  You can pre-specify the files to monitor or add/change them at runtime.
 
 Let me know how it goes,
 
 Dave.
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | nadler Super User
 
  
 
 Joined: February 25 2006
 Location: United States
 Online Status: Offline
 Posts: 354
 | 
          All I can say is you're unbelievable. No sooner had we asked and you did it!
           | Posted: October 15 2007 at 17:57 | IP Logged |   |  
           | 
 |  
 It's installed and working perfectly.
 
 Thank you, thank you, thank you.
 | 
       
        | Back to Top |     | 
       
       
        |  |