Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Only show once

$
0
0
Here is my code:

[ 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

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>