• 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: Question: Setting up a script to watch a folder in OS X?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question: Setting up a script to watch a folder in OS X?


  • Subject: Re: Question: Setting up a script to watch a folder in OS X?
  • From: Philip Aker <email@hidden>
  • Date: Thu, 20 Jun 2002 15:05:31 -0700

On Thursday, June 20, 2002, at 12:52 PM, Simon Kornblith wrote:

There's some XML facilities with 'do shell script' and
"defaults". For instance:

do shell script "defaults write ~/Desktop/myprefs foo 'bar'"

creates the "myprefs.plist" file and sets the keyword "foo" to
the string "bar"

This works, but if you're writing a lot, these get rather slow. Before the
user defaults classes had been made for AppleScript Studio, I used this. I
ended up having to make a "Saving Preferences" progress bar to stop it from
taking 5 seconds to close the preferences window with no user interaction.

No doubt about it, They're slow. Actually, I find many things in the AppleScript Studio projects I've attempted to be slow--especially launch time.

I've changed from a resource preferences file to the CFPreferences style in an app being ported to Carbon and noticed the difference there as well. I've been thinking that the way to manage these most efficiently is to grab them on an "as needed" basis. Like say when I close window A, save only the data pertinent to that window at close time. This is a different policy than previously--where I would keep all prefs in a handle and then write it to the prefs resource file in one blast on quit. However, this assumes that one has optimized their preferences strategy. In my case, I worked it out to 128 shorts plus several handles to custom resource types.




p h i l i p @ v c n . b c . c a
h t t p : / / w w w . a k e r . c a /
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Question: Setting up a script to watch a folder in OS X? (From: Simon Kornblith <email@hidden>)

  • Prev by Date: Re: Bevel and emboss with PSD7
  • Next by Date: path to <<constant afdregfp>>
  • Previous by thread: Re: Question: Setting up a script to watch a folder in OS X?
  • Next by thread: Re: Question: Setting up a script to watch a folder in OS X?
  • Index(es):
    • Date
    • Thread