Ro0iTz Posted April 24, 2014 Share Posted April 24, 2014 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 Link to comment Share on other sites More sharing options...
dmob Posted April 25, 2014 Share Posted April 25, 2014 You have a null/blank ("") in place of ControlID? Consult help file for correct parameters or try finding control id using AutoIt Window Info... Link to comment Share on other sites More sharing options...
Malkey Posted April 25, 2014 Share Posted April 25, 2014 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. Link to comment Share on other sites More sharing options...
TrickyDeath Posted May 7, 2014 Share Posted May 7, 2014 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) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now