
je voudrait lire un fichier de préférences en retirant les balises XML

[codeautoit]#include <FileConstants.au3>
Local Const $PrefFilePath = @WorkingDir & "\Default.txt"
Local $hPref = FileOpen($PrefFilePath, $FO_READ)
If $hPref = -1 Then
MsgBox(0, "", "Une erreur est survenue lors de la lecture du fichier Default.TXT")
EndIf
FileSetPos($hPref, 0, $FILE_BEGIN)
local $fileread = FileRead($hPref)
$Check = _StringBetween( $fileread, '<Controlertype>', '</Controlertype>')
MsgBox(0,"DevCentral ",$Check[0])[/codeautoit]
Évidement , FileOpen tout seul , marche (pour l'afficher entièrement dans une MsgBox


Mais , le code ne marche pas , et retourne cette erreur :
MsgBox(0,"DevCentral ",$Check[0])
MsgBox(0,"DevCentral ",$Check^ ERROR
->23:14:34 AutoIt3.exe ended.rc:1
+>23:14:34 AutoIt3Wrapper Finished.
>Exit code: 1 Time: 0.5568




Bien sur , $Check est un Tableau , alors ,Je peut pas enlever le [0]

D’où cela pourrait venir , mon fichier n'est pas lu comme une chaîne de caractères


Merci d'avance
