<pre>on documentCard theStackName,theCardNumber  ---------------------------------------------------------------------------  if theStackName is empty then    answer file "Documenter carte de quelle pile ?" of type STAK    if it is empty then exit documentCard else put it into stk  else    put theStackName into stk  end if  ---------------------------------------------------------------------------  if not validCardNumber(theCardNumber) then    ask "Documenter quelle carte:" with "1"    if not validCardNumber(it) then exit documentCard    put it into num  else    put theCardNumber into num  end if  ---------------------------------------------------------------------------  toComputer  push cd  go to cd num of stack stk  if the result is not empty then exit documentCard  ---------------------------------------------------------------------------  put "Analyse" && the name of cd num into filename  open file filename  write "Analyse de la carte" && num && "de la pile" && stk to file filename  write the date && the time & return to file filename  write "=========================================" & return to file filename  ---------------------------------------------------------------------------      -- **************************** CARD BUTTONS ****************************    put the number of btns into bt  write "Card Buttons:" && bt & return & return to file filename  repeat with i=1 to bt    write "Name      :" && the name of btn i & return to file filename    write "Number    :" && the number of btn i & return to file filename    write "ID        :" && the id of btn i & return to file filename    write "Style     :" && the style of btn i & return to file filename    write "Rect      :" && the rect of btn i & return to file filename    write "Location  :" && the loc of btn i & return to file filename    write "Icon      :" && the icon of btn i & return to file filename    write "ShowName  :" && the showName of btn i & return to file filename    write "Hilite    :" && the hilite of btn i & return to file filename    write "AutoHilite:" && the autoHilite of btn i & return to file filename    write "Visible   :" && the visible of btn i & return to file filename    write "TextAlign :" && the textAlign of btn i & return to file filename    write "TextFont  :" && the textFont of btn i & return to file filename    write "TextSize  :" && the textSize of btn i & return to file filename    write "TextStyle :" && the textStyle of btn i & return to file filename    write "TextHeight:" && the textHeight of btn i & return to file filename    if the script of btn i is not empty then      write return & "BTN SCRIPT:" & return to file filename      write the script of btn i to file filename      write return to file filename    end if    if i<bt then      write return to file filename      write "-----------------------------------------" to file filename      write return & return to file filename    end if  end repeat    -- ***************************** BG BUTTONS *****************************    write "=========================================" & return to file filename  put the number of bg btns into bt  write "Bg Buttons:" && bt & return & return to file filename  repeat with i=1 to bt    write "Name      :" && the name of bg btn i & return to file filename    write "Number    :" && the number of bg btn i & return to file filename    write "ID        :" && the id of bg btn i & return to file filename    write "Style     :" && the style of bg btn i & return to file filename    write "Rect      :" && the rect of bg btn i & return to file filename    write "Location  :" && the loc of bg btn i & return to file filename    write "Icon      :" && the icon of bg btn i & return to file filename    write "ShowName  :" && the showName of bg btn i & return to file filename    write "Hilite    :" && the hilite of bg btn i & return to file filename    write "AutoHilite:" && the autoHilite of bg btn i & return to file filename    write "Visible   :" && the visible of bg btn i & return to file filename    write "TextAlign :" && the textAlign of bg btn i & return to file filename    write "TextFont  :" && the textFont of bg btn i & return to file filename    write "TextSize  :" && the textSize of bg btn i & return to file filename    write "TextStyle :" && the textStyle of bg btn i & return to file filename    write "TextHeight:" && the textHeight of bg btn i & return to file filename    if the script of bg btn i is not empty then      write return & "BTN SCRIPT:" & return to file filename      write the script of bg btn i to file filename      write return to file filename    end if    if i<bt then      write return to file filename      write "-----------------------------------------" to file filename      write return & return to file filename    end if  end repeat    -- **************************** CARD FIELDS ****************************    write "=========================================" & return to file filename  put the number of cd flds into bt  write "Card Fields:" && bt & return & return to file filename  repeat with i=1 to bt    write "Name       :" && the name of cd fld i & return to file filename    write "Number     :" && the number of cd fld i & return to file filename    write "ID         :" && the id of cd fld i & return to file filename    write "Style      :" && the style of cd fld i & return to file filename    write "Rect       :" && the rect of cd fld i & return to file filename    write "Location   :" && the loc of cd fld i & return to file filename    write "ShowLines  :" && the showLines of cd fld i & return to file filename    write "WideMargins:" && the wideMargins of cd fld i & return to file filename    write "LockText   :" && the lockText of cd fld i & return to file filename    write "Visible    :" && the visible of cd fld i & return to file filename    write "TextAlign  :" && the textAlign of cd fld i & return to file filename    write "TextFont   :" && the textFont of cd fld i & return to file filename    write "TextSize   :" && the textSize of cd fld i & return to file filename    write "TextStyle  :" && the textStyle of cd fld i & return to file filename    write "TextHeight :" && the textHeight of cd fld i & return to file filename    if the script of cd fld i is not empty then      write return & "FIELD SCRIPT:" & return to file filename      write the script of cd fld i to file filename      write return to file filename    end if    if i<bt then      write return to file filename      write "-----------------------------------------" to file filename      write return & return to file filename    end if  end repeat    -- ****************************** BG FIELDS ******************************    write "=========================================" & return to file filename  put the number of flds into bt  write "bg flds:" && bt & return & return to file filename  repeat with i=1 to bt    write "Name       :" && the name of fld i & return to file filename    write "Number     :" && the number of fld i & return to file filename    write "ID         :" && the id of fld i & return to file filename    write "Style      :" && the style of fld i & return to file filename    write "Rect       :" && the rect of fld i & return to file filename    write "Location   :" && the loc of fld i & return to file filename    write "ShowLines  :" && the showLines of fld i & return to file filename    write "WideMargins:" && the wideMargins of fld i & return to file filename    write "LockText   :" && the lockText of fld i & return to file filename    write "Visible    :" && the visible of fld i & return to file filename    write "TextAlign  :" && the textAlign of fld i & return to file filename    write "TextFont   :" && the textFont of fld i & return to file filename    write "TextSize   :" && the textSize of fld i & return to file filename    write "TextStyle  :" && the textStyle of fld i & return to file filename    write "TextHeight :" && the textHeight of fld i & return to file filename    if the script of fld i <> empty then      write return & "FIELD SCRIPT:" & return to file filename      write the script of fld i to file filename      write return to file filename    end if    if i<bt then      write return to file filename      write "-----------------------------------------" to file filename      write return & return to file filename    end if  end repeat    -- ******************************** CARD ********************************    write "=========================================" & return to file filename  write "Card properties" & return to file filename  write "Name       :" && the name of this cd & return to file filename  write "Number     :" && the number of this cd & return to file filename  write "ID         :" && the id of this cd & return to file filename  if the script of this cd is not empty then    write return & "CARD SCRIPT:" & return to file filename    write the script of this cd to file filename    write return to file filename  end if    -- ***************************** END HANDLER ****************************    write "=========================================" & return to file filename  write "=========================================" & return to file filename  close file filename  pop cd  answer "Results put into " & filename  end documentCard</pre>