Jump to content

Set Active Window On-top


Recommended Posts

MsgBox(0, "Select", "Please Select the window you want on top and click Ok.")
$win1 = WinGetTitle ( "" )

WinSetOnTop($win1, "", 1)

Why doesn't that work?

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

The MsgBox takes away the focus. Try this instead:

MsgBox(0, "Select", "After clicking OK, select the window you want to be set on top within 5 seconds.")
Sleep(5000)
$win1 = WinGetTitle ( "" )
WinSetOnTop($win1, "", 1)

Or, use HotKeys instead.

#)

edit: @thatsgreat2345: he wants the window to be always on top.

Edited by nfwu
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...