View Full Version : Closing programs in tray
Ron
October 13th, 2002, 12:55 PM
If you are trying to close Girder, beta 16 and below didn't allow this. The main Girder window basically ignored the WM_CLOSE message. The final release will again behave and close on a WM_CLOSE.
Target info:
Windowname: *empty*
WindowClass: Girder
Exename : girder.exe
have fun ;-)
oe1k
October 13th, 2002, 12:55 PM
Do you want to close the program manually: Then right-click on the icon in the system tray and select "Exit", "Close", or "Unload" usually.
Or do you mean, "How do you have Girder close a program that is minimized to the system tray?"
(That I'd have to check: you could probably capture a wm_command that the program's Exit command uses.)
-Richard
vynce
October 13th, 2002, 12:55 PM
What will probably work best is to use the close command. Look for "Close" in the drop-down box on the "Window" tab in Girder. Then just set the target to the application that you want to close and make sure that the "Match Invisible Tasks" option is selected.
vynce
October 13th, 2002, 12:55 PM
You are right. I used my method above with Girder 3.1 a while ago to close Girder from the tray. Since the UI and core of Girder have been separated in v3.2 it doesn't seem possible to do it this way anymore (I'm probably just not targeting the right thing). I have tried targeting everything with the word Girder in it, but have not been able to get Girder to close completely. It is easy to close the open UI though.
However, my method above should work for most other programs as long as you can target them correctly.
vynce
October 13th, 2002, 12:55 PM
Make sure that "Match Invisible Tasks" is selected then click the refresh button at the top of the targeting window. It will refresh the list of tasks and there should be a lot more. This list should include everything that is running on your computer. Trouble is often just finding the right one :) For example: if Winamp is open and visible on your screen and you set up a command to close Winamp - you can target the main Winamp window and select "Match Invisible Tasks" then when Winamp is minimized to the system tray the close command that you setup will still work. It is a bit more complicated when you are trying to target a program that has no visible interface.
vynce
October 13th, 2002, 12:55 PM
Yes, that is also what I'm talking about :). I'm sorry if I wasn't clear enough. I minimize Winamp to the system tray (area next to the clock - Microsoft call it the system tray but there seem to be several other names for it). What application are you trying to close from the system tray? If I can install a copy of it then we can both work on this problem more effectively.
vynce
October 13th, 2002, 12:55 PM
ahh, well that explains why we weren't able to close Girder :D
Thanks for clearing that up Ron.
Icthus
October 13th, 2002, 12:55 PM
I tried capturing a right click on one of the icons in my system tray and hitting exit. It captured correctly, but it just kept the coordinates for moving the mouse down there and then a right click and left click on the menu. So, if the icons in your tray are always in the same order, you could do it this way. Otherwise, I'm not sure.
Branton
Icthus
October 13th, 2002, 12:55 PM
Okay. I thought you were just using Girder as a generic example (i.e. you wanted to know how to close ANY program in the system tray, in general).
I just worked through this and got it to work for me. It may not be the best way, but it works.
First make a multigroup and assign the eventstring. Add three commands to the multigroup: Show Girder, Wait 500ms, Alt+F+X
## Run the command line "C:\Program Files\girder32\Girder.exe -show" to
## bring the Girder window up.
Show Girder:
-- Action: O.S. -> Execute
-- File: C:\Program Files\girder32\Girder.exe
------ (wherever you have Girder installed)
-- Step Size: -show
## Wait for the Girder window to load. You may need more time on your
## system.
Wait 500ms:
-- Action: Window -> Wait
-- X/Timeout [ms]: 500
## Send Alt+F+X to execute the Exit command on the File menu.
Alt+F+X:
-- Action: Keyboard
-- Alt: checked
-- Alternative Proc: checked
-- Sentence: FX
-- Target:
------ Executable: GIRDER.EXE
------ Only send to first match (1): checked
------ Match invisible Tasks: checked
If you use the window close action, instead of sending Alt+F+X by keyboard, it will only release Girder to the system tray. It simply closes the window (but not the program).
For the target on Alt+F+X, you could probably just check Send to foreground task, but I like to be safe.
That should do it. Hope this helps.
By the way, why would you want to do this anyway?
Icthus
October 13th, 2002, 12:55 PM
But how do you target windows that are in the tray? None of them show up in the Target window, because there are no actual windows open for them.
Icthus
October 13th, 2002, 12:55 PM
... you can target the main Winamp window and select "Match Invisible Tasks" then when Winamp is minimized to the system tray the close command that you setup will still work.
I think we're talking about different things. I'm talking about the program icons in the bottom right (to the left of the clock). This is where the Girder remote is when Girder is running in the background. I don't think you can target things in this area.
I think you're talking about the taskbar, where programs are when minimized.
Icthus
October 13th, 2002, 12:55 PM
Yes, that is also what I'm talking about :). I'm sorry if I wasn't clear enough. I minimize Winamp to the system tray (area next to the clock - Microsoft call it the system tray but there seem to be several other names for it).
Sorry, vynce. That's my misunderstanding. I don't use Winamp all that much, and I didn't know it could be put in the system tray.
What application are you trying to close from the system tray? If I can install a copy of it then we can both work on this problem more effectively.
Actually, I'm not wanting to do anything with the tray. I was just trying to help daneshbod with closing Girder.
Vol
October 13th, 2002, 12:55 PM
Yeah you have to select match invisible tasks in the target window.
daneshbod
October 13th, 2002, 12:55 PM
How is it possible to close a program which is mimimized in system tray?for example Girder itself.
Thanks
Younes
daneshbod
October 13th, 2002, 12:55 PM
I have tested "Match invisible tasks" and it failed. For now the only working solution is what Icthus mentioned. I actually want to close Girder when it's in tray.
Regards
Younes
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.