Is it a bug?

Get help with using AutoHotkey and its commands and hotkeys
User avatar
oldbrother
Posts: 174
Joined: 23 Oct 2013, 05:08

Is it a bug?

27 Apr 2017, 08:41

IfInstring cannot take "||" or "`|`|" as a parameter.
But InStr() can use it.

Test code:

Code: Select all

MyString=AAA,BBB,||,|CCC||,DDD

Loop Parse, MyString, `,
  IfInString,%A_LoopField%,||
  ;if InStr(A_LoopField,"||")
    Msgbox Found!  
Thanks!
dsewq1LYJ
Posts: 114
Joined: 26 Aug 2014, 23:21

Re: Is it a bug?

27 Apr 2017, 08:45

oldbrother wrote:IfInstring cannot take "||" or "`|`|" as a parameter.
But InStr() can use it.

Test code:

Code: Select all

MyString=AAA,BBB,||,|CCC||,DDD

Loop Parse, MyString, `,
  IfInString,%A_LoopField%,||
  ;if InStr(A_LoopField,"||")
    Msgbox Found!  
Thanks!

Code: Select all

MyString=AAA,BBB,||,|CCC||,DDD
Loop,Parse,MyString,`,
    IfInString,A_LoopField,||
        Msgbox Found!
guest3456
Posts: 3088
Joined: 09 Oct 2013, 10:31

Re: Is it a bug?

27 Apr 2017, 08:47

1. If you're asking if it's a bug or not, you should be posting in Ask For Help

2. No, its not a bug. You're not using IfInString correctly. See the help page:

https://autohotkey.com/docs/commands/IfInString.htm
var
The name of the variable whose contents will be searched for a match.


Return to “Ask For Help”

Who is online

Users browsing this forum: Smile_ and 153 guests