Jump to content

ControlClick Trouble


dubby
 Share

Recommended Posts

Hello all, just found AutoitX3 and this forum yesterday.

So far everything has worked great with one exception. Using ControlClick to click a button on an external application works very well on a Win98se machine but doesn't do anything on a WinXP Pro machine. As an alternative I used MouseClick which works fine on both machines. This is not a good permanent solution for me because the application will be minimised to the tray most of the time which will prevent it fom being clicked by the mouse.

This is the line that only works on the Win98 machine:

iResponse = AIX.ControlClick("Swift Elite", "", "SwiftButton14")

This is the line that works fine on both machines:

iResonse = AIX.MouseClick("left", 873, 600)

I searched the forum and couldn't find anything helpful. Has this come up for anyone else? Any suggestions?

Link to comment
Share on other sites

sometimes you may need to ControlFocus the control first...

LAr.

<{POST_SNAPBACK}>

You know, that's not a bad idea. Not really sure why setting the focus isn't necessary in Win98 but if it makes it work in XP Pro I really don't care. One thing that stopped me from trying that already was that I didn't think this button was the type that could receive the focus. It just didn't 'seem' like it would and besides, the code worked in Win98.

Are most buttons capable of accepting the focus?

Link to comment
Share on other sites

Im not sure why you are having problem with ControlClick. I use it in a VB app that Im writing. For me I needed a way to click the buttons on an external app that was minimized to the taskbar. Control Click worked perfectly for me under XP.

I use it like this:

aix.ControlClick "handle=" & sWindowHandle, "", "Button10"

With the "Window Titles and Text" mode 4.

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...