Hello All,
I use iWeb to locate and click buttons on a web page. This works great. Now I have a windows application (no idea what code it was written in, etc) which I need to interact with. It's a simple windows with some buttons in it.
If the window is name TEST WINDOW, would it be possible to WinActivate the window, and have AHK find and click a button in the window?
Let's say the button is named "Info". Or is this simply not possible?
Coordinates are something I was using before with mouseclicks but that is too unreliable.
Thank you.
![](https://secure.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e?s=100&d=%2F%2Fwww.autohotkey.com%2Fboard%2Fpublic%2Fstyle_images%2Fortem%2Fprofile%2Fdefault_large.png)
Locating/Clicking buttons in a Windows Application
Started by
RaccoonDog
, May 06 2011 01:39 AM
4 replies to this topic
#1
-
Posted 06 May 2011 - 01:39 AM
![Locating/Clicking buttons in a Windows Application: post #1](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
You need ControlClick. Use window spy to find the ClassNN of the button.
If you want, my window control tools can help. Specifically controlclickstalk.
[/shameless plug]
If you want, my window control tools can help. Specifically controlclickstalk.
[/shameless plug]
![;)](http://www.autohotkey.com/board/public/style_emoticons/default/wink.png)
#2
-
Posted 06 May 2011 - 01:56 AM
![Locating/Clicking buttons in a Windows Application: post #2](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
Open "Windows Spy" in the AHk folder, and inspect the button(s)
post the contents of Window Spy.
You need the AHK_class of the window and the ClassNN of the control(s)
post the contents of Window Spy.
You need the AHK_class of the window and the ClassNN of the control(s)
#3
-
Posted 06 May 2011 - 01:57 AM
![Locating/Clicking buttons in a Windows Application: post #3](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
Ok I thought I needed to used WindowSpy, when I spy it... I get this:
The button I would be attempting to click is "Log Off"
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<< Citrix Connection Center ahk_class #32770 >>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<< On Screen: 213, 246 (less often used) In Active Window: -299, 33 >>>>>>>>>( Now Under Mouse Cursor )<<<<<<<< Color: 0xF0F0F0 (Blue=F0 Green=F0 Red=F0) >>>>>>>>>>( Active Window Position )<<<<<<<<<< left: 512 top: 213 width: 416 height: 444 >>>>>>>>>>>( Status Bar Text )<<<<<<<<<< >>>>>>>>>>>( Visible Window Text )<<<<<<<<<<< &OK &Disconnect &Full Screen &Properties &Log Off File &Security &Audio Security PDA S&ecurity S&canner Security &Terminate &Help ICA connections Tree1 1 Server used, 1 Remote Applications Server Application >>>>>>>>>>>( Hidden Window Text )<<<<<<<<<<< >>>>( TitleMatchMode=slow Visible Text )<<<< >>>>( TitleMatchMode=slow Hidden Text )<<<<
The button I would be attempting to click is "Log Off"
#4
-
Posted 06 May 2011 - 02:30 AM
![Locating/Clicking buttons in a Windows Application: post #4](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)
Looks to me like you can just send alt+l and be done.
Otherwise, run my controlclickstalk, click the button, and post the reults.
Otherwise, run my controlclickstalk, click the button, and post the reults.
#5
-
Posted 06 May 2011 - 03:35 AM
![Locating/Clicking buttons in a Windows Application: post #5](http://www.autohotkey.com/board/public/style_images/ortem/icon_share.png)