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

Post your working scripts, libraries and tools

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
Posts: 254
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
Posts: 82
Joined: 05 Apr 2016, 14:18

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

26 Jul 2018, 15:15

I have not been able to use it. Can someone explain it in detail? Could you give me a working example? I really need this library. I'm new to Autohotkey. But I'm so bored with that.

How do we include the library in our work? I did, but things did not work and things went wrong. "C: \ Users \ hasan \ Desktop \ Deneme.ahk (19): ==> Call to nonexistent function.
     Specifically: TF_Find (FilePath, "", "", "i) \ Q" SearchText "\ E", 0, 1)


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

27 Jul 2018, 02:33

Its pretty straight forward.

You can either use #include or use the LIB folder:

1. You can either use #include path-to-your-copy-of\tf.ahk * in your script

* if you have your script and tf.ahk in the same folder #include tf.ahk will work of course

2. Place a copy of tf.ahk in one of the following folders on your computer:

%A_ScriptDir%\Lib\ ; Local library - requires [v1.0.90+].
%A_MyDocuments%\AutoHotkey\Lib\ ; User library.

Source & More info https://autohotkey.com/docs/Functions.htm#include

Working sample script

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

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 17 guests