InStr could search for a return ?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
skido
Posts: 8
Joined: 05 Mar 2020, 12:46

InStr could search for a return ?

05 Mar 2020, 12:54

Hello

one question please, anyone knows if "InStr" supports search for a "return"

something like this

if InStr (A_LoopField, "word to search{Return}")
if InStr (A_LoopField, "word to search`r"}

but this does not work. :(
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: InStr could search for a return ?

05 Mar 2020, 13:12

Examples:

Code: Select all

MyText =
(join`n
Here is some text below this is the word
we want to get.
)

if InStr(Mytext, "word`n")
	MsgBox word was found!

Code: Select all

MyText =
(join`r`n
Here is some text below this is the word
we want to get.
)

if InStr(Mytext, "word`r`n")
	MsgBox word was found!
skido
Posts: 8
Joined: 05 Mar 2020, 12:46

Re: InStr could search for a return ?

05 Mar 2020, 13:57

thanks for your reply

:)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww, ulysim and 322 guests