<pre>on mode modeName  toComputer  put "redacteur,editeur,professeur,programmeur,utilisateur" into modes  if modeName is not in modes then exit mode  --------------------------------------------------------------------------  if modeName is "programmeur" then    menubar Alain    exit mode  end if  --------------------------------------------------------------------------  if there is a menu "File" then -- ie. standard menubar of programmer.    createCustomMenubar    appendMenu "Piles"    appendMenu "Mode"    appendMenu "Lauzon"    appendMenu "Alain"  end if  --------------------------------------------------------------------------  uncheckMenuItems "Mode"  checkMenuItem modeName,"Mode"  global userMode  put modeName into userMode  --------------------------------------------------------------------------  push cd  put readFile(disk() & ":Fichiers:Procedures:Modes:" & modeName) into theScript  put readFile(question("questions")) into theQuestions  repeat with x = 1 to the number of lines of theQuestions    go to bg "Question" of stack question(line x of theQuestions)    set script of this bg to theScript    if modeName is "redacteur" then      doToSelectedFields cd,unlock      doToSelectedButtons bg,show    else      doToSelectedFields cd,lock      doToSelectedButtons bg,hide      if modeName is "utilisateur" then        hide menubar        hide tool window      end if    end if  end repeat  --------------------------------------------------------------------------  pop cdend mode</pre>