• 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
Re: Script to save webloc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script to save webloc


  • Subject: Re: Script to save webloc
  • From: Scott Haneda <email@hidden>
  • Date: Thu, 8 Jan 2009 13:16:28 -0800

On Jan 8, 2009, at 12:23 PM, Scott Haneda wrote:


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.


Also trying this and still not getting anywhere:
( Dropbox does exist in my home folder )

set homeFolder to (path to home folder from user domain)
tell application "Finder"
	set someFolder to (folder "Dropbox" of homeFolder) as alias
	set dest to someFolder
end tell
display dialog dest as string

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


It worked just fine up the point where I tried to not use (path to Desktop)
--
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
  • Follow-Ups:
    • Re: Script to save webloc
      • From: Fuller Luther <email@hidden>
References: 
 >Script to save webloc (From: Scott Haneda <email@hidden>)
 >Re: Script to save webloc (From: Fuller Luther <email@hidden>)
 >Re: Script to save webloc (From: Scott Haneda <email@hidden>)
 >Re: Script to save webloc (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Converting Tiff's to PDF
  • Next by Date: Re: Script to save webloc
  • Previous by thread: Re: Script to save webloc
  • Next by thread: Re: Script to save webloc
  • Index(es):
    • Date
    • Thread