HyperCard: Script to Execute a Statement for Each Button (7/92)

This handler repeatedly executes a given statement for each button in the
current card or background.

on doToEachButton whatToDo,options
if options is not "bkgndOnly" then
repeat with i = 1 to the number of buttons
send whatToDo to button i
end repeat
end if
if options is not "cardOnly" then
repeat with i = 1 to the number of bkgnd buttons
send whatToDo to bkgnd button i
end repeat
end if
end doToEachButton


This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012