Replacing the tray icon of an application

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
william_ahk
Posts: 499
Joined: 03 Dec 2018, 20:02

Replacing the tray icon of an application

08 Jan 2021, 07:32

Is it possible to replace the tray icon of applications other than the script itself? I tried Tray.ahk by majkinetor but couldn't seem to get it working. It seems that I couldn't get the icon handle of the target program. Please help.

Code: Select all

#include Tray.ahk

F1::
DetectHiddenWindows, On
WinGet, hwnd, ID, ahk_exe ShareX.exe
hico := Tray_Define("ahk_id " hwnd, "o")
Tray_Modify(hwnd, hico, "shell32.dll:1")
msgbox % "hwnd: " hwnd "`nhico: " hico
return
References:
Tray.ahk forum post
Tray.ahk source code
Tray.ahk docs

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Stinkfoot9 and 131 guests