on selectCard clearSelection
-- Group selection of cards.
-- This handler adds the current card to the currently
-- selected cards or clears the list of currently selected cards:
global selectedCards
if clearSelection is not empty then
put empty into selectedCards
put "No cards selected."
else
get long id of this card
if it is in selectedCards
then put word 1 to 3 of it & " is already selected."
else
put it & return after selectedCards
put word 1 to 3 of it & " is now selected."
end if
end if
end selectCard
This article is adapted from the Claris Tech Info database.