<pre>on getHandlers theScript,theObject  toComputer  put liste("default handlers") into defaults  put disk() & ":Fichiers:Procedures:Commandes:" into cmdPath  put disk() & ":Fichiers:Procedures:Fonctions:" into funcPath  repeat with x = 1 to the number of lines of theScript    ---------------------------------------------------------------------------    if word 1 of line x of theScript is "ON"     and word 2 of line x of theScript is not in defaults then      add 1 to msg box      put line x of theScript & tab & theObject & return after commands      put word 2 of line x of theScript into cmdName      repeat with y = x to the number of lines of theScript        if word 1 of line y of theScript is "end"         and word 2 of line y of theScript is cmdName then          put line y of theScript after handlerScript          writeFile handlerScript,cmdPath & cmdName          put empty into handlerScript          exit repeat        else          put line y of theScript & return after handlerScript        end if      end repeat    end if    ---------------------------------------------------------------------------    if word 1 of line x of theScript is "FUNCTION"     and word 2 of line x of theScript is not in defaults then      add 1 to msg box      put line x of theScript & tab & theObject & return after functions      put word 2 of line x of theScript into funcName      repeat with y = x to the number of lines of theScript        if word 1 of line y of theScript is "end"         and word 2 of line y of theScript is funcName then          put line y of theScript after handlerScript          writeFile handlerScript,funcPath & funcName          put empty into handlerScript          exit repeat        else          put line y of theScript & return after handlerScript        end if      end repeat    end if    ---------------------------------------------------------------------------  end repeat  if commands is not empty and commands is not "commands" then    put liste("commandes") into prevCommands    put prevCommands & return & commands into commands    writeFile commands,disk() & ":Fichiers:Listes:commandes"  end if  if functions is not empty and functions is not "functions" then    put liste("fonctions") into prevFunctions    put prevFunctions & return & functions into functions    writeFile functions,disk() & ":Fichiers:Listes:fonctions"  end ifend getHandlers</pre>