2020-01-04 22:21:39 -05:00
|
|
|
var app = Application.currentApplication()
|
|
|
|
app.includeStandardAdditions = true
|
|
|
|
app.activate()
|
|
|
|
|
|
|
|
var opts = {}
|
|
|
|
|
2020-01-06 07:01:51 -05:00
|
|
|
{{if .Message -}}
|
|
|
|
opts.message = {{.Message}}
|
|
|
|
{{end -}}
|
|
|
|
{{if .As -}}
|
|
|
|
opts.as = {{.As}}
|
|
|
|
{{end -}}
|
|
|
|
{{if .Title -}}
|
|
|
|
opts.withTitle = {{.Title}}
|
|
|
|
{{end -}}
|
|
|
|
{{if .Icon -}}
|
|
|
|
opts.withIcon = {{.Icon}}
|
|
|
|
{{end -}}
|
2020-01-04 22:21:39 -05:00
|
|
|
{{if .Buttons -}}
|
|
|
|
opts.buttons = {{.Buttons}}
|
|
|
|
{{end -}}
|
|
|
|
{{if .Default -}}
|
|
|
|
opts.defaultButton = {{.Default}}
|
|
|
|
{{end -}}
|
|
|
|
{{if .Cancel -}}
|
|
|
|
opts.cancelButton = {{.Cancel}}
|
|
|
|
{{end -}}
|
|
|
|
|
2020-01-06 07:01:51 -05:00
|
|
|
app[{{.Operation}}]({{.Text}}, opts).buttonReturned
|