Page 1 of 1

Is it possible for comparing string("=") ?

Posted: 29 Mar 2021, 16:44
by nadure
example code is below

Code: Select all

a := "="

if(a="=")
{
	Msgbox,Yes
}
else
{
	Msgbox,No
}
return
It said, No

Is this bug?
If not, how can compare the string?

Re: Is it possible for comparing string("=") ?

Posted: 29 Mar 2021, 19:19
by HotKeyIt

Code: Select all

a := "="

if (a="=")
{
	Msgbox,Yes
}
else
{
	Msgbox,No
}
return

Re: Is it possible for comparing string("=") ?  Topic is solved

Posted: 29 Mar 2021, 19:22
by Masonjar13
Tested, it opens the "yes" msgbox. The code is fine, maybe you forgot to save and reload?

To HotKeyIt's reply, if() works fine, believe it or not (in v1.1)

Re: Is it possible for comparing string("=") ?

Posted: 30 Mar 2021, 03:39
by nadure
Masonjar13 wrote:
29 Mar 2021, 19:22
Tested, it opens the "yes" msgbox. The code is fine, maybe you forgot to save and reload?

To HotKeyIt's reply, if() works fine, believe it or not (in v1.1)
sorry,,

maybe, my compiler is weird. :wtf: