sandman Posted March 14, 2007 Share Posted March 14, 2007 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 More sharing options...
dabus Posted March 14, 2007 Share Posted March 14, 2007 (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 March 14, 2007 by dabus Link to comment Share on other sites More sharing options...
sandman Posted March 14, 2007 Author Share Posted March 14, 2007 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] Link to comment Share on other sites More sharing options...
sandman Posted March 14, 2007 Author Share Posted March 14, 2007 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 More sharing options...
xcal Posted March 14, 2007 Share Posted March 14, 2007 HotKeySet('{esc}', 'quit') While 1 ToolTip(WinGetTitle('')) Sleep(100) WEnd Func quit() Exit EndFunc How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now