ControlClick on Toolstrip / Toolbar with multiple buttons (same ClassNN)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
labrint
Posts: 379
Joined: 14 Jun 2017, 05:06
Location: Malta

ControlClick on Toolstrip / Toolbar with multiple buttons (same ClassNN)

17 Aug 2018, 02:17

Hi Guys,

I need to be able to click on individual buttons on the toolstrip attached in the image. I have uploaded the result of the ACC viewer to help you find a solution.

John
Attachments
ToolBar.png
ToolBar.png (162.45 KiB) Viewed 2042 times
User avatar
labrint
Posts: 379
Joined: 14 Jun 2017, 05:06
Location: Malta

Re: ControlClick on Toolstrip / Toolbar with multiple buttons (same ClassNN)

22 Aug 2018, 03:38

They all have the same ClassNN! I need to use some form of index, but I dont know how. I've looked into ControlClick and SendMessage but got nowhere.
SlipperyGrams
Posts: 2
Joined: 02 Apr 2017, 08:59

Re: ControlClick on Toolstrip / Toolbar with multiple buttons (same ClassNN)

20 Sep 2018, 08:01

I'm facing the same challenge. Has anyone figured something out meantime?

Regards
just me
Posts: 9449
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: ControlClick on Toolstrip / Toolbar with multiple buttons (same ClassNN)

18 Jan 2021, 10:26

@labrint, if it is a kind of toolbar control responding to toolbar messages this (german) thread might help you.
User avatar
labrint
Posts: 379
Joined: 14 Jun 2017, 05:06
Location: Malta

Re: ControlClick on Toolstrip / Toolbar with multiple buttons (same ClassNN)

02 Mar 2022, 02:25

I'm adding this link as a continuation of this thread, as @rommmcek answered my question there.

viewtopic.php?p=448883#p448883

This covers the tooltip.

What remains is:

a) Systreeview32 (tree) (how to click and open individual nodes, and get their text or text of their child

b) Tables (how to click on Top left cell to highlight all cells)
User avatar
rommmcek
Posts: 1473
Joined: 15 Aug 2014, 15:18

Re: ControlClick on Toolstrip / Toolbar with multiple buttons (same ClassNN)

15 Mar 2022, 14:50

Hi!

For SysTreeView32 works analogous to Buttons on ToolStrip (tested on Ahk Gui TreeView).
Where Object is retrieved from SysTreeView32 (the frame of the AccViewer must encompass the whole Tree).
And ChildId is retrieved from each Tree branch.
Acc.accDoDefaultAction(ChildId) will then click on given branch expanding/shrinking subbranches.
Acc.accName(ChildId) will yield the name.

For Tables (if you mean SpreadSheets) DoDefaultAction() does nothing. It would be possible to retrieve position of the Sheet and then use Click command, however App should be Active or at list visible...
So I would recommend you ComObj as more suitable for the job!

bye!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 168 guests