zenity/internal/zenutil/osascripts/dialog.gojs
2022-03-27 00:05:52 +00:00

16 lines
No EOL
337 B
Text

var app = Application.currentApplication()
app.includeStandardAdditions = true
app.activate()
ObjC.import('stdio')
ObjC.import('stdlib')
var res = app.{{.Operation}}({{json .Text}}, {{json .Options}})
if (res.gaveUp) {
$.exit(5)
}
if (res.buttonReturned === {{json .Extra}}) {
$.puts(res.buttonReturned)
$.exit(1)
}
res.textReturned