H

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
CrawfordPNX
Posts: 38
Joined: 03 Dec 2016, 12:44

H

16 Jan 2019, 01:13

Hello, ahk newbie after a long hiatus here. I respectfully seek the ahk community's aid in finding solutions for two problems:
Aim 1: Let's make Q spam only while Q is held. Result: Success, but stuck in loop.
Usehook, single instance force, MaxThreadsPerHotkey and all,
$q::
Loop
{
if not GetKeyState("q", "P")
break
Send, {q down}
Sleep 30
Send, {q up}
}
... tinkering with settimer, setkeydelay and so forth.... however when used in conjunction with Lwin and LAlt, even using {Blind}, I seem to have trouble in-game. I used a template from another discussion and made this a tentative solution, but I would like to know how to solve it after all.
$q::
StartTime := A_TickCount
while ElapsedTime < ?
{
ElapsedTime := A_TickCount - StartTime
Send {q down} ;
Sleep, ?

Aim2: Take note of this script:
$tab::
{
if GetKeyState("tab", "P")
MouseMove, X,Y
}
Keywait, tab
Click
MouseMove, X2,Y2
return

My purpose is actually to make shift(+)tab, with shift pressed down, click(with shift down) every time I press tab.
It should not be radically different from the original.
$+tab::
{
if GetKeyState("tab", "P")
MouseMove, X,Y
}
Keywait, [ shift & tab ?
If not ErrorLevel ? ]
MouseMove, X2, Y2
return

Much appreciation for all your help.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, Rohwedder, ulysim and 362 guests