I've just started using AHK, so this question is basic. Nevertheless, I need help with debugging something I made.
Code: Select all
*y::
If(!GetKeyState("Shift"))
{
; do nothing
} else {
; send, g
}
return
Code: Select all
*y::
If(!GetKeyState("Shift"))
{
; do nothing
} else {
; send, g
}
return
Code: Select all
*y::
If(!GetKeyState("Shift")) ;if NOT holding shift
{
;if NOT holding shift do nothing
} else {
;ELSE if holding shift send g
}
return
Code: Select all
;condensed code
y::
if (!GetKeyState("shift")) ;if NOT holding shift
send g
return
Your code does quite the opposite; that is, it does nothing precisely if you're not holding shift; remove the logical not in front of the GetKeyState call:I can't find my error
Code: Select all
*y::
If (GetKeyState("Shift"))
return ; end the subroutine
; otherwise...
MsgBox, OK
return
Code: Select all
#If !GetKeyState("Shift")
*y::
MsgBox, test
return
#If
Users browsing this forum: No registered users and 40 guests