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 12:23:33 -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
I have been trying every which way I can. Applescript paths are
getting in my way. I want to save the file to ~/somefolder which is
in my home folder, but nothing I try works:
set dest to "/Users/me/somefolder"
set dest to "/Users/me/somefolder/"
set dest to ":Users:me:somefolder"
set dest to ":Users:me:somefolder:"
set dest to "Volumes:drive:Users:me:somefolder"
set dest to ":Volumes:drive:Users:me:somefolder"
set dest to "drive:Users:me:somefolder"
set dest to ":drive:Users:me:somefolder"
None of those seem to work, I have also added "as string" to the end
and still get an error. Any help would be appreciated.
--
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