Code: Select all
up::
A+=5
if A>90
A=1
gosub sendroutine
return
down::
A-=5
if A<1
A=90
gosub sendroutine
return
right::
A+=1
if A>90
A=1
gosub sendroutine
return
left::
A-=1
if A<1
A=90
gosub sendroutine
return
Code: Select all
sendroutine
Could you guys help me in enhancing the functionality.
When pressing left/right, instead of just decreasing/increasing A by 1 discretely, could we make it continous, on a timer for 3000ms. Then, any Up/Down still performs it's current functionality (+5), but also stops the left/right timer?
Code: Select all
sendroutine:
B:=(A+90)
C:=(A+180)
D:=(A+270)
WinGet, winList, List, ahk_class Afx:0000000140000000:0:0000000000010005:0000000000000000:0000000000000000
Loop % winList
WinMenuSelectItem, Sierra, , CW, %A%&
WinGet, winList, List, ahk_class Afx:0000000140000000:0:0000000000010005:0000000000000000:0000000000000000
Loop % winList
WinMenuSelectItem, Sierra, , CW, %B%&
WinGet, winList, List, ahk_class Afx:0000000140000000:0:0000000000010005:0000000000000000:0000000000000000
Loop % winList
WinMenuSelectItem, Sierra, , CW, %C%&
WinGet, winList, List, ahk_class Afx:0000000140000000:0:0000000000010005:0000000000000000:0000000000000000
Loop % winList
WinMenuSelectItem, Sierra, , CW, %D%&
return