Cant seem to get Run script when button held

Ask gaming related questions (AHK v1.1 and older)
excision
Posts: 14
Joined: 30 Jun 2017, 06:06

Cant seem to get Run script when button held

17 Jul 2017, 11:43

as the title says ^^ ive been trying to use my script but i only want it to run the script with button held and if u let go of button it resets ready for u to hold it again any1 know the code for this

Code: Select all

#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
SetTitleMatchMode 1
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
1Joy5::
Driver:
Send {j down}
Send {k down}
Sleep, 100
Send {j up}
Send {k up}
Sleep, 100
Send {k down}
Send {u down}
Sleep, 100
Send {k up}
Send {u up}
Sleep, 1500
Send {u down}
Sleep, 100
Send {u up}
Sleep, 100
Send {k down}
Sleep, 100
Send {k up}
Sleep, 100
Send {i down}
Sleep, 100
Send {i up}
Sleep, 100
Send {j down}
Sleep, 100
Send {j up}
Sleep, 1500
Send {i down}
Sleep, 100
Send {i up}
Sleep, 100
Send {u down}
Sleep, 100
Send {u up}
Sleep, 100
Send {u down}
Send {j down}
Sleep, 100
Send {u up}
Send {j up}
Sleep, 1500
Send {u down}
Send {i down}
Sleep, 100
Send {u up}
Send {i up}
Sleep, 100
Send {u down}
Sleep, 100
Send {u up}
Sleep, 100
Send {i down}
Sleep, 100
Send {i up}
Sleep, 100
Send {u down}
Send {i down}
Send {j down}
Sleep, 100
Send {i up}
Send {u up}
Send {j up}
Sleep, 1500
Send {k down}
Send {j down}
Sleep, 100
Send {k up}
Send {j up}
Sleep, 100
Send {i down}
Send {u down}
Sleep, 100
Send {i up}
Send {u up}
Sleep, 1500
Send {i down}
Send {u down}
Sleep, 100
Send {i up}
Send {u up}
Sleep, 100
Send {j down}
Sleep, 100
Send {j up}
Sleep, 100
Send {k down}
Sleep, 100
Send {k up}
Sleep, 100
Send {j down}
Send {u down}
Sleep, 100
Send {j up}
Send {u up}
Sleep, 1500
Send {i down}
Send {k down}
Sleep, 100
Send {i up}
Send {k up}
Sleep, 100
Send {j down}
Send {k down}
Sleep, 100
Send {j up}
Send {k up}
Sleep, 100
Send {j down}
Send {u down}
Sleep, 100
Send {j up}
Send {u up}
Sleep, 100
Send {i down}
Send {u down}
Sleep, 100
Send {i up}
Send {u up}
Sleep, 100
Send {j down}
Send {u down}
Send {i down}
Sleep, 100
Send {j up}
Send {u up}
Send {i up}
Sleep, 100
Return
excision
Posts: 14
Joined: 30 Jun 2017, 06:06

Re: Cant seem to get Run script when button held

17 Jul 2017, 11:49

i have tried with
1Joy5::
SetTimer, T1Joy5, 100
Driver:


then at end of script
SetTimer, T1Joy5, Off
return
T1Joy6:
KeyWait, 1Joy5, T.02
If ErrorLevel
Return
Loop, Parse,% "dijksu" ;all buttons that could be down
Send, {%A_LoopField% Up}
Reload
excision
Posts: 14
Joined: 30 Jun 2017, 06:06

Re: Cant seem to get Run script when button held

22 Jul 2017, 08:02

surely some1 knows how to achieve this basically i want the feature razer synapse etc has run the macro only when key been held aka T1joy5

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: mikeyww and 89 guests