Is there any way to cancel a running NSUserScriptTask? The only way that comes to mind is to launch a separate process (a command line tool) via NSTask, whose only purpose is to run the NSUserScriptTask, and then terminate the command line tool via NSTask when necessary. However, that seems a bit far-fetched and not very optimized... Any ideas?
NSUserScriptTask: cancelling tasks?
Asked Answered
I think you've already found the best answer to that. The executor isn't intended to be cancelled. –
Dichroite
Yeah, well, but if this is a replacement of sorts of the NSTask/NSAppleScript/AMWorkflow classes it should be able to be cancelled, right? –
Internee
One would think, but there isn't any provision for it in the API at least. –
Dichroite
© 2022 - 2024 — McMap. All rights reserved.