CapsLock Status Tooltip

Post your working scripts, libraries and tools for AHK v1.1 and older
Kamal Awasthi
Posts: 22
Joined: 19 Aug 2015, 04:35
Contact:

CapsLock Status Tooltip

02 Sep 2015, 05:31

CapsLockToolTip:
a script to give a tooltip message on each press of CapsLock Button.
Can be usful for the laptops without CapsLock Notifier.

Code: Select all

CapsLock::


GetKeyState, state, CapsLock, T ;  D if CapsLock is ON or U otherwise.
if(state=="U")
{
  SetCapsLockState, on
  ToolTip Caps Lock is On
SetTimer, RemoveToolTip, 1000

}
else
{
 SetCapsLockState, Off
ToolTip Caps Lock is Off
SetTimer, RemoveToolTip, 1000

}
return
/*
#Persistent
ToolTip, Timed ToolTip`nThis will be displayed for 5 seconds.
SetTimer, RemoveToolTip, 5000
return

*/
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
dsewq1LYJ
Posts: 116
Joined: 26 Aug 2014, 23:21

Re: CapsLock Status Tooltip

02 Sep 2015, 07:42

Code: Select all

if GetKeyState("CapsLock","T")
{
	SetCapsLockState,Off
	ToolTip,CapsLock is Off
	SetTimer,RemoveToolTip,432
}
else
{
	SetCapsLockState,On
	ToolTip,CapsLock is On
	SetTimer,RemoveToolTip,432
}
return

RemoveToolTip:
SetTimer,RemoveToolTip,Off
ToolTip
return
Not better but clear.
Jon Snow
Posts: 2
Joined: 18 Jun 2015, 20:01

Re: CapsLock Status Tooltip

02 Sep 2015, 09:26

Thank you.
I Would appreciate if you did the same with Num Lock.

:)
ozzii
Posts: 482
Joined: 30 Oct 2013, 06:04

Re: CapsLock Status Tooltip

03 Sep 2015, 02:25

Change CapsLock with NumLock and SetCapsLockState with SetNumLockState
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: CapsLock Status Tooltip

03 Sep 2015, 02:52

This may interest you - visual lock indicator (OSD)
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
Kamal Awasthi
Posts: 22
Joined: 19 Aug 2015, 04:35
Contact:

Re: CapsLock Status Tooltip

04 Sep 2015, 04:50

ya! Do same as told above. And I would post one for that too.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: fiendhunter and 116 guests