Skip to content
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

#include file "Libs.ahk" cannot be opened #1

Closed
Raptorking94 opened this issue Feb 6, 2022 · 6 comments
Closed

#include file "Libs.ahk" cannot be opened #1

Raptorking94 opened this issue Feb 6, 2022 · 6 comments

Comments

@Raptorking94
Copy link

I haven't had much luck getting this program to run. I've tried running as admin, running with UI access, making sure I have Autohotkey v2. Starting the: script just opens up the window, and says

"Error at line 2.
#incluide file ""Libs.ahk"" cannot be opened
The program will exit"

For each script in the script folder.

Is it possible to just get it compiled as a .exe?

@SoSeDiK
Copy link
Owner

SoSeDiK commented Feb 6, 2022

Are you 100% sure you are using the up-to-date version of AHK? (v2.0 Beta 3)
You may have both installed, and not the v2 one is executing the script, because quote marks in #include are allowed only in v2, and the error seems to read them as a part of the file name.

Scripts in the folder should open fine too*, but really you should be opening only the YAGS.ahk file.
  * Though they will be hidden in the tray with no hotkey to disable them (YAGS does that).

I'll see what can be done with the .exe file, I've had some problems with that in past.
Maybe I should also finally make versioning and update checks 🤔

@Raptorking94
Copy link
Author

Autohotkey v2 doesn't seem to have an installer, so I've just been installing the default version then overwriting the files with the v2 files. If v1 isn't installed then I get an error message saying "No application is associated with the specified file for this operation"

I attempt to run YAGS.ahk (as administrator) and this is the popup that I get. I don't ever go into the scripts folder to open the individual scripts there. This is what I meant by "for each script in the script folder"
Screenshot 2022-02-06 234821
Running it without admin privileges just gives a single "can't be opened" window. (The same also applies when trying to run it with UI access)

@SoSeDiK
Copy link
Owner

SoSeDiK commented Feb 7, 2022

You don't really need an installer, the whole AHK v2 is just a single file (you need only AutoHotkey64.exe or AutoHotkey32.exe depending on your platform).
You can extract it anywhere and just point to it in "Open as..." action (or set the executable within file properties).

In your case I believe you can also just replace AutoHotkey.exe inside the installation folder with either AutoHotkey64.exe or AutoHotkey32.exe from v2.

.exe seems to be not an option for now, the AHK compiler doesn't support some v2 things that I use.

@Raptorking94
Copy link
Author

So I've uninstalled Hotkey completely and extracted the AutoHotkey v2 files into its own folder in program files. I tried running the script and it asked for admin privileges, so I had to set run as administrator on the AutoHotkey64.exe. Now when I try to run it this message shows
Screenshot 2022-02-07 024220

I have set the default app for .ahk files to the .exe, so I'm not quite sure what could be happening now. (I have tried both 32 and 64 bit exes)
Screenshot 2022-02-07 024637

@SoSeDiK
Copy link
Owner

SoSeDiK commented Feb 7, 2022

It says that no file is associated with .ahk, but it should be as per the second screenshot?
Now this is weird indeed 🤔

@Raptorking94
Copy link
Author

Hey, so I was doing a little bit of trail and error and I was able to get things working. As it turns out I was replacing the wrong .exe file in my Autohotkey installation. I was able to get it working and I must say I'm very impressed. This is an extremely useful program. There are only a few bugs, but most of them aren't too bad and they usually fix themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants