dubby Posted November 5, 2004 Share Posted November 5, 2004 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 More sharing options...
dubby Posted November 5, 2004 Author Share Posted November 5, 2004 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 More sharing options...
this-is-me Posted November 5, 2004 Share Posted November 5, 2004 Nearly every button that is not drawn with a different view is capable of accepting focus, and then some more. Who else would I be? Link to comment Share on other sites More sharing options...
dubby Posted November 5, 2004 Author Share Posted November 5, 2004 I guess all I can do is cross my fingers and try it when I get home. Thanks to both of you. (of course I'll be back for additional help later if it still doesn't work ) Link to comment Share on other sites More sharing options...
bigred Posted November 5, 2004 Share Posted November 5, 2004 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 More sharing options...
dubby Posted November 6, 2004 Author Share Posted November 6, 2004 Thanks for the additional help. Gives me more to work with when I get home. Link to comment Share on other sites More sharing options...
dubby Posted November 6, 2004 Author Share Posted November 6, 2004 Thanks bigred... that made it work! 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