Jump to content

How to find out what window is active .. ?


Recommended Posts

I need a script to do something to whatever window is open, but I can't seem to get anything working. I already tried this:

$active = WinActive()

And that didn't work. As far as I know, there is no GetActiveWin() or WinGetActive() or whatever supported. What can I use to find this out?

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

From Helpfile:

WinGetTitle("") returns the active window's title. WinGetTitle works on both minimized and hidden windows. If multiple windows match the criteria, the most recently active window is used.

Edited by dabus
Link to comment
Share on other sites

I tried your answer, Dabus, and it didn't work. It just returned the variable name ($active). I had it set like this:

$active = WinGetTitle("")

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

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...