ControlSend not working with {Right Down/up}

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Spoofy
Posts: 1
Joined: 09 Apr 2017, 12:33

ControlSend not working with {Right Down/up}

09 Apr 2017, 12:47

This is the code I have so far. Basically what I am trying to do is have the {right down} being held for a certain amount of time and then release it. I have tested a bunch of options and also tried Looping the {Right Down} line to spam it and nothing is sending to my game. Any help would be appreciated.

Code: Select all

F6::
Macro1:
Loop
{
    WinGet, WinList, List, ahk_class "[b]class[/b]"
    Loop % WinList
    {
        Sleep, 1015
        ControlSend, , {c Down},% "ahk_id " WinList%a_index%
        Sleep, 94
        ControlSend, , {c Up},% "ahk_id " WinList%a_index%
        Sleep, 3187
	Start := A_TickCount
	Loop, 1000
	{
		ControlSend, , {Right Down},% "ahk_id " WinList%a_index%
		Sleep, 150
		ControlSend, , {Right Up},% "ahk_id " WinList%a_index%
        	Sleep, 110
		If(A_TickCount - Start >= 12000)
			Break
	}
	ControlSend, , {c Down},% "ahk_id " WinList%a_index%
        Sleep, 110
        ControlSend, , {c Up},% "ahk_id " WinList%a_index%
        Sleep, 1969
        ControlSend, , {PgDn Down},% "ahk_id " WinList%a_index%
        Sleep, 78
        ControlSend, , {PgDn Up},% "ahk_id " WinList%a_index%
        Sleep, 1375
	Start := A_TickCount
	Loop
	{
		ControlSend, , {Left Down},% "ahk_id " WinList%a_index%
        	If(A_TickCount - Start >= 12000)
			Break
	}
	ControlSend, , {Left Up},% "ahk_id " WinList%a_index%
        Sleep, 500
    }
}
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: adam86shadow, balawi28, Google [Bot] and 255 guests