AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Function] KeyHistoryExtended() - pseudo-realtime logging

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Tester



Joined: 06 Jul 2006
Posts: 48
Location: Poland

PostPosted: Tue Jul 11, 2006 8:56 pm    Post subject: [Function] KeyHistoryExtended() - pseudo-realtime logging Reply with quote

Because now I troubleshoot some complicated keyboard+mouse chords, then I often launch KeyHistory window. But it lacks of realtime feedback. So I wrote this simple function for refreshing KeyHistory window without use of keyboard (which of course would be logged too).
Code:
KeyHistoryExtended()   {
         IfWinNotExist, %A_Space%- AutoHotkey v
            KeyHistory
         else   {
            SetTitleMatchMode, 2
            SetTimer, KeyHistoryExtendedTimer, 20
         }
}

KeyHistoryExtendedTimer:
   PostMessage, 0x111, 65410, 0,, %A_Space%- AutoHotkey v
   IfWinNotExist, %A_Space%- AutoHotkey v
      SetTimer, KeyHistoryExtendedTimer, Off
return


Example of usage:
Code:
#F9::KeyHistoryExtended()
Press above hotkey twice to turn on pseudo-realtime logging for KeyHistory window. And close KeyHistory window to turn realtime logging off.

The main drawback is that this window now continously stole focus. If anyone have idea how to prevent this then post some suggestions.
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 4710
Location: Boulder, CO

PostPosted: Wed Jul 12, 2006 12:01 am    Post subject: Reply with quote

Here is another version.
Back to top
View user's profile Send private message
Tester



Joined: 06 Jul 2006
Posts: 48
Location: Poland

PostPosted: Wed Jul 12, 2006 8:06 pm    Post subject: Reply with quote

Great, it is much better, thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group