| View previous topic :: View next topic |
| Author |
Message |
alaricljs
Joined: 06 May 2005 Posts: 15
|
Posted: Mon May 09, 2005 8:28 pm Post subject: IfNotInString Broken? |
|
|
| Code: | Loop %Images%\*.*, 0, 0
{
IfNotInString %A_LoopFileAttrib%, H
NumImages ++
}
MsgBox %NumImages% images
|
Do this on a WinXP box with 3 images in the %Images% folder. You will get a response of 4 images. For some reason Thumbs.db is not getting flagged by the IfNotInString....
In fact, simplify things alot:
| Code: | IfNotInString ASH, H
MsgBox Wtf?
|
Ooh-weeeee-ooooooooh [cue Twilight Zone]
Edit: Ok, I'm just double checking myself cuz I hate to look like an idiot...
| Code: | IfInString ASH, H
MsgBox This SHOULD fire
IfNotInString AFSDF, H
MsgBox This SHOULD fire too
IfInString ASH, X
MsgBox This SHOULD NOT fire
IfNotInString DSJKFH, F
MsgBox This SHOULD NOT fire too
|
I sure hope the above code is correct, on the other hand when I run it the 2 MsgBox's that pop are the 2nd and 4th (the one's with "too")
Am I suffering from delusions? _________________ Spoon! |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Mon May 09, 2005 9:54 pm Post subject: |
|
|
| IfNotInString is one of the commands that causes confusion because its first parameter cannot be the literal text you want to search. Instead, it must be the name of a variable whose contents will be searched. |
|
| Back to top |
|
 |
alaricljs
Joined: 06 May 2005 Posts: 15
|
Posted: Tue May 10, 2005 2:35 pm Post subject: |
|
|
Hmmm, so I get to look stupid anyhow.
Thanks Chris, next time I will stare at the documentation until I reeeeally get it. Especially since no one has ever complained about this before... I should have figured I was just missing the point. _________________ Spoon! |
|
| Back to top |
|
 |
|