• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [OT] "Message" when file created.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] "Message" when file created.


  • Subject: Re: [OT] "Message" when file created.
  • From: Chris Garaffa <email@hidden>
  • Date: Sun, 31 Jul 2005 19:28:39 -0400

On Jul 29, 2005, at 8:55 AM, Le Stang Jean-Baptiste wrote:


I seem to remember that there's a low level system message created when a file is created. Basically, when a file is created the system notices and does something which can be hooked into by other apps. Does this ring any bells with anyone? If so, can you point me in vaguely the right direction (a starter would be to get the terminology right!).


I'm not sure this is really the best place to talk about that, but you can have a look to 'kqueue(s)', that were introduced in Mac OS X.3, 'kqueue(s)' can detect file creation, file modification, and many other events related to file I/O. (could be a very good companion to folder actions) : 

Here is a nice sample showing what can be done with 'kqueue(s)' :  <http://developer.apple.com/samplecode/FileNotification/FileNotification.html>

If you're more comfortable with Cocoa, try Uli Kusterer's UKKQueue class: <http://www.zathras.de/programming/sourcecode.htm>. I've used it with success, but have never tried calling it from AppleScript (you'd have to do that via "call method" in a Studio app).

-- 
Chris Garaffa
email@hidden 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >[OT] "Message" when file created. (From: Simon Forster <email@hidden>)
 >Re: [OT] "Message" when file created. (From: Le Stang Jean-Baptiste <email@hidden>)

  • Prev by Date: Re: find last row in excel
  • Next by Date: Saving Quicktime Movie self-contained, in-place with Applescript?
  • Previous by thread: Re: [OT] "Message" when file created.
  • Next by thread: NSAppleScript: Compiling a script launches an application
  • Index(es):
    • Date
    • Thread