Page 1 of 1

Shell_NotifyIcon uID

Posted: 28 Mar 2023, 22:19
by 000
How do i get the uID for any executable? Using spotify as an example

Code: Select all

bytecount := a_ptrsize*2 + 8
notifyicondata := buffer(bytecount)
numput "ptr", bytecount, notifyicondata ; cbsize
numput "uint", winexist("ahk_exe spotify.exe"), notifyicondata, a_ptrsize ; hwnd
numput "uint", 0, notifyicondata, a_ptrsize*2 ; uid
dllcall("shell32\Shell_NotifyIcon", "uint", 2, "ptr", notifyicondata) ; NIM_DELETE