Update: sorry I got the lingo wrong. I did not mean “selected item” (as in the item is actually selected for immediate user input). I meant “an item that the user can tab into”. Apologies.
The syntax is:
if button returned of (display dialog “[[template:message]]” buttons {[[template:“Cancel”, “OK”]]} default button [[linked-template:“OK”]] is [[linked-template:“OK”]] then
[[select:-- your code goes here…]]
end if
but it only returns:
if button returned of (display dialog “#~message~#” buttons {#~“Cancel”, “OK”~#} default button #=~“OK”~# is #=~“OK”~# then
– your code goes here…
end if
and the “you code goes here…” is not turned into a selected item.
I tried to use select: in a different context, for ex:
tell application "[[template:application]]”
[[select:-- your code goes here]]
end
And here too it did not produce anything.
So, is there something wrong with the “select:” template, or am I missing something ( <- just added this bit ) ?