Sign in to follow this  
Followers 0
sandman

How to find out what window is active .. ?

5 posts in this topic

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]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Okay, Thanks.


[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]

Share this post


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

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