Re: Folder Actions: Use non-scripts?
Re: Folder Actions: Use non-scripts?
- Subject: Re: Folder Actions: Use non-scripts?
- From: "Gary (Lists)" <email@hidden>
- Date: Fri, 22 Apr 2005 22:05:48 -0400
Eric M. Williams wrote [4/22/05 12:22 PM]:
> Is it possible to attach a normal, non-AppleScript application as a
> Folder Action in OS X? The Folder Actions interface seems to only allow
> compiled scripts.
Eric M. Williams wrote [4/22/05 3:40 PM]:
> I'd rather attach my application directly ...
> Here's just a few good reasons:
>
> - Simpler user interface. You must have your scripts in /Library/Actions or
> ~/Library/Actions, or they don't work. So, in order to work, my wrapper script
> has to be placed in a special folder; manually, by the user, or by using an
> installer of some sort.
There are oodles of scripts and lists that reveal hundreds of "blessed"
folder codes available with the 'path to' command. If you use these 'path
to' codes, or their named synonyms, then you can avoid having to write any
additional location code.
The Actions folder is as easily retrieved as:
path to "fasf"
--> alias "ADISK:System Folder:Scripts:Folder Action Scripts:"
Slight variations in OS X will get you the User's folder or the system
folder.
> I dislike the idea of having pieces of my application scattered throughout the
> filesystem.
Which is precisely why there is a centralized, universal folder easily
available.
IMO, this also lends itself to keeping the body of your app's work separate
from any given automated system of giving it some files. Your code will be
less bulky, there's less to maintain, less time/bandwidth for downloading
updates, automation processes can be updated separately, users can invent
their own ways to automate and so on.
> - Less error-prone. What if the user renames my application?
> The compiled script could break without any warning.
Shane Stanley wrote [4/22/05 8:22 PM]:
>> Nothing happens. Compiled scripts don't care.
> Plus, Folder Action scripts are very difficult to troubleshoot because the
> Folder Actions server application doesn't give any indication when an error
> has occurred in the script.
But you, as the script writer, can provide feedback or notification or
logging of errors in your handlers.
Ray B. (of this list) and I wrote an application together that uses a folder
action to do some stuff (<-- technical writing!), including writing results
and errors to a log. We could have done something else with errors if we
wanted.
> - Less complexity. When something goes wrong and I have to provide support,
> there's a lot more troubleshooting to be done when AppleScript is calling my
> application's Apple Event handler.
No more or less complexity than any other application interaction.
> In short, I'm not nuts, nor am I inexperienced. :)
Just unfamiliar with folder actions. That's cool.
And maybe a little inside-the-boxy. :)
--
Gary
_______________________________________________
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