Jump to content
Sign in to follow this  

set focus on last application with focus

Recommended Posts



Need help to understand focus :

WinActivate("[CLASS:Notepad]", "")

If a notepad is open function call application and set focus over it.

Try to write a script to remember last application with focus, to call after

done some step and past some text on it.

can anyone place on right way ?

thank you,


Edited by myspacee

Share this post

Link to post
Share on other sites

Either poll current active and keep track yourself when current active changes.

Or try to manipulate the return from WinList()... WinList comes back in a Z-order (kind of a "focus order" and you may be able to figure out how to get "last active" from it... but I would personally poll active window and keep track myself...

on the other hand... maybe GetWindow() API using the Z-order parm...

I don't know.. there is enough info there to have you reading the internet and figuring it out on your own.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

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