Something I noticed yesterday which has probably been going on all the time is that my Windows 7 PC and my Netbook (XP) both have programs that produce pop-ups when you hold the cursor over the tray icons, on 7 it is USB Safely Remove, on XP it is Battery Monitor, when I run any of the tray cleaning programs the pop-ups appear.
Although I know it's not you usual program of choice I am wondering if it is possible to prevent the pop-ups appearing when using the AHK script?
OK, at this point you should de-fiddle your system because those things don't appear unless the mouse has been over the target icon for at least 400ms by default, so this implies you've dropped the delay to almost, (if not), 0.
I've set mine to 30ms and they don't appear, CleanTray moves the mouse at the fastest speed AutoIt can which takes less than 10ms to traverse an area the width of your SysTray three times. With the /debug switch it takes ~1.5 seconds to do it.
Add to the fact that to remove 4 icons it will do a total of 5 cycles, that's 15 runs in total over that area in less than a second.
Your icons are about 24x24 pixels by the looks, (tray height of 28), a total of about 26 icons: 630 pixels in ~3ms / 26 = ~0.11ms per icon.
Even with the /debug switch it's ~20ms per icon.
I set my taskbar the same, (as close as possible), a single row at the bottom with about 28 notification icons, and 4-6 orphaned at the left - in every case CleanTray worked no matter where the taskbar was located, (top, bottom, left, right), or whether it's hidden or not, (provided the icon had no background process).
I am attaching the tray cleaning program .....
Doesn't do a thing here, exits immediately.Addendum:
Since you said Terminator worked for both D4 and NAI I've been playing with it a bit more and you can try this version out.
Terminator: Terminate a program that has a SysTray icon
Terminate.exe [/mess] [/context [/test]] [/kill] [/blitz] [/list] <process>
Where: /mess - sends a WM_CLOSE message to programs window
/context - opens the programs SysTray context menu and chooses
the last entry (usually Exit/Quit)
/kill - kill the process and then remove the SysTray
/blitz - tries everything
/list - list processes with SysTray icons
/test - opens the icon context menu and selects the
last item but doesn't activate it
(only valid with /context switch)
The switches can be abbreviated to the first character, ie. /l, /t, /m, /c, /k
If you put multiple methods on the command line it'll only do one in this order: message, context menu and finally kill.
eg. Terminator.exe /kill /context peerblock.exe
will use the context menu to try and close peerblock.exeNOTES:
- Only works with programs that have a SysTray icon
- Only works with programs that don't open a modal requester, (currently), ie. "Are you sure?"
- Not sure if it will work for the hidden icon area in Vista+
So in your case you could try:
terminator.exe /m d4.exe
terminator.exe /m networkindicator.exe
terminator.exe /c peerblock.exe
terminator.exe /c sbiectrl.exe
It doesn't do anything that's OS unfriendly, (/k does the same thing as taskkill), tested it here on Win7 on various tray dwelling programs, (but only for D4, NAI and PeerBlock in your specific case), and it seemed to work OK - system didn't crash, all my drives still seem to be full of junk.
I'm sure one of the other programmers here could come up with something a lot nicer
- Tries sending WM_CLOSE 5 times at 5ms intervals, (the Pilgrim factor)
- Added /blitz option
Source added to archive 20130523