AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WinMinimize bug

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Fri Jan 28, 2005 10:34 pm    Post subject: WinMinimize bug Reply with quote

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:

Code:
WinMinimize,A


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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sat Jan 29, 2005 2:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Sat Jan 29, 2005 4:31 pm    Post subject: Reply with quote

*self-slap*

Don't bother, BoBo, I'll do the honors.

RTFM, Jonny!
Back to top
View user's profile Send private message
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Wed Jan 24, 2007 4:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Wed Jan 24, 2007 5:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Thu Jan 25, 2007 1:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Thu Jan 25, 2007 5:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Fri Jan 26, 2007 1:33 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group