AutoHotkey Community

It is currently May 26th, 2012, 10:07 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: October 14th, 2009, 10:37 am 
Offline

Joined: September 9th, 2008, 9:11 am
Posts: 5
Location: Czech rep.
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 October 18th, 2009, 6:42 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2009, 2:57 pm 
Code:
MsgBox, % GetKeyState("Shift")


Returns properly 1 or 0 on my computer. Perhaps shift modifier is interfering?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2009, 3:06 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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?

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 18th, 2009, 6:34 pm 
Offline

Joined: September 9th, 2008, 9:11 am
Posts: 5
Location: Czech rep.
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"!!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: hyper_, JSLover, Leef_me, patgenn123 and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group