Jump to content

Get Top/Active Window


Recommended Posts

  • Moderators

Is there a function out there for getting the current Active/Top Window's handle or title?

WinGetHandle("")

WinGetTitle("")

?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

WinGetHandle("[ACTIVE]")

SCORE!!

Sleep(5*1000)
Local $ActiveWinHandle = WinGetHandle("[ACTIVE]")
Local $ActiveWinTitle = WinGetTitle("[ACTIVE]")
MsgBox(0,'The Current Active Window','Title: '&$ActiveWinTitle)

Thank you!!! I never even noticed that in the help file! thank you!!

A decision is a powerful thing
Link to comment
Share on other sites

  • Moderators

SCORE!!

Sleep(5*1000)
Local $ActiveWinHandle = WinGetHandle("[ACTIVE]")
Local $ActiveWinTitle = WinGetTitle("[ACTIVE]")
MsgBox(0,'The Current Active Window','Title: '&$ActiveWinTitle)

Thank you!!! I never even noticed that in the help file! thank you!!

Leaving the string blank by default will get the active windows handle/title as I demonstrated.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
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
 Share

  • Recently Browsing   0 members

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