Jump to content
Sign in to follow this  


Recommended Posts

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: Settings

Class: TfmOverallSetup

Size: X: 319    Y: 227    W: 641    H: 517

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 403 Y: 283

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0x808080 Dec: 8421504

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size:  X: 0    Y: 0    W: 105    H: 434

Control ID: 395080

ClassNameNN: TOvcLookOutBar1


>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

So, how can I simulate a click in such a control ? The picture of it is here;

Posted Image

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

Actually, it would look like this:

>>>ControlClick ( "title", "text", controlID [, button] [, clicks]] )<<<

ControlClick ( "Settings", "", 395080 or "TOvcLookOutBar1")


Share this post

Link to post
Share on other sites

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 by jorgb

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...