AutoHotkey Community

It is currently May 26th, 2012, 7:40 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: May 9th, 2009, 5:00 pm 
This tool is simple yet effective if you have no affirmation of the Caps Lock key being on or off.

When Caps are on the tooltip follows the text as you type, so you definately know it's on.

Code:
#Persistent
#SingleInstance Force
SetTimer, CapsWatch, 1

CapsWatch:
GetKeyState, State, CapsLock, t
If state = D
{
 cursorX:= A_CaretX
 cursorY:= A_CaretY
 ExtraBitY:= (cursorY + 15)
 ToolTip, Caps `nLock, %cursorX%, %ExtraBitY%
}
Else
{
 ToolTip
}       
Return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 9th, 2009, 8:58 pm 
Offline

Joined: May 2nd, 2006, 11:16 pm
Posts: 800
Location: Greeley, CO
VERY useful, indeed (and simple, yes).

I notice, though, that using this tool on the AutoHotkey Forums, running Firefox v3.0.10, the tooltip "parks" itself in the upper left corner of the browser (right under the [<] back arrow).

Overall, I can see myself using this.

_________________
Image
SoggyDog
Dwarf Fortress:
"The most intriguing game I've ever played."


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 11th, 2009, 12:57 am 
Offline

Joined: June 15th, 2008, 8:01 am
Posts: 111
Location: Sydney, Australia
Quote:
running Firefox v3.0.10, the tooltip "parks" itself in the upper left corner of the browser


This one I've done for all non text based windows so it will sit near the mouse cursor. It is a bit tricky trying to get it to work in say a Google search text box for either Firefox or IE.

Code:
#Persistent
#SingleInstance Force
SetTimer, CapsWatch, 1

CapsWatch:
GroupAdd, MyGroup, ahk_class Notepad          ; Notepad
GroupAdd, MyGroup, ahk_class WordPadClass     ; WordPad
GroupAdd, MyGroup, ahk_class OpusApp          ; Word
GroupAdd, MyGroup, ahk_class XLMAIN           ; Excel
GroupAdd, MyGroup, ahk_class rctrl_renwnd32   ; Outlook
GroupAdd, MyGroup, ahk_class PP12FrameClass   ; PowerPoint
GroupAdd, MyGroup, ahk_class MSWinPub         ; Publisher
;GroupAdd, MyGroup, ahk_class                 ; <<add any additional text based software class here

IfWinActive, ahk_group MyGroup
{
 GoSub CaretLook
}
Else
{
 GetKeyState, State, CapsLock, t
 If state = D
 {
  ToolTip, Caps `nLock
 }
Else
 {
  Tooltip
 }
}
Return

CaretLook:
GetKeyState, State, CapsLock, t
If state = D
{
 cursorX:= A_CaretX
 cursorY:= A_CaretY
 ExtraBitY:= (cursorY + 15)
 ToolTip, Caps `nLock, %cursorX%, %ExtraBitY%
}
Else
{
 ToolTip
}
Return


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: bobbysoon, Xx7, Yahoo [Bot] and 11 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group