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

后端 未结 2 1470
一向
一向 2020-12-18 06:20

What I\'m doing is executing an AppleScript inside of Cocoa. It returns some data as a NSAppleEventDescriptor, which NSLog() prints like so:



        
相关标签:
2条回答
  • 2020-12-18 07:20

    That's a record, not a list. Try descriptorForKeyword:, passing the constant matching the four-character code you want. (The constants are declared in the Apple Events headers.)

    0 讨论(0)
  • 2020-12-18 07:25
    [[aDescriptor descriptorForKeyword:keyAEKeyData] stringValue]
    
    0 讨论(0)
提交回复
热议问题