Created
October 23, 2014 16:37
-
-
Save dtinth/c6693fe62280d1ac3512 to your computer and use it in GitHub Desktop.
Example JavaScript for Automation Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env osascript -l JavaScript | |
ObjC.import('Cocoa') | |
function alert(text) { | |
var alert = $.NSAlert.alloc.init | |
var window = alert.window | |
window.level = $.NSStatusWindowLevel | |
alert.messageText = text | |
var result = alert.runModal | |
} | |
function run(argv) { | |
alert(argv[0]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment