I have a simple AppleScript that sends an email. How can I call it from within a Swift application?
(I wasn't able to find the answer via Google.)
Tested: one can do something like this (arbitrary script path added):
import Foundation
let task = Process()
task.launchPath = "/usr/bin/osascript"
task.arguments = ["~/Desktop/testscript.scpt"]
task.launch()