更新时间:2023-02-12 15:53:30
快速示例:
NSString *theScript = @"set theTimeString to time string of (current date)\n"
"return theTimeString";
NSDictionary *errorInfo = nil;
NSAppleScript *run = [[NSAppleScript alloc] initWithSource:theScript];
NSAppleEventDescriptor *theDescriptor = [run executeAndReturnError:&errorInfo];
NSString *theResult = [theDescriptor stringValue];
NSLog(@"%@",theResult);
输出:
下午 2:36:06