Enumerate a property list item array using AppleScript -


i attempting enumerate recentapplication > customlistitems property-list item's array of property-list file (.plist), having difficulty syntax:

tell application "system events"    set plist_path "~/library/preferences/com.apple.recentitems.plist"   set plist_file property list file plist_path    set itemnodes property list item "customlistitems" of property list item "recentapplications" of plist_file    repeat 1 number of items in itemnodes      set itemnode item of itemnodes      display dialog text of property list item "name" of property list item itemnode    end repeat  end tell 

i error reads:

"system events got error: can’t make every text of property list item \"name\" of property list item (property list item \"customlistitems\" of property list item \"recentapplications\" of contents of property list file \"macintosh hd:users:craibuc:library:preferences:com.apple.recentitems.plist\") type string." number -1700 every text of property list item "name" of property list item (property list item "customlistitems" of property list item "recentapplications" of contents of property list file "macintosh hd:users:craibuc:library:preferences:com.apple.recentitems.plist") string

moreover, if change code to:

  repeat 1 number of items in itemnodes      display dialog    end repeat 

i single dialog. in other words, doesn't seem examining array itself.

what correct way capture pli's array?

the correct syntax is:

set itemnodes property list items of property list item "customlistitems" of property list item "recentapplications" of plist_file 

i needed add 'property list items of'.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -