Re: URL access scripting
Re: URL access scripting
- Subject: Re: URL access scripting
- From: Michael Turner <email@hidden>
- Date: Thu, 13 Dec 2001 11:30:08 -0500
Rachel,
The app is attempting to dl 'test.txt' & name it 'desktop'.
try:
set the destination_file to ((path to desktop as string) & "test.txt")
and:
download "
ftp://ftp.MacOSphere.com/test.txt" to file destination_file
The word 'file' is a keyword expecting a string (path)
Here is a complete, tested working dl URL Access script:
-- begin
set the target_URL to
"
ftp://machine.dom.com/fsysA/home/me/inbox/test.txt"
set the destination_file to ((path to desktop as string) & "test.txt")
tell application "URL Access Scripting"
download target_URL to file destination_file with authentication
end tell
tell application "Finder" to open destination_file
-- end
--very similar to Michelle's script, thanks Michelle
Some other pitfalls I experienced include the "as alias" thing when you
use the "choose file" construct. Simple enough, "file" expects a string.
"choose" creates an alias.
/Michael
On Thursday, December 13, 2001, at 10:03 AM, Gnarlodious wrote:
>
OK, I am saying:
>
>
tell application "URL Access Scripting"
>
download "ftp://ftp.MacOSphere.com/test.txt" to desktop
>
end tell
>
>
But getting error "Can't make some data into the expected type"
>
>
What's wrong?
>
>
Thanks
>
_______________________________________________
>
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.