If $i = 1 or $i = 3 or $i = 7 or $i = 12 ...
so I write a function to work like this:
If _StringInSet($i, '1,3,7,12,...')
And here it is:
CODE
Func _StringInSet($Value, $List, $Delim=',')
Dim $Result=0, $ListArray, $i
$ListArray=StringSplit($List,$Delim)
$i = 1
While $i<=$ListArray[0] And Not $Result
If $Value=$ListArray[$i] Then $Result=-1
$i = $i + 1
WEnd
Return $Result
EndFunc
It's smarter than just using StringInStr because it won't match partials.





