I want to read information of Safari's bookmarks.plst and put it into a variable.
The plist file is a binary plist "~/Library/Safari/Bookmarks.plist".
Two ways are available: one is using "extractText" function, and another is using "set the text" command. The latter needs a field for buffering.
[Method 1]
on mouseUp
put the ticks into t
get extractText(POSIXtoHFS(cd fld "plistPath"),"plist")
put the ticks - t into cd fld "result1"
end mouseUp
[Method 2]
on mouseUp
put the ticks into t
set the text of cd fld "buffer" to utf8 file POSIXtoHFS(cd fld "plistPath")
get cd fld "buffer"
put the ticks - t into cd fld "result2"
end mouseUp
I think these ways are essentially identical, but, elapsed times of them are significantly different.
In my trials, "extraText" function requires few minutes, while "set the text" command only few seconds.
Why does "extraText" need such long time?