zenity/internal/zenutil/osascripts/msg.gojs

14 lines
297 B
Text
Raw Normal View History

2020-01-21 07:03:58 -05:00
var app = Application.currentApplication()
app.includeStandardAdditions = true
app.activate()
2021-03-03 11:05:11 -05:00
var res = app.{{.Operation}}({{json .Text}}, {{json .Options}})
2020-01-28 07:46:43 -05:00
if (res.gaveUp) {
ObjC.import("stdlib")
$.exit(5)
}
if (res.buttonReturned === {{json .Extra}}) {
2021-03-03 06:56:41 -05:00
res.buttonReturned
2020-01-28 07:46:43 -05:00
} else {
void 0
}