本帖最后由 lixiaolong 于 2011-10-23 16:44 编辑
回复 1# qq4045728
函 数 参 考
_WinAPI_GetKeyState
--------------------------------------------------------------------------------
检索指定虚拟键的状态.
_WinAPI_GetKeyState ( $vKey )
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_LegalCopyright=http://www.autoitx.com/ - lixiaolong
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <WinAPIEx.au3>
Global Const $VK_NUMLOCK = 0x90
While 1
$msg = GUIGetMsg()
_AlwaysNumLockON($VK_NUMLOCK)
WEnd
Func _AlwaysNumLockON($Key)
Local $State = _WinAPI_GetKeyState($Key); Check NumLock ON,OFF
If Not $State Then Send('{NUMLOCK ON}'); If Not $State Then = 如果数字键盘(NumLock)灯没开.
EndFunc ;==>_AlwaysNumLockON
|