Comments (3)
You don't use TF_GetData() in a script on its own. TF_GetData is called by all other TF functions to test if a variable or a file has been passed on to a TF_... function.
That particular line/error message is shown if a user makes a syntax error:
TF_...(! "file.txt",...)
vs TF_...("!file.txt",...)
. The ! before a filename is used to write back the result of the TF function to the source file instead of a copy (file_copy.txt). I noticed that some users tried to use it like ! "file.txt" instead of "!file.txt" and I show the MsgBox as a reminder.
I can read/work with a file with one line containing "000000" without any problems.
What function are you using and how are you calling it, if you post it I might spot a syntax error (below each TF command there is a short example in the readme.md
from tf.
TF_GetData() is called first in many user function.
msg =
(
000000
)
MsgBox % TF_TrimLeft(msg, 1, 1, 3)
— Error msgbox.
msg =
(
C:\users\desktop.ini
)
MsgBox % TF_TrimLeft(msg, 1, 1, 3)
— I get 1 here, because I have this file on disk.
msg =
(
!C:\
)
MsgBox % TF_TrimLeft(msg, 1, 1, 3)
— Error msgbox.
IMHO, from such type of function I expected behavior like SubStr().
No hidden parameters, no undefinied try read file, no error msgbox.
A good tool should be simple.
Of course, I understand that it's too late change it here.
from tf.
Sorry but only the last one gives an error message, the first two work fine here.
Your second example should have created a file C:\users\desktop_copy.ini, it should be there.
The 1 indicates it hasn't been able to make a backup - There is little point in using MsgBox with files as, well it writes back the result to a file and does NOT return the changed content to a variable which you can display in a MsgBox.
The last one tries to read a file "C:" which of course doesn't exist (there is no such file) so it gives an error message saying it can't read it. You can pass on a variable as a filename which is what you are doing here in the second and third example.
So as far as I can see: no bugs and it works as intended.
Edit: v3.7 (April 16, 2017)
- #4
- https://autohotkey.com/boards/viewtopic.php?p=142166#p142166 in case user pass on zeros "0000" - will error out when passing on one 0
from tf.
Related Issues (13)
- Not recognizing working directory HOT 4
- TF_RegExReplace removing a character it shouldn't HOT 1
- TF_Sort deleting the last character when it shouldn't HOT 2
- Option to remove all duplicates HOT 3
- using TF_ReplaceInLines and pointing it at users AppData folder HOT 2
- Publishing TF as an ahkpm package?
- Won't read lines HOT 1
- Lots of functions not working HOT 3
- Readme.md now renders incorrectly HOT 1
- Not a Recognized Action HOT 1
- Error at line 151 in #include file HOT 2
- $ doesn't work in TF_RegExReplace HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tf.