Y
Y
Yodass2021-08-12 23:54:29
Windows
Yodass, 2021-08-12 23:54:29

How to get the serial number of the application in the taskbar (win 10)?

Good day)
So, I'm a fan of automating everything and everyone. I create my own hotkeys.
A different number of applications are constantly open in the taskbar.
I want to attach a hotkey to an application that is currently in the taskbar to the right of, for example, chrome.exe. To do this, I need to get the serial number of chrome.exe in the taskbar, counting from the left.
in this case:
1) several tabs of one application are also considered
2) it does not matter whether the application is open or closed. is in the taskbar - it means it is considered.

A separate question - on what to implement. Any ideas on this could help a lot. From simple - PowerShell or AutoHotKey. Maybe ElectronJS/C/C++/C# or something like that. If I am familiar with the first two (ps & ahk), then I am not particularly familiar with the latter.

You also need to somehow transfer information to the ahk script. I know that he can read files and pull something from dll. But I'll figure it out myself, if only there was a way to get it (probably through output to a file or to the console).
It is desirable that you do not have to cut the whole application, write configs, compile, etc.

Perhaps it makes sense to "hardcore" to make an exe's, which will have the functionality of getting the ordinal number of the command line tab by name + the functionality of the hotkeys themselves.

PS: Links with useful information are welcome)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2021-08-13
@gbg

In general, a very strange idea, because running applications are searched by the name of the window / process, and not by the number on the taskbar.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question