which function can exit thread in ahk_h beta3?
-
- Posts: 3
- Joined: 27 Dec 2021, 02:29
which function can exit thread in ahk_h beta3?
In ahk_h beta3 , I tried to use ahkterminate , but it seems don't work . Is there any other function to exit the thread?
Re: which function can exit thread in ahk_h beta3?
It is still ahkTerminate, I forgot to add it to docs, updated now, see NewThread.
Code: Select all
ahk:=NewThread("MsgBox 'Thread'")
Sleep 1000
ahk.ahkterminate()
MsgBox 'End'
-
- Posts: 3
- Joined: 27 Dec 2021, 02:29
Re: which function can exit thread in ahk_h beta3?
Code: Select all
script1 := "
(
#NoTrayIcon
Persistent
loop
{
ToolTip "s1-" A_index, 100, 150
sleep 50
}
)"
script2 := "
(
#NoTrayIcon
Persistent
Loop
{
ToolTip "s2-" A_index, 200, 150
sleep 50
}
)"
F1::
{
MyThread1:=NewThread(script1)
MyThread2:=NewThread(script2)
}
F2::
{
if (IsSet(MyThread1))
MyThread1.ahkterminate()
if(IsSet(MyThread2))
MyThread2.ahkterminate()
}
Re: which function can exit thread in ahk_h beta3?
This has been fixed now.
-
- Posts: 3
- Joined: 27 Dec 2021, 02:29
Re: which function can exit thread in ahk_h beta3?
Thanks.It is ok now.
I try the ahkassign example, it doesn't work, it works well in version (1.1.33.10).
I try the ahkassign example, it doesn't work, it works well in version (1.1.33.10).
Who is online
Users browsing this forum: No registered users and 5 guests