Help me to improve this code using MT

Ask for help, how to use AHK_H, etc.
lethaii
Posts: 11
Joined: 24 Jul 2017, 22:12

Help me to improve this code using MT

22 Aug 2019, 22:23

Hi everyone ! Please help me to improve this script
I am using autohotkey_H v2 Multi Thread. I want to press the "q" "w" will launch in separate threads.
Thank you so much.

Code: Select all

RButton::
While GetKeyState("RButton", "P")
{
Click right
Sleep 120
}
return
;------------------------------
$q::
Loop 10
{
Send "{Shift Down}"
Send "hc"
Send "{Shift Up}"
Sleep 1500
 }
return

;------------------------------
$w::
Loop 10
{
Send "{Shift Down}"
Send "hk"
Send "{Shift Up}"
Sleep 2000
 }
return
swagfag
Posts: 3003
Joined: 11 Jan 2017, 17:59

Re: Help me to improve this code using MT

23 Aug 2019, 02:01

Code: Select all

a := AhkThread("
(
$q::
Loop 10
{
Send "{Shift Down}"
Send "hc"
Send "{Shift Up}"
Sleep 1500
 }
return
	
)")

b := AhkThread("
(
$w::
Loop 10
{
Send "{Shift Down}"
Send "hk"
Send "{Shift Up}"
Sleep 2000
 }
return
	
)")

RButton::
While GetKeyState("RButton", "P")
{
Click 'right'
Sleep 120
}
return
;------------------------------

;------------------------------

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 6 guests