2021-04-07 09:16:35 -04:00
|
|
|
var app = Application.currentApplication()
|
|
|
|
app.includeStandardAdditions = true
|
2022-05-12 13:16:31 -04:00
|
|
|
app.activate()
|
2021-04-07 09:16:35 -04:00
|
|
|
|
2022-05-06 08:48:31 -04:00
|
|
|
ObjC.import('stdio')
|
|
|
|
ObjC.import('stdlib')
|
|
|
|
|
|
|
|
try {
|
|
|
|
var res = app.chooseFromList({{json .Items}}, {{json .Options}})
|
|
|
|
} catch (e) {
|
|
|
|
$.dprintf(2, e)
|
|
|
|
$.exit(-1)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (res === false) $.exit(1)
|
2021-07-08 13:56:28 -04:00
|
|
|
if (res.length !== 0) res.join({{json .Separator}})
|