| View previous topic :: View next topic |
| Author |
Message |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Fri Jan 28, 2005 10:34 pm Post subject: WinMinimize bug |
|
|
I vaguely remember encountering a bug with WinMinimize in the past, where the window was "minimized" in a style one might expect in an application with contained child windows; that is, it's shrunk to a caption (in classic style for some reason) in the bottom left portion of the screen. This morning I encountered it again in PSPad. It's recurring and reproducable:
That is the exact code I used. I haven't yet noticed such behavior in other windows, but like I said, I do remember having encountered this in the past (might've been PSPad then, too, though). It might be worth noting that the Postmessage equivalent...
| Code: | | PostMessage,0x0112,0x0000f020,0x00f40390,,A |
...works fine. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Sat Jan 29, 2005 2:48 pm Post subject: |
|
|
Someone pointed this out a while back and as a result, the following was added to WinMinimize and other commands:
If a particular type of window does not respond correctly to WinMinimize, try using the following instead:
PostMessage, 0x112, 0xF020,,, WinTitle, WinText ; 0x112 = WM_SYSCOMMAND, 0xF020 = SC_MINIMIZE |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Sat Jan 29, 2005 4:31 pm Post subject: |
|
|
*self-slap*
Don't bother, BoBo, I'll do the honors.
RTFM, Jonny! |
|
| Back to top |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Wed Jan 24, 2007 4:36 pm Post subject: |
|
|
Hi Chris,
can't you correct the behaviour of WinMinimize so it acts like the PostMessage? There is no reason to use WinMinimize when it does not work always. _________________ Tekl |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Wed Jan 24, 2007 5:13 pm Post subject: |
|
|
I seem to remember that the PostMessage method fails in some cases where WinMinimze succeeds, perhaps when the target window lacks a minimize button. Therefore, I suspect this change would break existing scripts. And since commands like WinMinimze are so frequently used, simply changing them seems irresponsible unless extensive testing is done across dozens of apps.
For v2, I do not know which method is best, so will probably keep the current method unless someone has convincing evidence that the PostMessage method is better for most people. |
|
| Back to top |
|
 |
Tekl
Joined: 24 Sep 2004 Posts: 813 Location: Germany
|
Posted: Thu Jan 25, 2007 1:15 pm Post subject: |
|
|
I'll replace all WinMinimize in ac'tivAid with PostMessage. As I have many users I can say in some months if PostMessage is a good replacement. _________________ Tekl |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Thu Jan 25, 2007 5:10 pm Post subject: |
|
|
| Several commands already have mode parameters, why not this one too? It could even be added before v2 if the default mode is the non-Postmessage one. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Fri Jan 26, 2007 1:33 am Post subject: |
|
|
It's a good idea, but it isn't obvious where to put the mode except at the end of the parameter list, or perhaps as some special ahk_* prefix. Also, it's my understanding that the need for this is fairly rare, but that could just be because it's in the documentation so few people express an interest in in anymore.
Also, there might be a way to combine the two methods, such as trying one first and if it fails, trying the other. I'll try to look into this during or after v2.
Thanks. |
|
| Back to top |
|
 |
|