Can a Thread run a function in main script? Topic is solved

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
murataygun
Posts: 104
Joined: 07 Aug 2015, 15:53

Can a Thread run a function in main script?

11 Nov 2022, 08:26

1. Main script --> Create thread
2. Main script --> Run a function on thread ( dll.ahkFunction() as in docs.)
3. Thread does some work and inform main script.

How can i make thread to run a function on main script?

I know that ahkFunction waits for thread function to return but my thread waits for callbacks.

Thank you.
murataygun
Posts: 104
Joined: 07 Aug 2015, 15:53

Re: Can a Thread run a function in main script?  Topic is solved

11 Nov 2022, 08:35

I figured out that;

When you define
AhkExe := AhkExported()
in thread. You can do it like;
AhkExe.ahkFunction["myFunction"]

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 96 guests