• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
URL Access Scripting completion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: URL Access Scripting completion
      • From: Doug McNutt <email@hidden>
  • Prev by Date: Panorama and AppleScript
  • Next by Date: Re: URL Access Scripting completion
  • Previous by thread: RE: [META] proper use of mailing list (was RE: Capturing current handler name in a string variable)
  • Next by thread: Re: URL Access Scripting completion
  • Index(es):
    • Date
    • Thread