-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not recognizing working directory #1
Comments
I forgot to mention: Thanks for the tools! I can see you put a LOT of work into this and it was kind of you to share it with the world! :) |
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:
Links:[1] |
Changelog v3.5 - Changed A_ScriptDir to A_WorkingDir in TF_ReturnOutPut - #1 - Fixed: TF_ColGet negative startcolumn and sections now work correctly
Changed A_ScriptDir to A_WorkingDir to in TF 3.5 |
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:
Script location: %A_ProgramFiles%\program\script.exe
File location: %A_AppData%\program\file.txt
SetWorkingDir, %A_AppData%\program
script has #include TF.ahk built in (v3.4)
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.
Thanks.
The text was updated successfully, but these errors were encountered: