2
這是我使用的代碼:無法解析由NSAppleScript方法executeAndReturnError返回的結果
NSDictionary *errorInfo=nil;
NSString *[email protected]"tell application \"Mail\"\nget name of mailbox of every account\nend tell";
NSAppleScript *run = [[NSAppleScript alloc] initWithSource:source];
NSAppleEventDescriptor *aDescriptor=[[NSAppleEventDescriptor alloc]init];
aDescriptor=[run executeAndReturnError:&errorInfo];
[aDescriptor coerceToDescriptorType:'utxt'];
NSLog(@"result:%@",[aDescriptor stringValue]);
輸出,我得到: 結果:(空)
請幫我人在這。提前感謝:)