Re: scripting in Safari
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