14 lines
No EOL
297 B
Text
14 lines
No EOL
297 B
Text
var app = Application.currentApplication()
|
|
app.includeStandardAdditions = true
|
|
app.activate()
|
|
|
|
var res = app.{{.Operation}}({{json .Text}}, {{json .Options}})
|
|
if (res.gaveUp) {
|
|
ObjC.import("stdlib")
|
|
$.exit(5)
|
|
}
|
|
if (res.buttonReturned === {{json .Extra}}) {
|
|
res.buttonReturned
|
|
} else {
|
|
void 0
|
|
} |