Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

WinSet, Top|Raise|Lower, ...


  • Please log in to reply
6 replies to this topic
  • Guests
  • Last active:
  • Joined: --
There is a "WinSet, Bottom" command sending a window to the bottom
of the window stack.

But, there is no "WinSet, Top" bringing a window to the top of the stack.
E.g. when a window is partially covered by another window I would like
to raise it above this window. WinActivate does nothing if the window is
already active, so now I do a WinMinimize+WinRestore which hurts the
eye.

Actually, I would love to manipulate the window stack also in finer steps,
i.e. lower/raise a window by one position in the window stack.

Is this possible?

Thanks

Robert.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
I think this can be done by calling SetWindowPos by means of DllCall. It seems to offer precising control over the ordering (stacking) of windows.

robf
  • Guests
  • Last active:
  • Joined: --

I think this can be done by calling SetWindowPos by means of DllCall. It seems to offer precising control over the ordering (stacking) of windows.

This is cool, I have not been aware of the DllCall command, BTW it is not listed in "Extras/Editors/Syntax/Commands.txt" like
DllCall("[DllFile\]Function" [, "Type1", Arg1, "Type2", Arg2, "Cdecl ReturnType"])
And while still tying to figureout the right parameters for DllCall, i.e. mapping symbolic values like HWND_TOP, the following is a nice workaround for me
WinSet, AlwaysOnTop, On, ahk_id %active_id%
WinSet, AlwaysOnTop, Off, ahk_id %active_id%

May thanks,
Robert

robf
  • Guests
  • Last active:
  • Joined: --
I get the error "Call to nonexistent function" for any function
I try to call by DllCall. This is AHK version 1.0.32.00 on WinXP
SP2.

Example:
DllCall("kernel32.dll\Beep", "int", 100, "int", 175)

Any ideas, thx
Robert

toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005
DllCall was added to AHK in 1.0.33.
You should get the latest version.
Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.

robf
  • Guests
  • Last active:
  • Joined: --
Thanks a lot.

Stupid me though the error message was coming from
DllCall not finding the function I want to call.

:?

Robert.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

BTW it is not listed in "Extras/Editors/Syntax/Commands.txt" like [it should be]

Thanks, I fixed that.