Monday, October 22, 2018

#1 2018-05-11 09:00:34 am

ame
Member
Registered: 2011-06-28
Posts: 178

Count total number of elements of key in pList

Hi,

I would like to know if using asoc is possible to count elements (without creating a small routine that parses the entire pList) a "key" (Array or Dictionary) that is placed many times inside the pList.
Something to one-liner command... that say "count the contents of key "xyz" everywhere in the pList
This because for manage a progress bar in myApp, I need to know before the total number of objects and when I parse the pList getting the object I pass the data to InDesign for automatic pagination and I increase the counter for the progress bar.

Stefano - Ame


Filed under: count, plist, key

Offline

 

#2 2018-05-11 05:20:48 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5454

Re: Count total number of elements of key in pList

In short, no.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)