Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Folder Action: Move and then open after download completes



Title: Re: Folder Action: Move and then open after download completes
On 3/6/07 10:56, "Nick Hearn" <email@hidden> wrote:

repeat 20 times
    try
       open for access file x
-- if this succeeds, the file is not busy.
       close access result
        exit repeat
   on error
-- file is busy
       delay 3 -- times it out in 1 minute
   end try
end
repeat


That’s only going to open it for read access, which you can do even if the file is “busy”. Depending on the mechanism used to see if a file is “busy”, you may even be able to open it for write access.

As well, if the file is large, or taking a long time to download, it may in fact take longer than a minute.

--
"First in Asia"
1st Special Forces Group (Airborne)
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Folder Action: Move and then open after download completes (From: Nick Hearn <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.