• 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: scripting in Safari
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting in Safari


  • Subject: Re: scripting in Safari
  • From: "Mark J. Reed" <email@hidden>
  • Date: Sun, 23 Dec 2007 21:15:26 -0500

On Dec 23, 2007 9:08 PM, Mark J. Reed <email@hidden> wrote:
Since it turns out you can do this with System Events rather than a third-party OSAX, I ported it over to do so.  There is only one change needed - change this line:


set bookmarks to (read property list file plistFile)

to this:

tell application "System Events" to set bookmarks to the value of contents of property list file plistFile as record

The rest of the script works unchanged.

Oh, not quite true.  The "property list file pListFile" constructor expects pListFile to be a POSIX path rather than a Mac path.  So the original set line needs to change as well, from this:

set plistFile to (path to home folder as text) & "Library:Safari:Bookmarks.plist"


to this

set pListFile to (POSIX path of file (path to home folder as text)) & "Library/Safari/Bookmarks.plist"




--
Mark J. Reed <email@hidden>
 _______________________________________________
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: scripting in Safari
      • From: Michelle Steiner <email@hidden>
References: 
 >scripting in Safari (From: Clint Hoxie <email@hidden>)
 >Re: scripting in Safari (From: Rob Stott <email@hidden>)
 >Re: scripting in Safari (From: "Mark J. Reed" <email@hidden>)
 >Re: scripting in Safari (From: "Mark J. Reed" <email@hidden>)
 >Re: scripting in Safari (From: Clint Hoxie <email@hidden>)
 >Re: scripting in Safari (From: "Mark J. Reed" <email@hidden>)
 >Re: scripting in Safari (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: ISO time "class"
  • Next by Date: Re: scripting in Safari
  • Previous by thread: Re: scripting in Safari
  • Next by thread: Re: scripting in Safari
  • Index(es):
    • Date
    • Thread