How to read a specific value in a plist file?

I've read this: Reading and writing plists from Execute Script actions and would like to find a way to read the values of:



I'd like to assign them to the variables fileslang and filetlang. How should I proceed?

@JMichaelTX JXA code to read and write NSAttributedStrings would be a good starting point. Basically, you’d need to write some JXA to read the plist and then parse the resulting structure.

I'm still looking for a way to read a particular key from a certain plist. I found an example AppleScript and adapted it to my needs. However, I get an error. Don't know what to do now. Please help.

Actually Peter, I think @ComplexPoint has previously published some JXA tools to handle plist files. Maybe he could help out here.

The script works on “normal” plist files. Except for the one I need it to work on. I guess that the value that I’m trying to get is nested too deep. So I’ll try a more clumsy approach by reading the whole plist to the clipboard and do a regular expression search for \<key\>fileslang.*\<\/string\> and then check what’s in between <string> and </string>. Or so.