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