Sign in to follow this  
Followers 0
cbc

ControlClick and MouseClick under Windows 7

9 posts in this topic

All:

I've tried everything to automate the installation of a few programs. I have the need to select various options so I'm not after a silent install.

I've tried ControlClick to no avail. I can get a control's handle with ControlGetHandle, so I know that AutoIt is aware of the buttons in the install like Next, etc.

I then turned to MouseClick. Same troubles.

With no luck down those avenues, I turned to some basic testing with this small script:

AutoItSetOption("MouseCoordMode", 1)
MouseMove(60, 20)
MouseDown("right")
MouseUp("right")

I would test various windows by moving them to the upper left of the screen to see if this script could right click the title bar (not over the system icon). Many apps and windows work fine, displaying the standard system menu. But I have found a small number of windows do not...

- Visual Studio 6.0 setup

- A simple installer built with InnoSetup

- A simple installer built with an older copy of InstallShield

- the Palm Quick Install tool

In these cases, the click appears to never happen, and the app does not become active. I've tried making it active before the right click -- no help.

I've combed much of the forums, and checked all the recent and upcoming fixes in the bug base.

I also tried the above simple script against the same InnoSetup-built install program under Windows XP (SP3) -- works perfectly.

I'm using a clean install of Windows 7 Ultimate RC. Was just doing some testing on it for something else -- thought I'd do some testing for even more stuff.

Is this a known issue? Granted I know its early for Windows 7. I guess the AutoIt team is still looking into some of these types of issues for it?

Thanks -- any help appreciated.

(I just discovered AutoIt yesterday -- amazing -- truly excellent is every respect -- going to put it to many uses).

Share this post


Link to post
Share on other sites



Don't be shy. :) Does anyone have any feedback on this? Thanks in advance.

Share this post


Link to post
Share on other sites

Look at mouseclick and controlclick.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

Sir, did you carefully read my message?

I of course have read these multiple times, and tried them. They work as expected perfectly under Windows XP. But they do not work under the RC of Windows 7. I'm trying to determine if this is a known problem, or if these should in fact be working now? Thanks.

C

Share this post


Link to post
Share on other sites

My bad, I was looking at the code.

I would look at some of the MSDN functions the WinAPI functions use. Things like GetDlgCtrlID, WindowFromPoint and other DLL calls do work in 7.

Example - Local $a_wfp = DllCall("user32.dll", "hwnd", "WindowFromPoint", "long", [x pos], "long", [y pos]) will work.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

Hey, what are u using? Win 7 32bit, or 64bit?

I have the same problem with ControlClick...

Has anyone a hint for me how i can get it to work?

Share this post


Link to post
Share on other sites

Hey, what are u using? Win 7 32bit, or 64bit?

I have the same problem with ControlClick...

Has anyone a hint for me how i can get it to work?

I was using Win 7 32bit. I've since killed that installation for other reasons. I'm now going to be trying Win 7 32bit RTM (final) and see what that shows. Will report back when I know more. Thanks.

Share this post


Link to post
Share on other sites

My bad, I was looking at the code.

I would look at some of the MSDN functions the WinAPI functions use. Things like GetDlgCtrlID, WindowFromPoint and other DLL calls do work in 7.

Example - Local $a_wfp = DllCall("user32.dll", "hwnd", "WindowFromPoint", "long", [x pos], "long", [y pos]) will work.

No prob. I will have a look at those, but it seems to me that this is just an issue of the AutoIt staff not yet working with Windows 7. And, I was using a pre-final OS. I'll be trying Win 7 final (32 bit) soon to see what that shows. Will report back.

C

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

As you can expect there are many changes with windows 7. When Windows 7 is used more by the greater community you can expect more support for it.

The WinAPI functions are wrappers for DLL calls so they should be OS independent (mostly). I recommend using them or a DLL call when you can.

Edited by bo8ster

Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

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