Re: Folder actions and Illustrator files
Re: Folder actions and Illustrator files
- Subject: Re: Folder actions and Illustrator files
- From: "Shane Stanley" <email@hidden>
- Date: Fri, 19 Nov 2004 09:01:37 +1100
On Thu, 18 Nov 2004 12:15:37 -0800, Richard Allaway wrote:
>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)
You can't use busy status in OS X -- it always returns false. One
workaround is to try opening the file for read access:
repeat
try
set fileRef to open for access thefile with write permission
-- got here so it's not busy; close it and exit
close access fileRef
exit repeat
on error
-- still open, so loop
delay 2
end try
end repeat
--
Shane Stanley <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