Sign in to follow this  
Followers 0
JohnBailey

Get Top/Active Window

6 posts in this topic

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


A decision is a powerful thing

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

WinGetHandle("[ACTIVE]")

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

OH!! :) :"> Thank you!


A decision is a powerful thing

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