zenity/internal/zenutil/osascripts/msg.gojs
Nuno Cruces 93e49a6b03 Merge pull request #6 from ncruces/dev
Defaults and other fixes
2021-03-04 13:31:10 +00:00

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)
}