Jump to content
Sign in to follow this  
Godownage

Keeping window above all other windows

Recommended Posts

Godownage

Anyone know how to keep a certain window always on top, if they minimize it it automatically comes back up where it was.

Basically i'm trying to make a bot for Diablo II, and if you use Window mode on it.

I need to know this because many errors could occur if:

1.Someone forgets to put a away msg up and they get IMed.

2.Some how the window isn't in the right spot.

3.Some other kind of pop up or error.

Please help me i'm still very new to Autoit, I would love to learn as much as I can.


Share this post


Link to post
Share on other sites
quick_sliver007

While 1
    $win = WinGetState("")
    If @error Then
        MsgBox(0,"","window is not found"
    ElseIf $win <> 32 Then
        WinSetState("","",@SW_MAXIMIZE )
    EndIf
    Sleep(500);add delay to save on cpu
WEnd

Fill in the blanks, the"".


.

Share this post


Link to post
Share on other sites
AutoChris

I believe he wanted the window to always be set on top as well.

While 1

    $win = WinGetState ("")

    If @error Then

        MsgBox (0,"","window is not found"

    ElseIf $win <> 32 Then

        WinSetState ("","",@SW_MAXIMIZE)

        WinSetOnTop ("", "")

    EndIf

    Sleep(500);add delay to save on cpu

WEnd

Fill in the blanks, the"".

<{POST_SNAPBACK}>

Edited by SerialKiller

Share this post


Link to post
Share on other sites
Godownage

OMG Thank you guys so much. I truely am a newbie.


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  

×