ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Advice needed on AHK script

<< < (3/8) > >>

4wd:
Seems to me that you'd be better off with a program that terminates a process and removes
any tray icon left by the terminated program, then you'd only need three lines in your batch file.

Or a task killer that sends a proper program exit command so the program can shut itself down cleanly.

pilgrim:
Just tried the new version of CleanTray, it removed all 4 icons instantly, it left 4 empty spaces at the right hand end of the tray (with the Task Manager NOT running), it rearranged the icons. Basically it's doing the same as the previous version.

It would appear to be true that it is the taskkill command that is causing the icons to be left behind but I could not find anything else that would shut all 3 (XP) or 4 (7) programs down and remove the icons at the same time.

The program I put together from the script I found works, as I said above the way I put it together may not be very elegant but what surprised me was that I finished up with a 2kb script while the other 2 scripts I found at the same time are both 8kb.
Not only does it work but it has no unwanted side effects like leaving empty spaces or rearranging icons, anything else we came up with might be more elegant but it would not do a better job.

I think I'll leave this one as is and try to sort out the few other's I am working on. :)

4wd:
Just tried the new version of CleanTray, it removed all 4 icons instantly, it left 4 empty spaces at the right hand end of the tray (with the Task Manager NOT running), it rearranged the icons. Basically it's doing the same as the previous version.-pilgrim (May 08, 2013, 05:24 AM)
--- End quote ---

And that's running it as:

CleanTray.exe 5

(or at least some number from 1 to 100) ?

The fact you said instantly kind of indicates that you didn't specify an argument, otherwise you'd be able to watch the mouse move around, ie. it's not instant.

pilgrim:
That deserves my apologies, my amazement and my amusement.

The apology: I am trying to keep up with too many things at once and because I downloaded the file on a different computer I completely forgot about the argument requirement and never reread your post.  :-[  :-[

The amazement: That works incredibly smoothly, I set it to 5 as you suggested but if I use it instead of what I am using, which I suspect I will, I will probably lower it. :Thmbsup:

The amusement: I actually found it quite funny watching the cursor moving about. When I get the time I think I'll set it to 100 and let it have a longer run. :D


EDIT: I never found out till some time later but it is still rearranging icons. The icons that it is removing reopen in the same order/places but programs that were not running at the time are putting their icons in different to usual places when they are opened. Sorry.

4wd:
I've given up - your system is just plain weird.  :D

However, a little something for you to try just for the fun of it:

In theory, no left over icons because the programs are cleanly shut down.

I've only tested with those 3 programs so who knows what else can happen.

BTW, why do you run a separate time service?

You could just run w32tm /resync if you want to synchronise your system clock - one less program to kill badly :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version