Jump to content
Sign in to follow this  
rupturex

Send left click mouse to inactive window

Recommended Posts

rupturex

Hello all!! I am new here....still learning the ropes. I have been googling for hours and searching here but have yet to find a simple script to send left click mouse to an inactive window. Is this possiable? If so can anybody give me a sample script?

Thanks!

Love!

Share this post


Link to post
Share on other sites
ajag

Hi,

I guess you just want to activate an inactive window (by left-clicking)? If yes, you don't have to do that. Test this to activate an inactive Nodepad-Window with an opened file "Test.txt":

WinActivate("Test.txt - Editor")

A-Jay

Edited by ajag

Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

Share this post


Link to post
Share on other sites
rupturex

Hi,

I guess you just want to activate an inactive window (by left-clicking)? If yes, you don't have to do that. Test this to activate an inactive Nodepad-Window with an opened file "Test.txt":

WinActivate("Test.txt - Editor")

A-Jay

Sorry, let me clarify....., its a game I play, I want to be able to left click inside the game while its minimized....and browse the internet at the same time.

Share this post


Link to post
Share on other sites
ajag

But when the window is minimized then there is no area where you can click. And when you click on an minimized window (at the taskbar), it become resized and will popup an then it is activated.

Edited by ajag

Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

Share this post


Link to post
Share on other sites
z0mgItsJohn

Here's an example.. hope it helps

Source : Example.Au3

Opt ('WinTitleMatchMode','2') ; Helps With Getting The Window Information...
$Title = '' ; The Name Of The Game...
$Full = WinGetTitle ($Title) ; Get The Full Title..
$HWnD = WinGetHandle ($Full) ; Get The Handle
$iButton = '' ; Button The Mouse Will Click I.E. "Left Or Right"
$iClicks = '' ; The Number Of Times To Click 
$iX = '' ; The "X" Pos For The Mouse To Click
$iY = '' ; The "Y" Pos For The Mouse To Click
If IsHWnD ($HWnD) And WinExists ($Full) <> '0' Then ; Win Check
ControlClick ($HWnD, '','', $iButton, $iClicks, $iX, $iY) ; Clicking The Window While Its Minmized
EndIf

- John


Latest Projects :- New & Improved TCP Chat

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.