AhkSelf()

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
arcticir
Posts: 471
Joined: 17 Nov 2013, 11:32

AhkSelf()

01 Apr 2017, 13:17

Applicable to all types of threads: exe/tls/dll

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

guest3456
Posts: 2074
Joined: 09 Oct 2013, 10:31

Re: AhkSelf()

01 Apr 2017, 13:46

What does it do?

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

Re: AhkSelf()

01 Apr 2017, 14:51

guest3456 wrote:What does it do?
It wraps the current thread into an object so you can use the functions from same thread.


I think if would make sense to use CriticalObject by default so other threads can use the object as well. return CriticalObject({...})
scsnake
Posts: 23
Joined: 05 Aug 2015, 03:19

Re: AhkSelf()

28 May 2017, 19:17

Can I call main thread's label/function from subthread? The following script fails to show the msgbox :?:

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

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

Re: AhkSelf()

28 May 2017, 19:33

Note the function is sub here, not ahkLabel!

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

scsnake
Posts: 23
Joined: 05 Aug 2015, 03:19

Re: AhkSelf()

22 Jun 2017, 22:01

Is there any documentation for the "sub" function? I thought a subroutine equals to a label ??
guest3456
Posts: 2074
Joined: 09 Oct 2013, 10:31

Re: AhkSelf()

23 Jun 2017, 01:21

scsnake wrote:Is there any documentation for the "sub" function? I thought a subroutine equals to a label ??


the "documentation" is within the AHKSelf() function. it returns an object with a .sub() method which calls ahkLabel


Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 1 guest