set AppleScript's text item delimiters to "Contrat n° : "
set suite to text item 2 of letexte
set lessept to text 1 thru 7 of suite as text
set AppleScript's text item delimiters to "Contrat"
set suite to text item 2 of letexte
set lessept to text 7 thru 14 of suite as text
tell application "Finder"
set lefichiertexte to ((path to desktop folder as text) & "Temp:Letexte.txt")
set sauv to AppleScript's text item delimiters
set lefich to lefichiertexte as alias
set letexte to read file lefich
set AppleScript's text item delimiters to "Contrat n° : "
set nb to count text item of letexte
display dialog "le texte à été coupé en " & nb
set suite to text item 2 of letexte
display dialog suite
set AppleScript's text item delimiters to sauv
end tell
set AppleScript's text item delimiters to "Contrat n° : "
set suite to text item 2 of letexte
set lessept to text 1 thru 7 of suite as text
set AppleScript's text item delimiters to "Contrat n"
set suite to text item 2 of letexte
set lessept to text 5 thru 11 of suite as text
set letexte to "Contrat n° : 1234567"
set laliste to ""
set lescodecaractere to ""
set nb to count character of letexte
display dialog nb
repeat with i from 1 to nb
set laliste to laliste & (item i of letexte) & " , "
end repeat
display dialog laliste
repeat with i from 1 to nb
set lescodecaractere to lescodecaractere & (ASCII number of (item i of letexte)) & " , "
end repeat
display dialog lescodecaractere
set AppleScript's text item delimiters to "ARTICLE 1"
set nb to count text item of letexte
set suite to text item 2 of letexte
set lessept to text 39 thru 46 of suite as text
tell application "Finder"
set lefichiertexte to ((path to desktop folder as text) & "Temp:Letexte.txt")
set sauv to AppleScript's text item delimiters
set lefich to lefichiertexte as alias
set letexte to read file lefich
set AppleScript's text item delimiters to "Contrat n"
set nb to count text item of letexte
display dialog "le texte à été coupé en " & nb
set suite to text item 2 of letexte
display dialog suite
set AppleScript's text item delimiters to sauv
end tell