Re: System Events - Property Lists


Shane Stanley
 

On 1 May 2020, at 6:02 am, Dave <dave@looktowindward.com> wrote:

That used to read:

tell property list file pMWLPrefsFilePOSIXPath of me

So, assigning it to local storage and using the local made it work! wtf! AppleScript is in a class of its own when it comes to weird happens!!!
No, what fixed it was that you stopped misusing "of me".

Your original is looking for a property list file "of me", where only the variable belongs to "me".

If you had said:

tell property list file (pMWLPrefsFilePOSIXPath of me)

it would work fine.

But you'll find it's much simpler and faster to use AppleScriptObjC for property lists. System Events is pretty poor at it.


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

Join applescript@apple-dev.groups.io to automatically receive all group messages.