AutoHotkey Community

It is currently May 27th, 2012, 12:27 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: June 13th, 2005, 8:55 pm 
Offline

Joined: November 23rd, 2004, 5:54 pm
Posts: 8
I'm using GroupActivate, %string%, R to great effect for managing windows with hotkeys. I've also got the following (very simple) method for saving windows in numbered buffers: scroll lock + number assigns the window to that number; capslock + number activates it.

Code:
;====--------------------
; Saved windows 1-10
;----========================

ScrollLock & 1::WinGet, rWindow1, ID, A
ScrollLock & 2::WinGet, rWindow2, ID, A
ScrollLock & 3::WinGet, rWindow3, ID, A
ScrollLock & 4::WinGet, rWindow4, ID, A
ScrollLock & 5::WinGet, rWindow5, ID, A
ScrollLock & 6::WinGet, rWindow6, ID, A
ScrollLock & 7::WinGet, rWindow7, ID, A
ScrollLock & 8::WinGet, rWindow8, ID, A
ScrollLock & 9::WinGet, rWindow9, ID, A
ScrollLock & 0::WinGet, rWindow0, ID, A

CapsLock & 1::WinActivate, ahk_id %rWindow1%
CapsLock & 2::WinActivate, ahk_id %rWindow2%
CapsLock & 3::WinActivate, ahk_id %rWindow3%
CapsLock & 4::WinActivate, ahk_id %rWindow4%
CapsLock & 5::WinActivate, ahk_id %rWindow5%
CapsLock & 6::WinActivate, ahk_id %rWindow6%
CapsLock & 7::WinActivate, ahk_id %rWindow7%
CapsLock & 8::WinActivate, ahk_id %rWindow8%
CapsLock & 9::WinActivate, ahk_id %rWindow9%
CapsLock & 0::WinActivate, ahk_id %rWindow0%

CapsLock & Tab::WinSet, AlwaysOnTop, Toggle, A


Now I would like to have additional features for these saved windows. One that would come in super handy would be a method to put the focus on a specific window without bringing it to the top of the Z-order - somewhat like X-Mouse focus, but with the keyboard instead of the mouse.

WinActivate doesn't really take any parameters, so what I've been doing for now is focusing the window I want to keep on top, using a hotkey to toggle AlwaysOnTop, and then focusing the window I want to type in. It's clumsy. Know a better way?


Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 14th, 2005, 1:30 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Soapspoon wrote:
a method to put the focus on a specific window without bringing it to the top of the Z-order - somewhat like X-Mouse focus, but with the keyboard instead of the mouse.
It sounds like you already know about the "activation follows mouse" setting available in TweakUI and perhaps other utilities. Therefore, the following topic probably won't contain anything useful:
http://www.autohotkey.com/forum/viewtopic.php?t=50

I think there's a way to dynamically turn on and off the activation setting, perhaps via DllCall and SystemParametersInfo(), but I forget the details. When turned on, it's probably possible to activate a window without bringing it to the top by sending it certain messages. You could use Rajat's SendMessage Tutorial to figure out what messages occur when a window activates while the system has been set to this mode.

Just to be clear, this mode is a special system setting that activates a window without bringing it to the top whenever you hover the mouse over it.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, chaosad, Exabot [Bot], Google Feedfetcher, jrav and 19 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