Can't dynamically call ahk_h's function Topic is solved

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
kyuuuri
Posts: 201
Joined: 09 Jan 2016, 19:20

Can't dynamically call ahk_h's function

05 Mar 2019, 07:58

Here is the test code:

Code: Select all

#persistent
thrd =
(
msgbox asdasd
)
func := "ahkthread"
asd := %func%(thrd)
esc::exitapp
HotKeyIt
Posts: 1850
Joined: 29 Sep 2013, 18:35
Contact:

Re: Can't dynamically call ahk_h's function  Topic is solved

05 Mar 2019, 16:03

Yes because the function is included AHK function and not a build-in function, see here: https://github.com/HotKeyIt/ahkdll/tree/master/source/resources/reslib
To be able to call it dynamically you have to #include <AhkThread> it before.
kyuuuri
Posts: 201
Joined: 09 Jan 2016, 19:20

Re: Can't dynamically call ahk_h's function

05 Mar 2019, 17:34

Then that's why hahaha, thank you!.
1 Question:
If I'm compiling an script that doesn't use any of the functions in /Lib folder do those function get included on my final exe as well? Removing the files will break something in the script?
HotKeyIt
Posts: 1850
Joined: 29 Sep 2013, 18:35
Contact:

Re: Can't dynamically call ahk_h's function

05 Mar 2019, 18:53

Only functions that are used in your script or via #include are included!
kyuuuri
Posts: 201
Joined: 09 Jan 2016, 19:20

Re: Can't dynamically call ahk_h's function

07 Mar 2019, 22:08

Forgot to say, thank you!. I keep asking things that I can easily google, my bad :D. Have a nice day!.

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 4 guests