<pre>on createMenu menuName,menuData  if menuName is empty then sayProblem "Il manque le nom du menu  creer!"  else    if there is not a menu menuName then create menu menuName    repeat with L = 1 to the number of lines in menuData      get item 1 of line L of menuData      if it is not empty then        if L = 1 then put it into menu menuName        else put it after last menuItem of menu menuName        get item 2 of line L of menuData        if it is not empty then set menuMessage of last menuItem to it        get item 3 of line L of menuData        if it is not empty then set commandChar of last menuItem to it      end if    end repeat  end ifend createMenu</pre>