Manel Rodero Posted January 13, 2006 Share Posted January 13, 2006 Hello,I'm trying to automate an installation of cygwin using auto-it. I've created an script that works pretty well under Windows 2000 but it fails under Windows XP.I've investigated the problem and I've found that the problem is that the coordinates where I need to click are different in 2000 than in XP.I'm using the following code:[...] WinWait ( 'Cygwin Setup - Select Packages' ) WinActivate ( 'Select Packages' ) Opt("MouseCoordMode", 2) ;1=absolute screen, 0=relative active window, 2=relative client area MouseClick( "left", 56, 108 ) [...]It works very well in Windows 2000 where the client area is like this one:But it fails in Windows XP because the client area has the same size but the GUI elements aren't in the same position:Is there any commands to click in the coordinates I want. I suppose that this element is a GUI control but I don't know how to send a click to it. If you want to test 'setup.exe' you can get it from http://www.cygwin.com/setup.exe.Thank you very much! Link to comment Share on other sites More sharing options...
BigDod Posted January 13, 2006 Share Posted January 13, 2006 Welcome to the forum. Instead of using MouseClick you could use AutoIt Window Info tool to get information about the control you wish to click on and then use ControlClick. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Manel Rodero Posted January 13, 2006 Author Share Posted January 13, 2006 Hello,I've used Info tool to obtain information about the control. I need to click in the little icon arrow in the firs item of the list. This will change the option from Default to install all packages in Cygwin.But, I can't obtain the information about this object.To see information about the list I need to have the mouse cursor near its border like in this figure:Info about the listOther attempts doesn't point to me to a correct GUI element to use with ControlClick:Info about the little arrow?Why button in a white area?Please, can an Auto-It expert execute the setup.exe for cygwin (don't worry it will not install anything until you click the 'next' button) and see if it is possible to automate the click in this little arrow in the list?Thank you very much!PS: Cygwin setup is in http://www.cygwin.com/setup.exe Link to comment Share on other sites More sharing options...
BigDod Posted January 13, 2006 Share Posted January 13, 2006 Hello,I've used Info tool to obtain information about the control. I need to click in the little icon arrow in the firs item of the list. This will change the option from Default to install all packages in Cygwin.But, I can't obtain the information about this object.To see information about the list I need to have the mouse cursor near its border like in this figure:Info about the listOther attempts doesn't point to me to a correct GUI element to use with ControlClick:Info about the little arrow?Why button in a white area?Please, can an Auto-It expert execute the setup.exe for cygwin (don't worry it will not install anything until you click the 'next' button) and see if it is possible to automate the click in this little arrow in the list?Thank you very much!PS: Cygwin setup is in http://www.cygwin.com/setup.exeI have been playing with this off and on but cant get it to work. One thing I have noticed is that you do not have to click on the little icon but you can click anywhere along the line. I do not know if this helps but as long as Win2000 has the line in the same vertical place as XP then you can go back to using MouseClick. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
herewasplato Posted January 13, 2006 Share Posted January 13, 2006 ...the coordinates where I need to click are different in 2000 than in XP...Try this:If @OSVersion = "WIN_2000" Then MouseClick("left", 56, 108, 1) If @OSVersion = "WIN_XP" Then MouseClick("left", 63, 112, 1) [size="1"][font="Arial"].[u].[/u][/font][/size] 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