| View previous topic :: View next topic |
| Author |
Message |
Bobo8
Joined: 09 Sep 2008 Posts: 5 Location: Czech rep.
|
Posted: Wed Oct 14, 2009 9:37 am Post subject: GetKeyState() function returns U/D. Update: solved |
|
|
GetKeyState() function does not return true (1) for down and false (0) for up, as is in Help, but returns "U"/"D".
| Code: | #^o::
Sleep 2000
ShiftKey:=GetKeyState("Shift")
MsgBox %ShiftKey%
Return
|
[Moved from Bug Reports forum. ~jaco0646]
Last edited by Bobo8 on Sun Oct 18, 2009 5:42 pm; edited 2 times in total |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Oct 14, 2009 1:57 pm Post subject: |
|
|
| Code: | | MsgBox, % GetKeyState("Shift") |
Returns properly 1 or 0 on my computer. Perhaps shift modifier is interfering? |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
Posted: Wed Oct 14, 2009 2:06 pm Post subject: |
|
|
| Code: | !j::
MsgBox % GetKeyState("Shift")
Sleep 2000
ShiftKey:=GetKeyState("Shift")
MsgBox %ShiftKey%
Return |
This also returns 1 or 0 properly on my PC. Have you been able to duplicate this problem with other keys? _________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
Bobo8
Joined: 09 Sep 2008 Posts: 5 Location: Czech rep.
|
Posted: Sun Oct 18, 2009 5:34 pm Post subject: |
|
|
| The problem is in "#Include Function.ahk" (which I have downloaded form AHK forum), there is the function with the same name which returns "D"/"U"!! |
|
| Back to top |
|
 |
|