ssamko

Control Click

5 posts in this topic

Hello ! 

I just want to ask you....it is possible to use control click on unfocused window ? If yes...how ? 

Thnx !

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Yeh...but...I probably described it wrong....I have got 2 opened windowses (2 programs)...in 1 will work control click (I want this win to be unfocused all the time) because in the second window I want to write something...and always when the control click start....my focused win(to typing) is unfocused. How to solve it ? 

I tryed this:

$activeWindow = WinGetHandle("[ACTIVE]")
while 1
   ControlClick($title,"","","left",1,$x,$y)
   WinActivate($activeWindow)
WEnd

 ...but it isnt 100%

PS: Sorry for my english

Edited by ssamko

Share this post


Link to post
Share on other sites

Looking at the code in the 3rd post, I'm unsure why you have presented us with an infinite loop. Here's a small example of switching focus between two windows - if it helps.
 

; Run the Windows Calculator.
Run("calc.exe")

; Wait for the calculator to become active with a timeout of 10 seconds.
WinWaitActive("[CLASS:CalcFrame]", "", 10)

; Run Notepad
Run("notepad.exe")

; Wait for notepad to become active with a timeout of 10 seconds.
WinWaitActive("[CLASS:Notepad]", "", 10)

; Slow down the script
Sleep(1000)

; Set focus to the calculator
WinActivate("[CLASS:CalcFrame]")

Sleep(1000)

; Set focus to the notepad
WinActivate("[CLASS:Notepad]")

Sleep(1000)

; Close Notepad
WinClose("[CLASS:Notepad]")

Sleep(1000)

; Close the Windows calculator.
WinClose("[CLASS:CalcFrame]")

 

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