<pre>function selectedButtons layer  toComputer  ----------------------------------------------------------------------  if layer is "card" or layer is "cd" then    put liste("selectedCardButtons") into theSelectedButtons    if theSelectedButtons is empty then      if the number of cd btns = 0 then return empty      repeat with x = 1 to the number of cd btns        put the long name of cd btn x into line x of theSelectedButtons      end repeat    end if  end if  ----------------------------------------------------------------------  if layer is "background" or layer is "bkgnd" or layer is "bg" then    put liste("selectedBkgndButtons") into theSelectedButtons    if theSelectedButtons is empty then      if the number of bg btns = 0 then return empty      repeat with x = 1 to the number of bg btns        put the long name of bg btn x into line x of theSelectedButtons      end repeat    end if  end if  -----------------------------------------------------------------------  return theSelectedButtonsend selectedButtons</pre>