Skip to content

Instantly share code, notes, and snippets.

View chbeer's full-sized avatar

Christian Beer chbeer

View GitHub Profile
@chbeer
chbeer / gist:3666e4b7b2e71eb47b15eaae63d4192f
Last active September 13, 2023 01:02 — forked from odrobnik/gist:e8ac59e13b62ea80b623
Calling AppleScript from Swift App, passing a parameter. Swift 3 version.
// updated for Swift 3
import Carbon
// Swift version of https://developer.apple.com/library/mac/technotes/tn2084/_index.html
@IBAction func testButtonPushed(sender: AnyObject) {
guard let url = NSBundle.main.url(forResource: "SendFinderMessage", withExtension: "scpt") else {
return
}