<pre>function listButtons  repeat with x = 1 to the number of bg btns    put the short name of bg btn x & return after theList  end repeat  return theListend listButtons</pre>