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")
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