Dim $sx[0] Dim $cn $ss = "Xx" ConsoleWrite(StringLeft($ss, 1) & " " & StringRight($ss, 1) & @CRLF) ConsoleWrite(StringLeft($ss, 1) = StringRight($ss, 1) & @CRLF) ;here show X <> x ConsoleWrite(@CRLF) ;the following is to populate array $sx with different unique characters in $ss For $b = 1 To StringLen($ss) $flg = 0 For $a = 0 To UBound($sx) - 1 ;if asc(StringMid($ss,$b,1)) = asc($sx[$a]) Then ;if this line is used instead of the next, everything is fine If StringMid($ss, $b, 1) = $sx[$a] Then If StringMid($ss, $b, 1) = "x" Then ConsoleWrite("<<->>" & StringMid($ss, $b, 1) & " " & $sx[$a] & @CRLF) $flg = 1 ExitLoop EndIf Next If $flg = 0 Then $cn = $cn + 1 ReDim $sx[$cn] $sx[$cn - 1] = StringMid($ss, $b, 1) EndIf Next ConsoleWrite(UBound($sx) & @CRLF);list the ubound of $sx ;list what is in array $sx For $a = 0 To UBound($sx) - 1 ConsoleWrite($sx[$a] & @CRLF) Next