| View previous topic :: View next topic |
| Author |
Message |
EdScriptNewbie
Joined: 20 Jan 2007 Posts: 110
|
Posted: Fri Jul 10, 2009 1:15 am Post subject: How do I get IfInString to search for a comma |
|
|
I want to find out if there's a comma in a string.
`, didn't seem to work
thanks! _________________ ...Ed |
|
| Back to top |
|
 |
1993t Guest
|
Posted: Fri Jul 10, 2009 1:20 am Post subject: Re: How do I get IfInString to search for a comma |
|
|
Use a variable. e.g
| Code: | var = ,
string = lol, lol
IfInString, string, %var%
{
MsgBox, yes
}
else
{
MsgBox, no
} |
|
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
|
| Back to top |
|
 |
1993t Guest
|
Posted: Fri Jul 10, 2009 5:04 am Post subject: |
|
|
| sinkfaze wrote: | Escaping the comma works fine for me:
| Code: | string = lol, lol
IfInString, string, `,
MsgBox, yes |
|
I suppose, but the variable method is just another way of doing it if he can't get it right. |
|
| Back to top |
|
 |
smikkelsen
Joined: 24 Jun 2008 Posts: 104
|
Posted: Fri Jul 10, 2009 6:41 am Post subject: |
|
|
| Quote: |
Escaping the comma works fine for me:
|
Me too.
There is no reason to have extra code. I hate messy code... _________________ “Whenever I'm about to do something, I think, 'Would an idiot do that?' And if they would, I do not do that thing.”
-Dwight |
|
| Back to top |
|
 |
|