Re: get Applescript to act on a file once it has been downloaded
Re: get Applescript to act on a file once it has been downloaded
- Subject: Re: get Applescript to act on a file once it has been downloaded
- From: Shane Stanley <email@hidden>
- Date: Sat, 12 Jul 2014 13:36:29 +1000
On 12 Jul 2014, at 12:15 am, William Adams <email@hidden> wrote:
tell application "Finder" activate repeat while not (exists POSIX file newfile) delay 0.5 end repeat end tell
There's really no need to get the Finder involved at all. You can instead try to coerce to an alias; it will only succeed if the file exists. So:
repeat try set newfileAlias to (POSIX file newfile) as alias exit repeat on error delay 0.5 end try end repeat -- do something with newfileAlias here
now I need to puzzle out why the file doesn't get copied by a later block.
Just because a file exists, doesn't mean it's been fully downloaded. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden