Creating a Batch File to open a tray Icon (i.g. Discord)

1

1

I have a Corsair M65 Pro FPS Gaming Mouse and I want to macro opening the Discord tray icon to my mouse. Why the tray icon of discord? When you press the tray icon for discord in Windows, it doesn't create a new instance of the application. Discord only minimizes to the tray, rather than the taskbar. I have discord already pinned to my taskbar, and if I want to maximize discord by the taskbar (or icon on desktop), it creates a new instance, which takes a couple of seconds to load. I want to switch the window open just by the press of my macro key on my mouse. I already have a similar macro to my mouse that is linked to a batch file that validates with steam and opens CSGO. The code for that batch file is below.

Start ""  "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo.exe" -steam

Is there a way how I can apply a similar line of batch code to a tray icon? Is there a directory where the tray applications are stored? Like below:

C:\Users\Noah\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar

Is there something I can do with a batch file and a process in task manager?

Let me know what you think. I really appreciate thoughts and ideas. Please be nice.

Noah

Posted 2017-05-17T23:44:16.383

Reputation: 183

Icons in the tray are not the same thing as icons in the taskbar or start menu. Tray icons indicate running programs. Icons in the taskbar or start menu are only shortcuts to start a program. There is no directory storing the icons in the tray. What you want to do is set focus or bring Discord to the front. – music2myear – 2017-05-17T23:55:34.260

any suggestions my dude on bringing discord to the front? thanks – Noah – 2017-05-18T00:04:16.107

Answers

1

Take a look at using AutoHotKey to assign a macro to the mouse button and in the macro script, use this function to switch windows to the Discord window.

AutoHotKey Activate Window

lgflorentino

Posted 2017-05-17T23:44:16.383

Reputation: 38