Jump to content

toolbar auto3lib


erggre
 Share

Recommended Posts

Hi,

I'm trying to access a toolbar with the id 12345 (example). This toolbar shows 3 instance when looking in the

Window Info. When using _Toolbar_* functions, is there a way to specify wich instances I want to call my function on?

For example, I want to know how many button there is in my toolbar instance 2.

Thanks

Link to comment
Share on other sites

Hi,

I'm trying to access a toolbar with the id 12345 (example). This toolbar shows 3 instance when looking in the

Window Info. When using _Toolbar_* functions, is there a way to specify wich instances I want to call my function on?

For example, I want to know how many button there is in my toolbar instance 2.

Thanks

To specify a control by instance, read the help file under "Controls" for the special format, i.e. "[CLASS:Edit; INSTANCE:1]".

However, integer control ID numbers only apply to AutoIt-created controls, and there is no way to get two controls with the same ID in the same GUI. So you need to be more clear about what you mean by "the id 12345", which is also not a valid CLASSNN type ID.

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

To specify a control by instance, read the help file under "Controls" for the special format, i.e. "[CLASS:Edit; INSTANCE:1]".

However, integer control ID numbers only apply to AutoIt-created controls, and there is no way to get two controls with the same ID in the same GUI. So you need to be more clear about what you mean by "the id 12345", which is also not a valid CLASSNN type ID.

:P

Let`s say I have a window with a title WindowTitle.

When I check with the Window Info tool, I can see that my toolbar control

Has the control id (52326).

I get the handle on this control by doing this:

$CtrlHandle = ControlGetHandle(WindowTitle,,52326)

I now have the handle to my toolbar, wich contains 3 instance.

My goal is to check if a specific button from instance 2 is enabled or not and

Perform a click on it if the button is enabled.

The functions Im using right now are the _Toolbar_* series, but when I do something like _Toolbar_ButtonCount($CtrlHandle), it seems to consider only one of the three instances.

Thanks!

Link to comment
Share on other sites

Let`s say I have a window with a title “WindowTitle”.

When I check with the Window Info tool, I can see that my toolbar control

Has the control id (52326).

I get the handle on this control by doing this:

$CtrlHandle = ControlGetHandle(“WindowTitle”,””,52326)

I now have the handle to my toolbar, wich contains 3 instance.

My goal is to check if a specific button from instance 2 is enabled or not and

Perform a click on it if the button is “enabled”.

The functions I’m using right now are the _Toolbar_* series, but when I do something like _Toolbar_ButtonCount($CtrlHandle), it seems to consider only one of the three instances.

Thanks!

That's the part I don't understand. What does this mean: "I now have the handle to my toolbar, wich contains 3 instance"? Instances of what?

Post a screen shot or two of the Au3Info window you get looking at this.

:P

P.S. ...and maybe a screen shot of the toolbar itself, too.

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

That's the part I don't understand. What does this mean: "I now have the handle to my toolbar, wich contains 3 instance"? Instances of what?

Post a screen shot or two of the Au3Info window you get looking at this.

:P

P.S. ...and maybe a screen shot of the toolbar itself, too.

Ok, I will post screenshots tonight.

When I look window info with my mouse on the toolbar, I see an "instance" number change from 1 to 2 to 3 when I move my mouse up and down on different button of the toolbar. The controlID remain unchanged. The toolbar have 3 series of buttons (wich I thought was the "instances". The series of button are on three different line in the toolbar.

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...