#dst=1
chemin$="c:\Temp\1.txt"
If ReadFile(#dst, chemin$)
While Eof(#dst) = 0 ; loop as long the 'end of file' isn't reached
mot$=ReadString(#dst)
mot$=LCase(mot$)
If mot$="la"
;;;;;;;;;;;;;;;;;;;; retirer le mot "la"
EndIf
Wend
CloseFile(#dst)
EndIf
Thx
Dernière modification par SPH le mar. 25/juin/2019 12:41, modifié 1 fois.
http://HexaScrabble.com/ !i!i!i!i!i!i!i!i!i! !i!i!i!i!i!i! !i!i!i!
//// Informations ////
Intel Core i7 4770 64 bits - GTX 650 Ti Version de PB : 6.00 - 64 bits
#dst=1
#tmp=2
chemin$="c:\Temp\1.txt"
temp$="c:\temp\2.txt"
CreateFile(#tmp, temp$)
If ReadFile(#dst, chemin$)
While Eof(#dst) = 0 ; loop as long the 'end of file' isn't reached
mot$=ReadString(#dst)
mot$=LCase(mot$)
If mot$="la"
;;;;;;;;;;;;;;;;;;;; retirer le mot "la"
Continue
Else
WriteStringN(#tmp, mot$)
EndIf
Wend
CloseFile(#dst)
CloseFile(#tmp)
DeleteFile(chemin$)
RenameFile(temp$, chemin$)
EndIf
#dst=1
chemin$="c:\Temp\1.txt"
NewList mots.s()
If ReadFile(#dst, chemin$)
While Eof(#dst) = 0 ; loop as long the 'end of file' isn't reached
mot$=ReadString(#dst)
mot$=LCase(mot$)
If mot$="la"
;;;;;;;;;;;;;;;;;;;; retirer le mot "la"
Else
AddElement(mots())
mots() = mot$
EndIf
Wend
CloseFile(#dst)
EndIf
If OpenFile(#dst, chemin$)
ForEach mots()
WriteStringN(#dst, mots())
Next
EndIf
Bureau : Win10 64bits
Maison : Macbook Pro M1 14" SSD 512 Go / Ram 16 Go - iPad Pro 32 Go (pour madame) - iPhone 15 Pro Max 256 Go