Sign in to follow this  
Followers 0
Ro0iTz

Problem with ControlClick

4 posts in this topic

Hello im trying to send a left click to a minimized window but i could not make it work, the keystroke i use in the same while works correctly.

My code looks like this

AutoItSetOption("WinTitleMatchMode", 4)
$hwnd = WinGetHandle("classname=*******")
If @Error Then
   MsgBox(0, "Sorry the handle could not be found.")
Else
EndIf
While 1 = 1
   ControlSend($hwnd, "", "", "{Q}")
   ControlClick($hwnd, "", "", "Left",1,131,132)
   Wend

Sorry for my english and thanks for the help :D

Share this post


Link to post
Share on other sites



You have a null/blank ("") in place of ControlID? Consult help file for correct parameters or try finding control id using AutoIt Window Info...

Share this post


Link to post
Share on other sites

To minimize a window, the WinSetState function works for me.

An example:-

#include <GUIConstantsEx.au3>

WinSetState ( WinGetTitle("[Class:SciTEWindow]"), "", @SW_MINIMIZE ) ; Where SciTEWindow is the class of the window to be minimized.
;                                                                      Class of the >>>> Window <<<< found by SciTE menu > Tools > AU3Info.
;                                                                      Note square brackets used.

Share this post


Link to post
Share on other sites

Malkey +1

You do not need to send any click on minimalize, since if your window get resize, your coordiantes does not work anymore. Better to use what Malkey posted.

P.S.: check your mouse coordinates. Use it on window coordinate, or windows screen coordinates?


Sry for my bad English, and double sry, but I am learning AutoIT language by myself. :)

[u]Tricky[/u]

You can't teach a man anything, you can only help him, find it within himself. (Galileo Galilei)

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  
Followers 0