Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Feature Requests
 PowerHome Messageboard : PowerHome Feature Requests
Subject Topic: Trigger on file change Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
onhiatus
Senior Member
Senior Member
Avatar

Joined: May 12 2004
Location: United States
Online Status: Offline
Posts: 279
Posted: October 11 2007 at 13:25 | IP Logged Quote onhiatus

It would be nice to have powerhome be able to monitor specified files and/or folders. Currently this has to be done with polling.
Back to Top View onhiatus's Profile Search for other posts by onhiatus Visit onhiatus's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: October 15 2007 at 11:28 | IP Logged Quote dhoward

Tony,

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
onhiatus
Senior Member
Senior Member
Avatar

Joined: May 12 2004
Location: United States
Online Status: Offline
Posts: 279
Posted: October 15 2007 at 12:14 | IP Logged Quote onhiatus

Polling would be overkill, though I imagine that Powerhome could do it more efficiently than a macro...

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 View onhiatus's Profile Search for other posts by onhiatus Visit onhiatus's Homepage
 
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: October 15 2007 at 12:27 | IP Logged Quote nadler

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.
Back to Top View nadler's Profile Search for other posts by nadler
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: October 15 2007 at 16:52 | IP Logged Quote dhoward

Alrighty,

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: October 15 2007 at 17:57 | IP Logged Quote nadler

All I can say is you're unbelievable. No sooner had we asked and you did it!

It's installed and working perfectly.

Thank you, thank you, thank you.
Back to Top View nadler's Profile Search for other posts by nadler
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum