I was wondering if you could tell me why a line of script doesnt work, its pretty simple. I'm trying to make a script to use in a game called smite that i press a key, it sends a string of key responses like V then G then F, etc. But when I try to make binds for combo keys, like Shift+ mouse 4, it will not function properly. Here is what I have:
#IfWinActive, ahk_class LaunchUnrealUWindowsClient ; if smite running
XButton1:: ;Enemies spotted (blank)
Send v
Sleep, 100
Send b
Sleep, 100
Return
XButton2:: ;I'll attack (blank)
Send v
Sleep, 100
Send s
Sleep, 100
Send a
Return
+WheelUp:: ;I'll defend (blank)
Send v
Sleep, 100
Send s
Sleep, 100
Send d
Return
+WheelDown:: ;Ok! + No problem
Send v
Sleep, 200
Send v
Sleep, 200
Send a
Sleep, 500
Send v
Sleep, 200
Send v
Sleep, 200
Send g
Sleep, 200
Send r
Return
The first two work just fine, the second two (for shift + mwheelup or down) do not. I was wondering if you might know why or how I may improve upon this to make it work?
Simple script problem - combo keys Topic is solved
- MasterFocus
- Posts: 146
- Joined: 01 Oct 2013, 09:47
- Location: Rio de Janeiro - RJ - Brasil
- Contact:
Re: Simple script problem - combo keys
Please use code tags (see the "Code" button) when posting code.
You could try checking if Shift is held down.
Something like this (untested):
You could try checking if Shift is held down.
Something like this (untested):
Code: Select all
*$WheelDown::
If !GetKeyState("LShift","P") { ; ignore if left shift is not held down
Send, {Blind}{WheelDown}
Return
}
MsgBox, % "You just used LShift+WheelDown !!" ; do whatever actions you want here
Return
Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.
Need help? Please post on the forum before sending me a PM.
Re: Simple script problem - combo keys
Guests are not permitted to use BBCode, so code tags wouldn't work.