Jump to content

MouseClick when GUI elements are different? (XP vs 2000)


Recommended Posts

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:

Posted Image

But it fails in Windows XP because the client area has the same size but the GUI elements aren't in the same position:

Posted Image

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

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

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 list

Other 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

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 list

Other 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

I 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...