Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

What's the difference? StringCompare / ==

$
0
0
[ autoit ]      
MsgBox(0, "Yes", _         ('33' == '33') & @CRLF & _         StringCompare('33', '33', 1))

Can I compare binary files, read with 0, instead of 16?



[ autoit ]      
$hFile = FileOpen('D:\File1.avi', 0) $sText1 = FileRead($hFile) FileClose($hFile) $hFile = FileOpen('D:\File2.avi', 0) $sText2 = FileRead($hFile) FileClose($hFile) $timer1 = TimerInit() $iRes1 = ($sText1 == $sText2) $timer1 = Round(TimerDiff($timer1), 2) & ' msec' $timer2 = TimerInit() $iRes2 = StringCompare($sText1, $sText2, 1) $timer2 = Round(TimerDiff($timer2), 2) & ' msec' MsgBox(0, "Yes", $iRes1 & @Tab & ', Time ' & $timer1 & @LF & $iRes2 & @Tab & ', Time ' & $timer2)

Viewing all articles
Browse latest Browse all 12506

Trending Articles