how to use the function of the main thread in thread1

Ask for help, how to use AHK_H, etc.
xuezhe
Posts: 68
Joined: 06 Jan 2016, 11:02

how to use the function of the main thread in thread1

08 Oct 2017, 19:21

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


error
noexistent function
HotKeyIt
Posts: 1534
Joined: 29 Sep 2013, 18:35
Contact:

Re: how to use the function of the main thread in thread1

09 Oct 2017, 14:34

in ahk_h v1 you will need exe.ahkFunction(""test"",var """")

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

xuezhe
Posts: 68
Joined: 06 Jan 2016, 11:02

Re: how to use the function of the main thread in thread1

09 Oct 2017, 18:57

thx. it works well in ahk_h v2.
xuezhe
Posts: 68
Joined: 06 Jan 2016, 11:02

Re: how to use the function of the main thread in thread1

09 Oct 2017, 20:34

HotKeyIt wrote:in ahk_h v1 you will need exe.ahkFunction(""test"",var """")

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus




ahk_h v2

return null ?

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

HotKeyIt
Posts: 1534
Joined: 29 Sep 2013, 18:35
Contact:

Re: how to use the function of the main thread in thread1

10 Oct 2017, 01:19

Yes, main exe has no variable var1:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

xuezhe
Posts: 68
Joined: 06 Jan 2016, 11:02

Re: how to use the function of the main thread in thread1

10 Oct 2017, 03:47

HotKeyIt wrote:Yes, main exe has no variable var1:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


thx,but I want to get the another value of var from the main thread function (not the returned value)
HotKeyIt
Posts: 1534
Joined: 29 Sep 2013, 18:35
Contact:

Re: how to use the function of the main thread in thread1

10 Oct 2017, 14:57

Function is local, you can only get global variables.
Also by the time you try to get the variable, function already exited and variables were cleared!

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 1 guest