AutoIt: v3.0.103.0
Written by Matt
Name: CompString()
Parameters: String1, String2
Return: 1 if they are equal, -1 of not equal
Plain Text
Func CompString( $String1, $String2 ) Local $i Local $StrVal1, $StrVal2 $StrVal1 = 0 $StrVal2 = 0 If( $String1 = $String2 ) Then For $i = 1 to StringLen( $String1 ) $StrVal1 = $StrVal1 + Asc( StringMid( $String1, $i, 1 ) ) Next For $i = 1 to StringLen( $String2 ) $StrVal2 = $StrVal2 + Asc( StringMid( $String2, $i, 1 ) ) Next If( $StrVal1 = $StrVal2 ) Then Return 1 EndIf EndIf Return -1 EndFunc
I haven't seen anything else like this on the forum or in the documentation so I figured I would post it since it has worked really well for me.
Always interested in questions, comments, bug reports. Thanks for your time.
*** Matt @ MPCS





