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 

WinDeactivate?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Breta
Guest





PostPosted: Thu May 22, 2008 5:37 pm    Post subject: WinDeactivate? Reply with quote

Is there any opposite of WinAcitvate??
Back to top
sinkfaze



Joined: 18 Mar 2008
Posts: 139

PostPosted: Thu May 22, 2008 6:18 pm    Post subject: Reply with quote

Why (or when) would you need an opposite of WinActivate, for example?
_________________
Have trouble searching the site for information? Try Quick Search for Autohotkey.
Back to top
View user's profile Send private message
Breta
Guest





PostPosted: Thu May 22, 2008 8:08 pm    Post subject: Reply with quote

Technically does it extist? somehow to deactivate? what window default system switch first?
i thougt about that and maybe it would switch to last previous active window. But i still don't know how to do that.. Can you help me?
Back to top
sinkfaze



Joined: 18 Mar 2008
Posts: 139

PostPosted: Fri May 23, 2008 12:42 am    Post subject: Reply with quote

As an actual code title, WinDeactivate does not exist. The purpose of WinActivate is to bring a window to the front, you can't really push a window to the back per se. This article may be of interest to help in effect deactivate the active window:

Last Found Window
_________________
Have trouble searching the site for information? Try Quick Search for Autohotkey.
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 2737
Location: Australia, Qld

PostPosted: Fri May 23, 2008 1:11 am    Post subject: Reply with quote

Code:
Send !{Esc}
Question

Quote:
you can't really push a window to the back per se.
Code:
WinSet, Bottom,, A
Razz
Back to top
View user's profile Send private message
Marcos
Guest





PostPosted: Sun Sep 21, 2008 9:55 am    Post subject: focuss off the active window Reply with quote

Hi,

thank you for the tips.

I actually have this question:

Is it possible to take the focuss off the active window, so that the window stays in front of others but its caption buttons _[]x are not focused (stop glowing) ?

WinSet ? Something with ControlFocus ?

Please help, thank you !

- Marcos Rolling Eyes
Back to top
Lexikos



Joined: 17 Oct 2006
Posts: 2737
Location: Australia, Qld

PostPosted: Sun Sep 21, 2008 10:03 am    Post subject: Reply with quote

Do you mean to leave the window active but let it appear inactive, or to deactivate it but leave it in front of other windows?
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Sep 21, 2008 10:28 am    Post subject: Re: focuss off the active window Reply with quote

Marcos wrote:
Hi,

thank you for the tips.

I actually have this question:

Is it possible to take the focuss off the active window, so that the window stays in front of others but its caption buttons _[]x are not focused (stop glowing) ?

WinSet ? Something with ControlFocus ?

Please help, thank you !

- Marcos Rolling Eyes


This does what you ask:
Code:
#SingleInstance, force
#Persistent
#NoEnv

Gui, +LastFound
Gui, Add, Button, w0 , dummy      ; create dummy control to receive focus
Gui, Add, Button, w100 xp yp gbuttonStart , &Start
Gui, Add, Button, w100 gbuttonEnd   , &End
Gui, Show ,,Test Window
ControlFocus, dummy               ; set focus to dummy control
WinSet, AlwaysOnTop,ON
return

buttonStart:
Gui, +LastFound
ControlFocus, dummy               ; set focus to dummy control
msgbox, Start pressed!
return

buttonEnd:
Gui, +LastFound
ControlFocus, dummy               ; set focus to dummy control
msgbox, End pressed!
return

GuiClose:
ExitApp
Back to top
Guest






PostPosted: Sun Sep 21, 2008 10:39 am    Post subject: Reply with quote

Cool, quick replying !


I mean to make the foremost window, such as my browser with this forum, inactive and at the same time staying on top of others.

Ok, just click on an empty spot in your task tray and see what happens to your foremost window (it stays unchanged but becomes inactive) - this is what I want to do but without the Click command. I do have the need, can tell later, it'll take me time.

If I should screenshot what I mean, let me know plz.
Back to top
Lexikos



Joined: 17 Oct 2006
Posts: 2737
Location: Australia, Qld

PostPosted: Sun Sep 21, 2008 10:43 am    Post subject: Reply with quote

Quote:
Ok, just click on an empty spot in your task tray and see what happens to your foremost window (it stays unchanged but becomes inactive)
Incorrect - the task tray becomes the active window.
Code:
WinActivate, ahk_class Shell_TrayWnd
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Sep 21, 2008 10:51 am    Post subject: Reply with quote

I have tried the code suggested:

[Moderator's note: Removed unnecessary quote to make the thread easier to read.]


and it draws the script's window with start/exit - but I would like simple current active window deactivation.

[ Moderator!: Removed abnormal font size ]

Thank you all for participating !
Back to top
Guest






PostPosted: Sun Sep 21, 2008 10:55 am    Post subject: Reply with quote

Lexikos wrote:
Quote:
Ok, just click on an empty spot in your task tray and see what happens to your foremost window (it stays unchanged but becomes inactive)
Incorrect - the task tray becomes the active window.
Code:
WinActivate, ahk_class Shell_TrayWnd



Wink WinActivate, ahk_class Shell_TrayWnd !!!!!!!! Yeahhhh !

This is it ! Thanx a million. IT WORKS !!!!!


WinActivate, ahk_class Shell_TrayWnd


Thank youl for help.
Back to top
Guest






PostPosted: Sun Sep 21, 2008 11:18 am    Post subject: Reply with quote

P.S. My explanation for the need, shortly:

In Vista, I do fllip 3D a lot. When I release Win, I often get a short visual overlaying with the image of the window from which I started to flip, which looks bad for my eyes, kind of flashing. But when I first click on taskbar and then flip, there's no problem.


Ok, I should write a script like:


^Tab::
WinActivate, ahk_class Shell_TrayWnd
run rundl32 dwmapi #105
return


One more questions, pl :

^Tab::
WinActivate, ahk_class Shell_TrayWnd
^#Tab - how can I send ^#Tab if Send command does not work to start Aero Flip, and I do not like run rundl32 dwmapi #105 cause it spins my HDD
return
Back to top
Guest






PostPosted: Sun Sep 21, 2008 2:53 pm    Post subject: Reply with quote



After a while of suffering, it came up as simple as that :


Code:

^Tab::
WinActivate, ahk_class Shell_TrayWnd
#IfWinActive, ahk_class Shell_TrayWnd
^Tab::^#Tab
return





What it does is to deactivate the current active window when invoking Vista Flip 3D with Ctrl-Tab hotkey.


- Marcos.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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