Sign in to follow this  
Followers 0
oktoberfest2

Question on WinGetTitle

2 posts in this topic

I'm currently writing a program that needs to always get the active window title and handle. I simply have it in an infinite loop with a sleep(10) command. It works fine but I'm just wondering what resource impact it has on the computer and if using a dllcall function would be better as I need to continually call to get the information.

Thanks

Share this post


Link to post
Share on other sites



What about something like this?

$oldtitle = WinGetTitle ("[ACTIVE]")
While 1
    $title = WinGetTitle ("[ACTIVE]")
    If $oldtitle <> $title Then
        $oldtitle = $title
        ToolTip ($oldtitle)
    Else
        Sleep (50)
    EndIf
WEnd

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  
Followers 0