Jump to content

Control Click on Buttons situated on a TToolBar


KubaP
 Share

Recommended Posts

I have a problem – I cannot click on a button which is situated on a toolbar. Normally I use function like ControlClick but one of the parameter is on which the AutoIt should click – I know that button situated on TToolBar1 is named TToolButton1 but I know that because I have codes of program. AutoIt Window Info. see only the TToolBar1 – do not see any of TToolButtons situated on that TToolBar.

So how can I click on a TToolButton? (Off course I do not wont to use MouseClick – because the position of controls can change in time).

Edited by KubaP
Link to comment
Share on other sites

I have a problem I cannot click on a button which is situated on a toolbar. Normally I use function like ControlClick but one of the parameter is on which the AutoIt should click I now that button situated on TToolBar1 is named TToolButton1 but I know that because I have codes of program. AutoIt Window Info. see only the TToolBar1 do not see any of TToolButtons situated on that TToolBar.

So how can I click on a TToolButton? (Off course I do not wont to use MouseClick because the position of controls can change in time).

Try ControlClick ("TITLE","","[CLASSNN:TToolButton1]")

Change TITLE with your application title.

When the words fail... music speaks.

Link to comment
Share on other sites

Have you checked out the AutoIt Window tool? It is a tool the makes automation much easier. You will find it by looking in "Start -> All Programs -> AutoIt" or pressing Ctrl + F6 in SciTe.

Cheers,

Brett

Link to comment
Share on other sites

Try ControlClick ("TITLE","","[CLASSNN:TToolButton1]")

Change TITLE with your application title.

Unfortunately it did not work ;)

I think that function ControlClick does not see that Button - AutoIt Window Info does not.

Pleas help me - I have been thinking about the solution for a long time and have no other ideas.

Link to comment
Share on other sites

Have you checked out the AutoIt Window tool? It is a tool the makes automation much easier. You will find it by looking in "Start -> All Programs -> AutoIt" or pressing Ctrl + F6 in SciTe.

Cheers,

Brett

In my version of SciTe (Version 1.76) I have "AutoIt Window Info" so I think it is = "AutoIt Window tool".

Of course if you think that your version is better please tell me so - I will change on AutoIt window Tool.

Edited by KubaP
Link to comment
Share on other sites

From what I know, AutoIT can only control STANDARD windows controls. A TToolbar sound like it is a Delphi control and as such may not be a standard windows control.

Anyone care to comment?

Yes, it is Delphi control.

So I will not be able to control it by any function in AutoIt?

Link to comment
Share on other sites

I have some experience with delphi toolbars and generally I use a x,y location within the toolbar. Sometime ago I noticed that the autoit info window however did show the text of the button, save for example. This would imply that "[TEXT:Save]" should work. I didn't have time to test it.

If you'll try, please let me know if it works

In the beginning there was nothing and then even that exploded - anonymous

Link to comment
Share on other sites

I have some experience with delphi toolbars and generally I use a x,y location within the toolbar. Sometime ago I noticed that the autoit info window however did show the text of the button, save for example. This would imply that "[TEXT:Save]" should work. I didn't have time to test it.

If you'll try, please let me know if it works

Hmm,

I do not have any text on a ToolButtons

When I use AutoIT Windows Info. I see something like in appendix named AutoITWindowInfo.JPG.

post-39730-1220272195_thumb.jpg

Edited by KubaP
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...