Jump to content

Recommended Posts

Posted

Hello,

I am using a program called DUMeter:

http://www.dumeter.com/scrshots.php

Here are some details about this program:

1/ this program does not have a "window title" (see link above)

2/ It is always on the top of all windows

3/ It does not appear in Task Manager-Applications. But it is listed into Task Manager-Processes

I want to put focus on this window and take automatically a screenshot of it, but as it is not listed in the list of active programs, and as it does not have apparently any "window name", I do not know where to start to look for an answer in the help documentation.

Any advice/direction to documentation would be more than welcome!

Posted (edited)

Hello :)

This function will give you hadles and other info about ALL window's in system (even those not visible) ;)

I hope it was usefull? Cheers.

#include <WinAPI.au3>
Opt('MustDeclareVars', 1)

_Main()

Func _Main()
    Local $aWindows, $i, $text
    $aWindows = _WinAPI_EnumWindows()
    For $i = 1 To UBound($aWindows) - 1
        $text = "Window Handle: " & $aWindows[$i][0] & @LF
        $text &= "Window Class: " & $aWindows[$i][1] & @LF
        $text &= "Window Title: " & WinGetTitle($aWindows[$i][0]) & @LF
        $text &= "Window Text: " & WinGetText($aWindows[$i][0]) & @LF
        $text &= "Window Process: " & WinGetProcess($aWindows[$i][0])
        MsgBox(0, "Item " & $i & " of " & UBound($aWindows) - 1, $text)
    Next
EndFunc   ;==>_Main

EDIT:

Hey! But you could also use a _WinAPI_GetForegroundWindow() function, it is returning a handle to window which is on the top of screen B)

Edited by Uriziel01

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...