Re: Question: Setting up a script to watch a folder in OS X?
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: Simon Kornblith <email@hidden>
- Date: Thu, 20 Jun 2002 15:52:04 -0400
On 6/20/02 3:49 PM, "Philip Aker" <email@hidden> wrote:
>
On Thursday, June 20, 2002, at 12:18 PM, Simon Kornblith wrote:
>
>
> On 6/20/02 4:34 AM, "Sven Ryen" <email@hidden> wrote:
>
>
>
>> Also, can AppleScript natively parse an XML document, or would
>
>> it be simpler
>
>> to read in a delimited file?
>
>
>
> AFAIK, you'd need the XML Tools scripting addition, which is
>
> available for
>
> Mac OS 9 and Mac OS X. Sort of strange how Apple gives us
>
> excellent XML-RPC
>
> and SOAP capabilities but not the ability to read and write XML
>
> documents.
>
>
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.
Simon
_______________________________________________
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.