Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

close system tray application



  • Please log in to reply
5 replies to this topic
rosto
  • Members
  • 130 posts
  • Last active: Jan 06 2016 01:50 PM
  • Joined: 14 Feb 2006
I would like to close a program which is in the system tray.

if .... {
close "program in system tray"
close autohotkey script.exe
}

It is not difficult to close open windows but how to close a program when it is only in the system tray?

Veovis
  • Members
  • 389 posts
  • Last active: Mar 17 2009 12:24 AM
  • Joined: 13 Feb 2006
i suppose you could have it look for hidden windows, or just kill the process. im not an expert though...
Posted Image
"Power can be given overnight, but responsibility must be taught. Long years go into its making."

rosto
  • Members
  • 130 posts
  • Last active: Jan 06 2016 01:50 PM
  • Joined: 14 Feb 2006
thank you.

do you know how to active a command clicking on a button
with no ahk_class command.

Peter
  • Members
  • 448 posts
  • Last active: Jan 15 2010 05:41 AM
  • Joined: 30 Dec 2005
As Veovis mentioned:
-If the program has a window, you can use "DetectHiddenWindows". Then you can do the same as for visible windows.
-You can always use "Process, close".

And the script itselfs can be closed with "ExitApp".

rosto
  • Members
  • 130 posts
  • Last active: Jan 06 2016 01:50 PM
  • Joined: 14 Feb 2006
I've found a solution:

WinShow ahk_class CLASSNAME
If WinExist("ahk_class CLASSNAME")
WinClose

Just one thing I need to use my script:
do you know how to active a command clicking on a button
with no ahk_class command?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
✓  Best Answer
Shimanov's approach in the following topic might be useful:
http://www.autohotke...opic.php?t=5825

There are also some other posts on the forum about this. You could try a keyword search on things like: tray and icon and click