HotKeyIt
Joined: 18 Jun 2008 Posts: 2197 Location: GERMANY
|
Posted: Tue Oct 21, 2008 11:02 pm Post subject: RefreshTray() |
|
|
Remove icons from Tray menu for crashed or terminated scripts\apps.
There was a script that refreshed the tray by moving the mouse over the tray but I cannot find it anymore.
Anyway I have found a solution on web in c++ and did the same in ahk. Sorry if this has been already posted.
So when your script crashes and you call this function try icon will be removed.
It sends mouse movement over the icons trough PostMessage.
| Code: | RefreshTray(){
ControlGetPos,,,w,h,ToolbarWindow321, AHK_class Shell_TrayWnd
width:=w, hight:=h
While % ((h:=h-5)>0 and w:=width){
While % ((w:=w-5)>0){
PostMessage, 0x200,0,% ((hight-h) >> 16)+width-w,ToolbarWindow321, AHK_class Shell_TrayWnd
}
}
} |
Last edited by HotKeyIt on Mon Jul 06, 2009 7:38 pm; edited 2 times in total |
|