Jump to content
Sign in to follow this  
Nicolai

ControlClick in inactive window

Recommended Posts

Nicolai
When i perform ControlClick in chrome browser inactive window, i lost focus in my current browser's window.
 
I try so
$wcurr=WinGetHandle("[ACTIVE]")
     ControlClick ....
WinActivate($wcurr)
 
It help, but can see switching focus .

I often perform ControlClick , and switching all time focus is very disturbing.

What can do?

.
Edited by Nicolai

Share this post


Link to post
Share on other sites
guestscripter

try, instead of 

WinGetHandle("[ACTIVE]")

to use 

$sWinTitle = "yourwindowtitle"
;...
$hWinHandle = WinGetHandle($sWinTitle)

because as far as is understandable, you don´t want the script to bring to focus any windows, which means you don´t want the script to activate any windows.

So stop activating windows in your script with WinActivate :-)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.