 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Thu Feb 03, 2005 2:42 am Post subject: WinClose on script windows |
|
|
| I recently noticed that when WinClose is used on a script's main window, it closes the script itself. This is probably by design, so the reason I post this in Wish List is that I think it'd be nice if this were changed, so that the main window is simply hidden and the script stays running. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Feb 03, 2005 1:06 pm Post subject: |
|
|
A lot of scripts probably depend on the current behavior (there are even some examples posted in the forum). So it's probably best not to change it.
You can work around this by checking the title or class of the target window and sending it a WinMinimize instead. Or you can send !{F4}, which closes some apps but hides others if they are designed that way. I think you could even avoid the keystrokes with the following, which I've added to the help file:
WinClose sends a WM_CLOSE message to the target window, which is a somewhat forceful method of closing it. An alternate method of closing is to send the following message. It might produce different behavior because it is similar in effect to pressing Alt-F4 or clicking the window's close button in its title bar:
PostMessage, 0x112, 0xF060,,, WinTitle, WinText ; 0x112 = WM_SYSCOMMAND, 0xF060 = SC_CLOSE |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|