• 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: ANNOUNCE: Property List Tools 1.0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ANNOUNCE: Property List Tools 1.0


  • Subject: Re: ANNOUNCE: Property List Tools 1.0
  • From: Walter Ian Kaye <email@hidden>
  • Date: Fri, 2 Apr 2004 22:57:04 -0800

At 05:29p -0600 04/02/2004, Joshua See didst inscribe upon an electronic papyrus:

On Apr 2, 2004, at 10:16 AM, Mark Alldritt wrote:
Hi Folks,

I've just posted a new freeware Scripting Addition called Property List
Tools. Property List Tools allows AppleScript to read and write Property
List files. The addition can flatten any AppleScript data structure for
storage in a property list. Property List Tools also allows your scripts to
interoperate with other software that uses the property List file format.

http://www.latenightsw.com/freeware/PListTools/index.html

Nice. It solves the biggest problem with using defaults, navigating nested items. Now how about the second biggest problem, parsing alias or navigation services keys?

I guess not all of my pre-PListTools defaults/coercion coding was for naught!
Below is a coercion routine you can use to coerce 'data' to 'alis'.

property pcls : run script "<<class pcls>>" --###use real chevrons###

set pref to POSIX path of (path to "pref" from user domain)
set ri_rec to read property list POSIX file (pref & "com.apple.recentitems.plist")
set alist to |doc-aliases| of ri_rec
CoerceThruFile(item 1 of alist, "", alias)

on CoerceThruFile(theInput, inputClass, outputClass)
local theInput, inputClass, outputClass, tempfile, fref, theOutput
set tempfile to POSIX file ("" & "/tmp/cast")
try
close access tempfile
end try
set fref to open for access tempfile with write permission
set eof fref to 0
if class of inputClass is pcls then
write theInput to fref as inputClass
else
write theInput to fref
end if
if class of outputClass is pcls then
set theOutput to read fref from 1 as outputClass
else
set theOutput to read fref from 1
end if
close access fref
theOutput
end CoerceThruFile


-boo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: ANNOUNCE: Property List Tools 1.0
      • From: Paul Skinner <email@hidden>
References: 
 >ANNOUNCE: Property List Tools 1.0 (From: Mark Alldritt <email@hidden>)
 >Re: ANNOUNCE: Property List Tools 1.0 (From: Joshua See <email@hidden>)

  • Prev by Date: Re: Utility to show key codes?
  • Next by Date: Re: Utility to show key codes?
  • Previous by thread: Re: ANNOUNCE: Property List Tools 1.0
  • Next by thread: Re: ANNOUNCE: Property List Tools 1.0
  • Index(es):
    • Date
    • Thread