![]() ![]() I understand that the function will be executed when I press the hotkey. The problem in your code is that if you define a function inside, at the beginning of a hotkey def, the function will be automatically executed when you use the hotkey, although it looks (only) like a normal function definition (which won't happen, if you define the function outside the hotkey def or if you include the function).Ībout your explanation of the function. Is there someone that is able to tell me how AHK works with libraries and if the way I'm doing it is even possible? When I need to change a function, I can just change the function in the Excel file and all the scripts use the same updated funtion that way. I want this because I have different AHK scripts (all in different AHK files) and don't want to write down the whole function in each file. In the end, my goal is to have one Excel file with all my functions and I just need to write the name of the function and it pulls it from the Excel file. Then, the OGFunction gets the value of the OpenGoogle function.īut, it's not possible to let AHK reads the function so that it sees "hey, the function is present, just not in the AHK script" and the script continues and uses the function at the end so that Google actually opens and doesn't give an error (at least, I don't know how). However, it does work when I comment the OpenGoogle part out. It gives an error because the 'Open Google' function doesn't exists which is obvious. ![]() MsgBox % OGFunction the function is a variable now ExcelPointerX).Value so cell C2, where the function is FilePath := "C:\Users\ahkFunctionLibrary.xlsx" add path to Excel file with functions here ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |