Hi Im using the below to count the number of times "o" repeats in my $string "olololololol" etc
Now then I get the position of each one of those o's.
But how do I store the positions into an array??
Now then I get the position of each one of those o's.
But how do I store the positions into an array??
[ autoit ]
Func _StringCount($String, $SubString) return (StringLen($String) - StringLen(StringReplace($String, $SubString, ""))) / StringLen($SubString) EndFunc $String = "olololololololol" $SubString = "o" MsgBox(0,"" , _StringCount($String, $SubString)) Local $i Local $tol = 100 For $i = 1 To 100 Step +1 Local $result = StringInStr($String, $SubString, 0, $i) if $result == 0 Then Exit Else MsgBox(0,"DEMO1", $result) EndIf Next