Re: Folder actions and Illustrator files
Re: Folder actions and Illustrator files
- Subject: Re: Folder actions and Illustrator files
- From: Jake Pietrykowski <email@hidden>
- Date: Thu, 18 Nov 2004 15:29:21 -0600
In all my experiences with attaching Folder Actions to folders on network
volumes...sensing the EOF has been the most difficult. My solution has
always been to apply the Folder Action to a folder within the share
directory.
For example my share directory is named "SharedFolder."
SharedFolder contains 2 directories: Copy2Here and Move2Here
I copy the file to the Copy2Here. The Folder Action is attached to the
Move2Here folder. I copy the file to the Copy2Here folder and once the
transfer is complete, then do I move the file to the Move2Here folder.
Moving files from withing a shared directory will eliminate the EOF errors
and loops you are encountering.
An alternative is to create a detailed loop that checks for the EOF, and
when successful, will pass on to the remainder of the script, as an event
handler. I don't know your desired application, and unfortunately, I can't
supply any sample code.
(I've actually stopped using Folder Actions personally...If I have a need
for such behavior, I setup cron jobs that check the folder at a given
interval, ie 5 minutes--that's beside the point though ;-)
Worst case, I would save the file to the Desktop first, and then copy to the
share directory. Personal habit is to NEVER SAVE directly to a network
volume from an application.
Hope this helps,
Jake
On 11/18/04 2:15 PM, "Richard Allaway" <email@hidden> wrote:
> Hello -
>
> I'm having some trouble with folder actions and Illustrator CS. When I save a
> file from Illustrator to a folder on the network my folder action is
> activating before the save in complete - often it's AITempFile (or some
> similar name) that gets processed. In fact this happens when saving pdfs from
> Acrobat too. Here's an on-adding-folder-items-to that I wrote to try to fix
> the problem:
>
> on adding folder items to theFolder after receiving theAddedItems
> local _ready
> set _ready to false
> repeat with theFile in every item of theAddedItems
> repeat while not _ready
> try
> get busy status of (get info for theFile)
> set _ready to true
> on error
> set _ready to false
> end try
> end repeat
> repurpose thru theFile -- this is the business end handler call.
> end repeat
> end adding folder items to
>
> And sure enough it doesn't work - the loop either loops forever (or until I
> get cross and stop it) or I get an 'Unknown Scripting Error'
>
> Anyway, surely 'get busy status' shouldn't really either throw an error or
> 'false' - or does that make sense to people that understand these sorts of
> things better than I?
>
> Sorry if this has been covered before, and for not trying harder to fix it
> myself, only my brain is starting to hurt
>
> Thankyou
> Richard
> _______________________________________________
> 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
_______________________________________________
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