Jump to content
Cotino

ControlClick not working

Recommended Posts

Cotino

Hi,

I recently learned about Control functions and I'm trying to put them to use on Paint.

However i have a problem with ControlClick : it doesn't work when Paint is inactive (minimized or not on top)

Here is what I'm doing

ControlClick( WinGetHandle( "Untitled" ), "", "", "Left", 1, 500, 500 )

It works if Paint is active, it draws a dot at 500,500 even though my mouse is somewhere else. However, it does not work when the window is inactive.

Am I missing something ? I searched for a while and tried #RequiredAdmin which did nothing more, and _MouseClickPlus from another member which doesn't work at all.

Is there any other way to send a mouse click to an inactive window knowing its handle ?

Share this post


Link to post
Share on other sites
Cotino
15 minutes ago, Trong said:
WinActivate("Untitled - Paint")
MouseClickDrag("left",300,200,400,500)
MouseClickDrag("left",200,300,400,500)

 

This activates the window. I am trying to do the same thing while being on another window.

On most examples I've seen, they leave controlID empty and it works.

 

I tried using _WinAPI_GetDlgCtrlID() to get the controlID. Doesn't work either.

Edited by Cotino

Share this post


Link to post
Share on other sites
HuaAi

Found the same problem, had to activate the window before using ControlClick().

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

×