0

I have installed AHk on my Windows 10 OS and setted it to run on my PC right after boot.

I want to use some "global" AHk functions file that doesn't require the loading of a certain .ahk file which I myself created.

Generally, whenever I call a particular function available is in this file (say, by a keyboard combo), it will run.

Is there an AHk global functions file?
I assume that such file would be somewhat parallel to a ~/.bashrc file.

0

There are two mechanisms for global functions:

The libraries are found in the following folders:

%A_MyDocuments%\AutoHotkey\Lib\                    ; User library folder
path-to-the-currently-running-AutoHotkey.exe\Lib\  ; Global library folder

A library file contains the searched function, having the same file-name as the function-name.

If you totally want to avoid creating a new .ahk, the only solution then would be to modify the source code of AHK to include your functions as built-in;
Writing a .ahk file is much easier;
Note that a library file means that your functions are usable in all your scripts without the #Include directive.

|improve this answer|||||
  • The only solution then would be to modify the source of AHK to include your functions as built-in. Writing an .ahk file is much easier. A library file means that your functions are usable in all your scripts without the #Include directive. – harrymc Jan 18 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy