WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WinBatch Function UDFs

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

IsKeyDownEx

 Keywords: IsKeyDownEx IsKeyDown UDF User Defined Function Virtual Key Code HOME GetAsyncKeyState 

#DefineFunction IsKeyDownEx(virtualkeycode)
   ret = DllCall(DirWindows(1): "user32.dll", long:"GetAsyncKeyState", long:virtualkeycode)
   If ret != 0 Then ret = 1
   Return ret
#EndFunction

;List of Virtual Key Codes: http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx

home_key = 36
BoxOpen('Press HOME key to exit','')
While @TRUE
   ret = IsKeyDownEx(home_key)
   If ret Then Break
EndWhile
Exit

List of Virtual Key Codes: http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx


Article ID:   W18416
Filename:   IsKeyDownEx.txt
File Created: 2012:04:13:13:15:02
Last Updated: 2012:04:13:13:15:02