Code: Select all
var := "today-xyz"
test := strsplit(var, "-").2
;msgbox, % test
if (test != "xyz") || (test != "fff")
{
MsgBox, xyz ; why is this msgbox showing if it does = xyz
}
else
{
msgbox, ignore
}
ExitApp
Code: Select all
var := "today-xyz"
test := strsplit(var, "-").2
;msgbox, % test
if (test != "xyz") || (test != "fff")
{
MsgBox, xyz ; why is this msgbox showing if it does = xyz
}
else
{
msgbox, ignore
}
ExitApp
You are using or (||) - so (test != "fff") will evaluate to true, if var is xyz, because it's not fff.why is this msgbox showing if it does = xyz