Created
March 17, 2015 14:38
-
-
Save ljlin/2146b2ed580db6a05ed5 to your computer and use it in GitHub Desktop.
JavaScript for OS X Automation, NSTask, jar
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
ObjC.import("Cocoa"); | |
var MarsPath = "/Applications/Mars4_5.jar" | |
var arg = $.NSArray.arrayWithObjects(MarsPath) | |
var task = $.NSTask.alloc.init | |
task.setLaunchPath("/usr/bin/open") | |
task.setArguments(arg) | |
task.launch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for sharing!