<pre>on appendMenuPiles  toComputer  put liste("piles") into theStacks  sort theStacks  set itemDelimiter to tab  put "Piles" into menuName  create menu menuName  repeat with x = 1 to the number of lines of theStacks    put item 1 of line x of theStacks into menuItemName    put "goToStack" && menuItemName into menuItemMessage    put menuItemName after menu menuName with menuMsg menuItemMessage  end repeat  put the short name of this stack into menuItemName  if there is a menuItem menuItemName of menu menuName  then set checkMark of menuItem menuItemName of menu menuName to trueend appendMenuPiles</pre>