Is there an issue with square brackets in string passed to a variable in if and switch statements?
When I pass a string containing square brackets to switch or if statements, it does not get evaluated,
when I pass string without square brackets the same switch and if, it works as expected.
Does anyone know what is going on?
square brackets in variable value
Re: square brackets in variable value
Yes, you probably have a bug in your syntax. You could post your script for feedback.
Re: square brackets in variable value
Code: Select all
string := "[mybrackets]"
if (string = "[mybrackets]")
MsgBox,, if, % string
switch string
{
case "[mybrackets]":MsgBox,, switch, % string
Default:MsgBox ?
}
Re: square brackets in variable value
thank you guys. Not sure, why it did not work in my script. It works now.
Who is online
Users browsing this forum: Araphen, Insanibaccha and 229 guests