Re: System Events - Property Lists


Dave
 

Hi,

It’s hard to know when you need (), I usually add them anyway but this time I forgot!

The thing that threw me here was again the error message, it actually display the correct path name in the error which I took to mean the parameter itself was ok.

I’ve found System Events adequate for that I want, which is pretty simple.

All the Best
Dave

On 1 May 2020, at 05:10, Shane Stanley <sstanley@myriad-com.com.au> wrote:

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.