[library] TF: Text files & Variables (strings) v3.7

Post your working scripts, libraries and tools
Guest

Re: [library] TF: Text files & Variables (strings) v3.7

07 Feb 2018, 05:19

You need to learn the basics of AutoHotkey - you can't just use A_LoopReadLine like that, you need to have it "outside" of the quotes otherwise it won't be "translated" in the contents. As A_LoopReadLine may also contain new line characters you may need to trim

Code: [Select all] [Download] GeSHi © Codebox Plus

TF_RegExReplace("!" A_LoopFileFullPath,"im)\b" trim(A_LoopReadLine,"`r`n") "\b","lock") ; use trim to remove trailing new line chars which may interfere

If it is a word list you are processing you can do it all in one go but you need to study and learn RegEx (hint|list|of|words|like|this) - see regex docs linked to above.
User avatar
Tomer
Posts: 222
Joined: 21 Aug 2016, 05:11

Re: [library] TF: Text files & Variables (strings) v3.7

07 Feb 2018, 05:53

Thanks Guest :bravo:

I know i should have keep the variables outside the quotes from my first exmaple :lol: :lol: :lol:
(although i posted my sample code into the quotes just so you see my sample code).

anyway, what i needed is Trim :)

ps. why you using new lines (,"`r`n") ?
tested it without it and works as well

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 22 guests