93e49a6b03
Defaults and other fixes
15 lines
No EOL
320 B
Text
15 lines
No EOL
320 B
Text
var app = Application.currentApplication()
|
|
app.includeStandardAdditions = true
|
|
app.activate()
|
|
|
|
ObjC.import("stdlib")
|
|
ObjC.import("stdio")
|
|
|
|
var res = app.{{.Operation}}({{json .Text}}, {{json .Options}})
|
|
if (res.gaveUp) {
|
|
$.exit(5)
|
|
}
|
|
if (res.buttonReturned === {{json .Extra}}) {
|
|
$.puts(res.buttonReturned)
|
|
$.exit(1)
|
|
} |