Jump to content
Sign in to follow this  

Question on WinGetTitle

Recommended Posts


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.


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)
        Sleep (50)

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.