zenity/internal/zenutil/osascripts/msg.gojs
2021-03-03 16:05:11 +00:00

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
}