1) Your example works:
Code: Select all
Clipboard=12345
Clipboard:=TF_TrimLeft(Clipboard,1,1,3) ; means trim the first three chars, so 123
MsgBox % Clipboard ; shows 4-5 so it works
But my does not work:
Code: Select all
Clipboard=00000
Clipboard:=TF_TrimLeft(Clipboard,1,1,3)
MsgBox % Clipboard ; shows error
You can try it by yourself.
2) If I have variable that consists of filename for example:
var := "c:\1.txt"
And I want to trim some symbols with your function.
I am waiting that when I do this
Code: Select all
var := "c:\1.txt"
var:=TF_TrimLeft(var,1,1,3)
tnen I will get var = 1.txt
The same as it can be done with substr():
Code: Select all
var := "c:\1.txt"
MsgBox % SubStr(var, 4) ; Returns "1.txt"
How does your function understand what I want pass to it - reference to a file or simply variable?
3) Sorry I forgot to put quotes in function.
I mean this.
This code works as expected.
It creates 2 files: TestFile.txt and trimmed TestFile_copy.txt
Code: Select all
TestFile= 12345; create variable
FileDelete, TestFile.txt
FileAppend, %TestFile%, TestFile.txt ; create file
TF_TrimLeft("TestFile.txt",1,1,3)
But this one does not work as expected:
Code: Select all
TestFile= 12345; create variable
FileDelete, !TestFile.txt
FileAppend, %TestFile%, !TestFile.txt ; create file
TF_TrimLeft("!TestFile.txt",1,1,3)
It creates 1 file: !TestFile.txt
So If I have file "!example.txt" then I can not edit this file with your library because your library does not support filenames that starts with "!" ?