• 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: Fri, 9 Jan 2009 00:03:11 -0800

On Jan 8, 2009, at 1:39 PM, Fuller Luther wrote:

On Jan 8, 2009, at 3:16 PM, Scott Haneda wrote:
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

So far, we have ...

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

Note the change I made. The 'set dest to ...' line will error if the folder "Dropbox" does not exist in the specified location. If that's where you want the new internet locator file saved, then you WILL have to create this folder manually.


Hooray, so it is working. Now I have a new issue, which is the Dropbox is shared across many machines, and of course, .webloc files still use resource forks, which are not cross platform, let alone able to move across non Mac volumes.

Here is where I am at now, and would like to save the url into a .url file:

set dest to (path to home folder from user domain as text) & "Dropbox:" & "URLs"
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


So, right where I am making the new internet location file, I need to instead save a text file, as filename of dname & ".url" with the data in the file being:
[InternetShortcut]
URL=http://theurl.exampple.com


I will give it a go, any help will 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
  • Follow-Ups:
    • Re: Script to save webloc
      • From: "Michael Grant" <email@hidden>
    • 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>)
 >Re: Script to save webloc (From: Scott Haneda <email@hidden>)
 >Re: Script to save webloc (From: Fuller Luther <email@hidden>)

  • Prev by Date: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Next by Date: Iterating over items in a record, possible?
  • Previous by thread: Re: Script to save webloc
  • Next by thread: Re: Script to save webloc
  • Index(es):
    • Date
    • Thread