Send Window to Back Action

Got a good idea? You can suggest new features here.

Send Window to Back Action

Postby PooFox » Sun Feb 14, 2010 7:05 am

We've got "Send Window to Front", we need "Send Window to Back", because different windows respond differently to Close Window and Minimize Window. "Send to Back" will just get it outta my face! Used in conjunction with the escape key, as i would like to, this provides a more interactive and useful (imo) alt+tab type function.

This would be quite handy, thanks.
PooFox
 
Posts: 9
Joined: Sun Feb 14, 2010 6:18 am

Re: Send Window to Back Action

Postby Pako » Sun Feb 14, 2010 10:24 am

You can try this script:
Code: Select all
#Script "Send Window to Back"
HWND_BOTTOM        = 0x0001
SWP_NOSIZE         = 0x0001
SWP_NOMOVE         = 0x0002
SWP_NOACTIVATE     = 0x0010
SWP_SHOWWINDOW     = 0x0040
SWP_HIDEWINDOW     = 0x0080
SWP_ASYNCWINDOWPOS = 0x4000
FLAGS_1 = SWP_ASYNCWINDOWPOS | SWP_NOSIZE | SWP_NOMOVE | SWP_HIDEWINDOW | SWP_NOACTIVATE
FLAGS_2 = SWP_ASYNCWINDOWPOS | SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW | SWP_NOACTIVATE
if eg.result and len(eg.result) > 0:
    hwnd = eg.result[0]
    from ctypes import windll
    SetWindowPos = windll.user32.SetWindowPos
    SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0, FLAGS_1)
    SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0, FLAGS_2)
Pako
Attachments
SendWindowToBack.jpg
SendWindowToBack.jpg (5.63 KiB) Viewed 2263 times
User avatar
Pako
Plugin Developer
 
Posts: 1282
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Send Window to Back Action

Postby PooFox » Sun Feb 14, 2010 11:14 pm

hmm, this script doesnt seem to be doing anything. eventghost verifies that its being launched by my escape key but nothing happens. i did install python as well, but that didnt change anything. thanks though...
PooFox
 
Posts: 9
Joined: Sun Feb 14, 2010 6:18 am

Re: Send Window to Back Action

Postby Pako » Mon Feb 15, 2010 7:27 am

My English is very weak and I might not understand correctly your request.
I am convinced that my script does exactly what you requested.
I please - can anyone try?
What is really a problem?

Pako
User avatar
Pako
Plugin Developer
 
Posts: 1282
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Send Window to Back Action

Postby jinxdone » Mon Feb 15, 2010 7:35 am

Pako's script is working great. You just have to use the find window macro first to target something just before the python script, maybe you missed that PooFox?

As an alternative there is a default feature in Windows, alt-esc, that sends the current focused window to the background. shift-alt-esc does the opposite, it brings the lowest z-index window to the front.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1397">
    <Macro Name="Emulate Keystrokes: {Alt+Escape}" Expanded="True">
        <Action>
            Window.SendKeys(u'{Alt+Escape}', False)
        </Action>
    </Macro>
</EventGhost>


-jinxdone
User avatar
jinxdone
Plugin Developer
 
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Send Window to Back Action

Postby PooFox » Tue Feb 16, 2010 12:07 am

yea ive got it setup right with escape, find frontmost window, and the python script (which i copied and pasted from the post) actions under the macro . It doesnt do anything when i hit escape however...

Alt+Esc will work for now.
PooFox
 
Posts: 9
Joined: Sun Feb 14, 2010 6:18 am

Re: Send Window to Back Action

Postby Pako » Tue Feb 16, 2010 6:17 am

Which way you have done the bind between pressing the Escape key and run the macro?

Pako
User avatar
Pako
Plugin Developer
 
Posts: 1282
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests