zenity/internal/zenutil/osascripts/msg.gojs
2021-02-19 17:46:47 +00:00

14 lines
No EOL
288 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
} else {
void 0
}