Re: Script to save webloc
Re: Script to save webloc
- Subject: Re: Script to save webloc
- From: Scott Haneda <email@hidden>
- Date: Thu, 8 Jan 2009 01:58:22 -0800
On Jan 8, 2009, at 1:51 AM, Philip Aker wrote:
On 2009-01-08, at 01:37:42, Scott Haneda wrote:
Sorry about this, I replied to author only, and want to get this
back on the list...
Ok, so I take it first I need to get the url out of Safari? Would
the general psuedo code be something like this:
tell application "Sarafi"
-- get first current url of current tab
end tell
tell application "Finder"
--set dest to (folder "Users:me:Desktop" of startup disk) as alias
--( is that how I do the path? )
--make new internet location file at dest to theURL
--( theURL is the result of the url from the first tell block? )
end tell
I don't use tabs in Safari but this works for me:
set dest to (path to desktop)
tell application "Safari"
set curl to URL of document 1
set dnam to name of document 1
end tell
tell application "Finder"
make new internet location file at dest to curl with properties
{name:dnam}
end tell
Thanks, that works perfect. Can you tell me how to save to ~/
Documents/URLs as my destination instead? Is it just set dest to
"Users:me:Documents:URLs:" ?
--
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden