• 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 script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

URL access script


  • Subject: URL access script
  • From: John Snider <email@hidden>
  • Date: Mon, 12 Mar 2001 13:35:40 -0600

The following script is straight out of the applescript help file!
As you will notice in the line starting 'display dialog', I get the error note a line or two below.
I have checked and cannot see any differences in the original except for my url stuff to replace the generics..
I am trying to test it and can't figure out what the heck is wrong. What am I not seeing?
Do I need glasses, or what?
Any comments? and gramercy

set the item_name to "jsnider.html"
set the parent_directory to "ftp://ftp.scican.net/~jsnider/";
-- I may need the 'www' directory here, but am not sure as my ISP may not require it but can't
decide cuz
-- the syntax error keeps coming up
set this_URL to (the parent_directory & the item_name)
set the local_filepath to (("Macintosh HD:desktop folder:webtransfers" as text) & the item_name)
set the timeout_amount to 1800
try
with timeout of timeout_amount seconds
tell application "URL Access Scripting"
download this_URL to the local_filepath ,
replacing yes with progress -- no unpacking necessary as its a straight html text file
-- and the actual files to be used are ascii text anyway
end tell
end timeout
on error error_Message number error_Number
if the error_Number is not -128 then
tell application ("Macintosh HD:Applescriptf:Applescript:Script Editor" as text)
display dialog ("Error number: " & (error_Number as text) & ,
return & return & ,
error_Message) buttons {"OK"} default button 1 giving up after 15
-- 'expected end of line but found identifier.' is the error message
-- with the word 'giving' selected on screen
end tell
end if
end try
tell application "URL access scripting" to quit


  • Follow-Ups:
    • Re: URL access script
      • From: David Graham <email@hidden>
  • Prev by Date: Pagemaker 6.5
  • Next by Date: Re: Long Filenames with Applescript
  • Previous by thread: Re: Pagemaker 6.5
  • Next by thread: Re: URL access script
  • Index(es):
    • Date
    • Thread