<pre>on doToSelectedButtons layer,doWhat  toComputer  put "Show,Hide,Delete" into doWhatDomain  if doWhat is not in doWhatDomain then exit doToSelectedButtons  put selectedButtons(layer) into theSelectedButtons  if theSelectedButtons is empty then exit doToSelectedButtons  ---------------------------------------------------------------------------  if layer is "card" or layer is "cd" then    repeat with x = 1 to the number of cd btns      if the id of cd btn x is in theSelectedButtons then        if doWhat is "Show" then show cd btn x        if doWhat is "Hide" then hide cd btn x        if doWhat is "Delete" then delete cd btn x      end if    end repeat  end if  ---------------------------------------------------------------------------  if layer is "background" or layer is "bkgnd" or layer is "bg" then    repeat with x = 1 to the number of bg btns      if the id of bg btn x is in theSelectedButtons then        if doWhat is "Show" then show bg btn x        if doWhat is "Hide" then hide bg btn x        if doWhat is "Delete" then delete bg btn x      end if    end repeat  end ifend doToSelectedButtons</pre>