Here is my code:
What is happening: when it is running it constantly splashed Num Lock = On or Off.
Desired Outcome: Always run in the task bar and only splashText when the status changes.
Any ideas?
Thanks
Grimm
[ autoit ]
Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) Global Const $VK_NUMLOCK = 0x90 Global Const $VK_SCROLL = 0x91 Global Const $VK_CAPITAL = 0x14 While 1 If _GetNumLock() = 1 Then SplashTextOn('', 'NumLock = ON', 150, 50) Sleep(2000) SplashOff() Else Endif Sleep(10) If _GetNumLock() = 0 Then SplashTextOn('', 'NumLock = OFF', 150, 50) Sleep(2000) SplashOff() Else EndIf WEnd Func _GetNumLock() Local $ret $ret = DllCall("user32.dll","long","GetKeyState","long",$VK_NUMLOCK) Return $ret[0] EndFunc Func _GetScrollLock() Local $ret $ret = DllCall("user32.dll","long","GetKeyState","long",$VK_SCROLL) Return $ret[0] EndFunc Func _GetCapsLock() Local $ret $ret = DllCall("user32.dll","long","GetKeyState","long",$VK_CAPITAL) Return $ret[0] EndFunc Func IsVisible($handle) If BitAND(WinGetState($handle), 2) Then Return 1 Else Return 0 EndIf EndFunc ;==>IsVisible Func _exit() Exit EndFunc
What is happening: when it is running it constantly splashed Num Lock = On or Off.
Desired Outcome: Always run in the task bar and only splashText when the status changes.
Any ideas?
Thanks
Grimm