Jump to content
Sign in to follow this  

Getting currently active window

Recommended Posts


Is there a easier way to get the currently active window without using winlist and winactive to scroll through all the windows to find the active 1?

Edited by D4rk^S0ul

Share this post

Link to post
Share on other sites

what do you want to know

#include <Array.au3>

$asControls = StringSplit( WinGetClassList( "", "" ), @LF )
_ArrayDisplay( $asControls, "Class List of Active Window" )

$size = WinGetPos("")
MsgBox(0, "Active window stats (x,y,width,height):", $size[0] & " " & $size[1] & " " & $size[2] & " " & $size[3])

$size = WinGetClientSize("")
MsgBox(0, "Active window's client size is (width,height):", $size[0] & " " & $size[1])

MsgBox(64, "Title",WinGetTitle("")) ; returns the active window's title

there are many others too!

SmOke_N wrote a UDF for this - its in Autoit Wrappers



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.