URL Access Scripting completion
URL Access Scripting completion
- Subject: URL Access Scripting completion
- From: "Daniel A. Shockley" <email@hidden>
- Date: Fri, 28 Dec 2001 17:57:11 -0500
Hello all,
I do a lot of scripting using URL Access Scripting to download files
and forms. However, it seems that even though UAS's dictionary states
that the result of a download is a file specification, it only
returns an incorrect folder spec. See the following:
tell application "URL Access Scripting"
activate
set savedFile to (download "
http://www.apple.com" to file ,
"Legate:Desktop Folder:TESTING:tempfile.html"
replacing yes with progress)
end tell
return savedFile
--> file "Legate:Desktop Folder:TESTING::"
So, even though it's supposed to return a valid file, it returns a
value BEFORE the file even exists, resulting in a completely wrong
file spec. I've tried various ideas, like checking to make sure the
file expected if there, but that won't work well if you're already
replacing existing file. In that case, the file _does_ already exist,
so it will return the old file.
Any ideas on an elegant, fast way to do this? No Finder "delay"
loops, please. Remember that the file specified may _already_ exist.
I may try to check to see if the user wants the file replaced, and
delete it first, so that the check will fail, but even that seems to
have problems. I can write with more specific details, if no one can
come up with a good solution.
--
----
Daniel A. Shockley
email@hidden
email@hidden
http://www.danshockley.com