rejectpenguin Posted August 17, 2007 Posted August 17, 2007 Ok, so I usually send clicks to a minimized window with _MouseClickPlus() user function but recently it hasn't been working for me (dunno why). So I have been reading about ControlClick(). But the window I'm trying to send a click to doesn't have a control id. So I was wondering is it possible to send a ControlClick() with coordinates instead of the control id?
Moderators SmOke_N Posted August 17, 2007 Moderators Posted August 17, 2007 Ok, so I usually send clicks to a minimized window with _MouseClickPlus() user function but recently it hasn't been working for me (dunno why).So I have been reading about ControlClick(). But the window I'm trying to send a click to doesn't have a control id. So I was wondering is it possible to send a ControlClick() with coordinates instead of the control id?Have you tried possibly leaving the Control ID field blank ""? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
rejectpenguin Posted August 18, 2007 Author Posted August 18, 2007 Have you tried possibly leaving the Control ID field blank ""?But where would I put the coordinates?
herewasplato Posted August 18, 2007 Posted August 18, 2007 But where would I put the coordinates?ControlClick("title", "", "", "left, 1, x , y) [size="1"][font="Arial"].[u].[/u][/font][/size]
rejectpenguin Posted August 18, 2007 Author Posted August 18, 2007 (edited) ControlClick("title", "", "", "left, 1, x , y) When I try that it tells me I have too many parameters. ControlClick("untitled - Paint", "", "", "left", 1, 500 , 300) Edited August 18, 2007 by rejectpenguin
Moderators SmOke_N Posted August 18, 2007 Moderators Posted August 18, 2007 When I try that it tells me I have too many parameters. ControlClick("untitled - Paint", "", "", "left", 1, 500 , 300)What version of autoit are you using? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
rejectpenguin Posted August 18, 2007 Author Posted August 18, 2007 (edited) What version of autoit are you using? Ahh ok.. I installed the latest version and it runs but for some reason it doesn't click in paint. I do have multiple moniters, I dunno if that would affect it? Opt("MouseCoordMode", 0) sleep(5000) ControlClick("untitled - Paint", "", "", "left", 1, 500 , 300) Edited August 18, 2007 by rejectpenguin
Moderators SmOke_N Posted August 18, 2007 Moderators Posted August 18, 2007 Ahh ok.. I installed the latest version and it runs but for some reason it doesn't click in paint. I do have multiple moniters, I dunno if that would affect it? Opt("MouseCoordMode", 0) sleep(5000) ControlClick("untitled - Paint", "", "", "left", 1, 500 , 300)How do you know it's not clicking in Paint? I ask this, because you left the control param blank, if I remember correctly, paint does have control id's/classnamenn's Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
rejectpenguin Posted August 18, 2007 Author Posted August 18, 2007 How do you know it's not clicking in Paint?I ask this, because you left the control param blank, if I remember correctly, paint does have control id's/classnamenn'sIm just using paint as a test to make sure the clicking works. But it doesn't work in paint nor does it work in any other window.
herewasplato Posted August 18, 2007 Posted August 18, 2007 Im just using paint as a test to make sure the clicking works. But it doesn't work in paint nor does it work in any other window.I see nothing in the help file that indicates that ControlClick will work on a window that is minimized. In fact, the opposite seems to be true for some controls:Some controls will resist clicking unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlClick().Also, don't forget to use the ControlClick coordinates listed in the tab labeled "Control" within the AutoIt Window Info tool and not the ones in the "Mouse" tab. -MSP- [size="1"][font="Arial"].[u].[/u][/font][/size]
Caleb Posted November 5, 2007 Posted November 5, 2007 I see nothing in the help file that indicates that ControlClick will work on a window that is minimized. In fact, the opposite seems to be true for some controls:Some controls will resist clicking unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlClick().Also, don't forget to use the ControlClick coordinates listed in the tab labeled "Control" within the AutoIt Window Info tool and not the ones in the "Mouse" tab. -MSP-Is there a way to get the control coordinates for Diablo II? When I mouse over my Diablo II window, it doesn't say anything at all in the Control tab.
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