Pass a variable to Substr

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Sparr
Posts: 5
Joined: 13 Mar 2016, 15:35

Pass a variable to Substr

20 May 2019, 16:11

Have a mind block here, can someone help please?

As per code snip below, trying to pass the location in a string to substr as a variable.
What is the correct syntax to do this?

FoundPos := InStr(A_LoopReadLine, ".sea")
FoundPos += 3

SubStr(result, 1, FoundPos)


Thanks
User avatar
Cuadrix
Posts: 236
Joined: 07 May 2017, 08:26

Re: Pass a variable to Substr

20 May 2019, 16:34

Documentation
NewStr := SubStr(String, StartingPos , Length)

Code: Select all

SubStr(result, FoundPos)
Sparr
Posts: 5
Joined: 13 Mar 2016, 15:35

Re: Pass a variable to Substr

20 May 2019, 17:06

Thanks will have a play.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Kodakku and 389 guests