I have a problem that makes absolutely no sense.
I keep my ahk scripts on OneDrive and everything works perfect on PC, but once I sync to my laptop I can't compile, getting error "#include file cannot be opened".
Ok, so I thought there must be something wrong with OneDrive folder, and I moved the script on Desktop, but I get the same error.
So I made a simple test script to see if it compiles, which it does, and then step by step I brought the non-compiling script to the same structure as the test script, and I still get the error.
I even brought the script back on the PC and I still get the error.
All systems have AHK_L 1.1.16.05.
I've attached the scripts below, where "New folder" is the test script, which compiles, and "New folder1" is the script from OneDrive folder edited to the same structure as the test script.
Both scripts are identical, why does one compile and the other doesn't ?
#include file cannot be opened
-
- Posts: 21
- Joined: 13 Jan 2014, 10:47
#include file cannot be opened
- Attachments
-
- Desktop.zip
- (2.45 KiB) Downloaded 128 times
Re: #include file cannot be opened
I've had a similar problem. I keep my scripts in a Dropbox folder and if I compile a script which has #include, sometimes the specified file is not included. I have surmised that there can be some interaction between the compiler and Dropbox that makes the included file not available at times.
Repeating the compile usually works.
Repeating the compile usually works.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
Re: #include file cannot be opened
Thank you for providing sample files. In fact, the files are identical, but the folders are not.
The problem in this case is that Ahk2Exe uses FileExist incorrectly, and fails to recognize the lib in #include lib as a directory if the directory has other attributes, like the Archive attribute.should be
To work around the bug, remove the Archive attribute from the folder.
The problem in this case is that Ahk2Exe uses FileExist incorrectly, and fails to recognize the lib in #include lib as a directory if the directory has other attributes, like the Archive attribute.
Code: Select all
if FileExist(IncludeFile) = "D"
Code: Select all
if InStr(FileExist(IncludeFile), "D")
-
- Posts: 21
- Joined: 13 Jan 2014, 10:47
Re: #include file cannot be opened
Ah, I see.
Thanks !
Thanks !