Jump to content

Need help keeping a window on top


Recommended Posts

I'm doing a quest for a game I play in which I have to kill a certain number of monsters. It's kinda over-animated, so it takes a bit to open the inventory (which has a nice 'n fancy animation), then check a bottle of souls (which has a nice little animation to go with it as well), then close the inventory (which, of course, has an animation). That's plenty of time to get killed. I want to have a window that opens and STAYS ON TOP OF THE GAME even when I'm clicking in-game to play it. This way I can always see the number of kills I have. I have everything working, exept the window doesn't stay on top. How do I do this?

I tried this:

#include <GuiConstantsEx.au3>

GuiCreate("DE", 110, 50, -1, -1, $WS_EX_TOPMOST)

And I get this error:

C:\Program Files\AutoIt3\Examples\GUI\SampleControls.au3 (65) : ==> Variable used without being declared.:

GuiCreate("DE", 110, 50, -1, -1, $WS_EX_TOPMOST)

GuiCreate("DE", 110, 50, -1, -1, ^ ERROR

Can anyone help?

Thanks,

SCP

Link to comment
Share on other sites

If you in SciTE pressed "Search>Find in Files" and searched for $WS_EX_TOPMOST in your include directory you would see that it is in WindowsConstants.au3 >_<

You can also use WinSetOnTop() or _WinAPI_SetWindowPos() :)

Link to comment
Share on other sites

I'm doing a quest for a game I play in which I have to kill a certain number of monsters. It's kinda over-animated, so it takes a bit to open the inventory (which has a nice 'n fancy animation), then check a bottle of souls (which has a nice little animation to go with it as well), then close the inventory (which, of course, has an animation). That's plenty of time to get killed. I want to have a window that opens and STAYS ON TOP OF THE GAME even when I'm clicking in-game to play it. This way I can always see the number of kills I have. I have everything working, exept the window doesn't stay on top. How do I do this?

I tried this:

#include <GuiConstantsEx.au3>

GuiCreate("DE", 110, 50, -1, -1, $WS_EX_TOPMOST)

And I get this error:

Can anyone help?

Thanks,

SCP

WinSetOnTop ( "title", "text", flag ) works great for that sort of thing

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...