Created
February 18, 2021 17:35
-
-
Save chengjianhua/a148dc2d8b7f179b62e48d20204ddf40 to your computer and use it in GitHub Desktop.
Execute shell in javascript for automation (osascript) #osx #alfred
This file contains 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("stdlib"); | |
function run(argv) { | |
const app = Application.currentApplication() | |
app.includeStandardAdditions = true | |
app.doShellScript(`open https://www.baidu.com`) | |
var query = argv[0]; | |
return query; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment