from what I can see, it's the braces after the first else:
Code: Select all
!y::
xl := ComObjActive("Excel.Application")
loop
{
loopnr := A_Index
if (xl.Range("B3").Offset(loopnr-1,0).Value = "")
break
xl := ComObjActive("Excel.Application")
number1:= xl.Range("B3").Offset(loopnr-1,0).Text ; Josefen Huge
number2:= xl.Range("C3").Offset(loopnr-1,0).Text ; JOSEFEN, HUGE
StringCaseSense Locale
StringReplace, number1, number1, `,,, all ; no comma, with number1 variable is still intact, the data is still intact also
StringReplace, number2, number2, `,,, all ; no comma, with number2 variable is still intact, the data is still intact also
If (number1 = number2) ; this is internally compared
xl.Range("B3").Offset(loopnr-1,0).Font.ThemeColor := 7
else{
MsgBox, 4,, Replace %number1% with %number2%?
IfMsgBox Yes
xl.Range("B3").Offset(loopnr-1,0).Font.ThemeColor := 7
else IfMsgBox No
xl.Range("B3").Offset(loopnr-1,0).Font.ThemeColor := 6
}
}
return
before it was if (number1 = number2) change to 7, and if not show the msgbox, and that's it the next IfMsgBox weren't parst of the condition.