Using AhkFunction between siblings Topic is solved

Ask for help, how to use AHK_H, etc.
kyuuuri
Posts: 340
Joined: 09 Jan 2016, 19:20

Using AhkFunction between siblings

18 Jan 2020, 17:58

Hello, I'm trying to achieve the following:

1_ Main Thread Launches 2 threads
2_ Child_Thread2 has a hotkey that it uses to launch a function on Child_Thread1

Code: Select all

CritObj := CriticalObject()
#persistent
Child_Thread1:=AhkThread("#persistent`nreturn`nfunction_test()`n{`nmsgbox asd`n}")
CritObj.thread1 := Child_Thread1
CritObj.Thread2:=AhkThread("CritObj := CriticalObject(" (&CritObj) ")`ntest1_thread:=CritObj.thread1`nreturn`nf1::`ntest1_thead.ahkFunction(""function_test"")`nreturn")
This code doesn't work, how can I achieve this?
I thought of creating Child_Thread1 inside Child_Thread2 but I need it to be this way, main thread creating Child_Thread1 and Child_Thread2

Return to “Ask for Help”

Who is online

Users browsing this forum: No registered users and 42 guests