Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Not recognizing working directory #1
I have been working a lot with TF_RemoveBlankLines, TF_RemoveLines and TF_CountLines. While the count seams to recognize the current working directory, the remove functions don't.
Here are a few details of my application:
When script.exe uses a TF function relying on the working directory, I get mixed results. The CountLines seams to work fine while RemoveBlankLines and RemoveLines seam to fail.
If I force a hard path to the files I have no problem getting the functions to work but that isn't feasible when creating a program for distribution. I need to rely on system variables to locate properly stored files.
If the Script, files and working directory are all in the same folder, I have no problem accessing the files without a hard path. This is not feasible because the script is a program and belongs in ProgramFiles. Since ProgramFiles is a restricted folder, a text file can't be edited in that directory unless the user is logged in as an admin.
I tried to do a work-around by using the apropriate system variable as the path for the file name within the TF function call. This didn't work either because TF functions can't contain variables as a part of a file name or because I have been unable to work out the syntax on it. Either way, the TF functions should be using the WorkingDir anyway.
I tried going into the TF code to determine the problem but I am still learning and it was a bit over my head for now.
Any help for this bug or a work-around would be greatly appreciated.
If you always pass on the full path to the TF functions that always works - I never run into any such problems myself but as noted by ozzii changing A_ScriptDir to A_WorkingDir might work for you - let me know how this works for you. It has been present from the very beginning, never had any reports / user feedback on this. Might consider changing it.
I did take ozzii's advice and made the correction to the TF file. Not
On 2014-06-23 10:56, hi5 wrote: