<pre>on replaceAll old,new,fldSpec  if fldSpec is empty then    -- replace text everywhere    repeat      send "find string" & quote & old & quote to HyperCard      if the result is not empty then exit replaceAll      do "put new into" && the foundChunk    end repeat  else    -- replace text in field only    put "find string" & quote & old & quote && "in fld"     && quote & fldSpec & quote into findCommand    repeat      send findCommand to HyperCard      if the result is not empty then exit replaceAll      do "put new into" && the foundChunk    end repeat  end ifend replaceAll</pre>