appleevents

How to Extract AppleScript Data from a NSAppleEventDescriptor in Cocoa and Parse it

元气小坏坏 提交于 2019-11-28 01:13:30
问题 What I'm doing is executing an AppleScript inside of Cocoa. It returns some data as a NSAppleEventDescriptor , which NSLog() prints like so: <NSAppleEventDescriptor: 'obj '{ 'form':'name', 'want':'dskp', 'seld':'utxt'("69671872"), 'from':'null'() }> I want to take that data and turn it into a NSDictionary or NSArray , or something useful so I can extract stuff from it (specifically I'm after the field holding the "69671872" number). It appears to be an array of some sort, but my knowledge