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