Jump to content
Sign in to follow this  
SnapCrakllPop

Need help keeping a window on top

Recommended Posts

SnapCrakllPop

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

Share this post


Link to post
Share on other sites
AdmiralAlkex

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() :)

Share this post


Link to post
Share on other sites
tgarr

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.