Post

Replies

Boosts

Views

Activity

AppleScript Crashed Question
I ran an applescript script in a Mac application,but the software crashes when it runs. This is the information I got, but I can’t get more useful information from it. Please help me, thank you. Crashed: com.apple.root.default-qos 0 AppleScript 0x1057cae80 UASStartTellScope1(TUASCommand*) + 90 1 AppleScript 0x1057bb7d8 ReductionProc + 610 2 AppleScript 0x1057cb91d TASParser::Parse(TTerminology*, TUASValue*, char const*, unsigned long) + 1309 3 AppleScript 0x1057b330f ASCompile(AEDesc const*, int, unsigned int*) + 533 4 AppleScript 0x1057ae099 AppleScriptComponent + 1741 5 AppleScript 0x1057c8673 AGenericCall::Delegate(ComponentInstanceRecord*) + 37 6 AppleScript 0x1057c862b AGenericManager::HandleOSACall(ComponentParameters*) + 55 7 AppleScript 0x1057c7c30 GenericComponent + 108 8 OpenScripting 0x7fff915a5a4b OSACompile + 57 9 Foundation 0x7fff938715f1 -[NSAppleScript compileAndReturnError:] + 139 10 Foundation 0x7fff938718cb -[NSAppleScript(NSPrivate) _executeWithMode:andReturnError:] + 68 this is my code: var returnString = "" let myAppleScript = ..... var error: NSDictionary? if let scriptObject = NSAppleScript(source: myAppleScript) { if let outputString=scriptObject. executeAndReturnError (&error).stringValue {returnString = outputString} else if (error != nil) {returnString = "\(error!)"}}
2
0
930
Jun ’20