jorgb 0 Posted April 28, 2005 Hi Guys!We are currently reviewing AutoIt as scripting language for our baseline tests (and I hope we can use it, because man we are fed up with those brainless actions ;-)Anyway, I encountered my first obstacle and hope someone can help;When I open the settings window, we have a TOvcLookOutBar in Delphi which is a kind of icon list it looks like the old outlook style menu where you could select the pictograms to enter certain areas. But .. that control does not accept key strokes! I was wondering if I could get a click of the mouse at a certain position, relative to the TOvcLookOutBar window. When I use the window finder the only position / size I see is of the main window. The dump of window finder looks like;>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: SettingsClass: TfmOverallSetupSize: X: 319 Y: 227 W: 641 H: 517>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 403 Y: 283Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0x808080 Dec: 8421504>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size: X: 0 Y: 0 W: 105 H: 434Control ID: 395080ClassNameNN: TOvcLookOutBar1Text: >>>>>>>>>>> Status Bar Text <<<<<<<<<<<So, how can I simulate a click in such a control ? The picture of it is here;The problem I also have is that the stupid window ID's in Delphi are auto generated and change in due time. If someone has a work around for this I will be grateful ..So, how can I determine the offset of such an icon as Window Finder does not see them as extra text, and how can I simulate a mouse press on the icon ??Thanks in advance,- Jorgen Share this post Link to post Share on other sites
jason7237 0 Posted April 28, 2005 Check the help file. There's a ControlClick that you can use on the actual ControlID. That should give you what you want. jason7237 Share this post Link to post Share on other sites
jason7237 0 Posted April 28, 2005 Actually, it would look like this: >>>ControlClick ( "title", "text", controlID [, button] [, clicks]] )<<< ControlClick ( "Settings", "", 395080 or "TOvcLookOutBar1") jason7237 Share this post Link to post Share on other sites
jorgb 0 Posted April 28, 2005 (edited) Hi thanks for your reply, I didn't knew you could also add the class name there (as Delphi keeps changing the ID's of the control at runtime, I really hate Delphi for doing that)I will have to study this further. - Jorgen Edited April 28, 2005 by jorgb Share this post Link to post Share on other sites