RE: Force quiting URL Access Scripting
RE: Force quiting URL Access Scripting
- Subject: RE: Force quiting URL Access Scripting
- From: "Wadson, David" <email@hidden>
- Date: Thu, 25 Jul 2002 15:34:21 -0400
Best that I've been able to come up with is using URL Access Scripting and
display the progress window which has a stop button.
I have the script timeout after a length of time that is sufficient enough
to be sure the file has fully downloaded. After the timeout triggers, I have
the downloaded file copied to another location and then throw up a dialog
asking the user to hit "Stop". When they hit "Stop", URL Access Scripting
quits, deleting the file it was downloading, but the copy that I made of it
still exists. A real cludge and requires the user to be sitting there
watching the script. I suppose you could use Prefab Player to hit the "Stop"
button for you though.
A better solution to this would save this rather convoluted approach...
Dave
>
----------
>
From: Doug McNutt
>
Sent: Thursday, July 25, 2002 1:12 PM
>
To: email@hidden
>
Subject: Re: Force quiting URL Access Scripting
>
>
At 11:01 -0400 7/10/02, Wadson, David wrote:
>
>Is it possible to force URL Access Scripting to stop downloading. I
>
download
>
>a of couple files from web server that doesn't properly close the
>
connection
>
>after I've received the files. As a result, URL Access Scripting just
>
hangs
>
>and telling it to "quit" doesn't do anything. Is there someway of forcing
>
it
>
>to stop the download when the download times out?
>
>
I too have the same problem. URL Access Scripting remains in the process
>
menu and has a file-quit menu item that doesn't work.
>
>
Force quitting using CMD-OPT-ESC quits it but crashes this G4, running 9.2
>
AS 1.8.3, about 50 % of the time.
>
>
My script downloads several files and all attempts after the first failure
>
also fail. Re-executing the script with URL Access still running as a
>
process results in failure of all downloads.
>
>
If it's a known bug I'd like to know about it.
>
>
on process(aURL, aName)
>
try
>
with timeout of 300 seconds
>
tell application "URL Access Scripting"
>
download aURL to file theDownload replacing yes without
>
unpacking
>
end tell
>
end timeout
>
on error
>
set OKflag to false
>
say "download " & aName & " failed"
>
tell application "URL Access Scripting"
>
quit
>
end tell
>
end try
>
end
>
--
>
>
Applescript syntax is like English spelling:
>
Roughly, but not thoroughly, thought through.
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.