AutoHotkey Community

It is currently May 27th, 2012, 1:24 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: June 22nd, 2005, 6:21 pm 
Offline

Joined: June 4th, 2005, 1:54 am
Posts: 146
Hi,

A useful function (which I personally need...) is to find out if the current window is maximized or not. Today this requires finding out the window size, finding the current resolution, and calculating. And even this isn't so accurate as it may be just that the window is large enough, but not "maximized" (i.e, was dragged manually to take space of screen).

If it could be just a boolean value, that could be great.

What do you think?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 22nd, 2005, 8:13 pm 
Offline

Joined: November 8th, 2004, 12:46 am
Posts: 1271
As far as I know you can do this with WinGet (untested):

Code:
wingetactivetitle, title
winget, state, minmax, %title%
ifequal, state, -1
  msgbox, active window is maximised.

_________________
"Anything worth doing is worth doing slowly." - Mae West
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 22nd, 2005, 9:02 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
It's actually 1 for maximized and -1 for minimized. And you can use A to mean the active window:
Code:
WinGet, State, MinMax, A
if State = 1
    MsgBox The window is maximized.

By the way, since I often forget command syntax too, I've been using Rajat's Ctrl-2 context sensitive help hotkey, which takes the currently highlighted word and instantly jumps to the right page in the help file.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Great, thanks
PostPosted: June 23rd, 2005, 6:07 am 
Offline

Joined: June 4th, 2005, 1:54 am
Posts: 146
Hi,

Thanks very much to both of you -- now I know how to do this! :) You are great.

This brings me once more to the need for better documentation. I see AutoHotkey growing at an amazing pace, thanks to Chris's work.

Do you really think the docs are keeping up?

Perhaps a call should go out to create a team of doc writers? I can be a part of something like that, I think. But do you think there's a need, or do you think the current situation is enough?

Or maybe the need is for a good IDE, if at all?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Great, thanks
PostPosted: June 23rd, 2005, 11:54 am 
Offline

Joined: June 9th, 2005, 8:27 am
Posts: 31
Location: Germany near Cologne
ezuk wrote:
Do you really think the docs are keeping up?


1. I think Chris' doc is the best I've read for a long time - and very helpful. :)

2. There are always some points where an extra explanation (or further going expl.) could make something clearer. (I think making a good help takes always more time than writing the software!)

Would it be ok: when I see such a point I copy the title and a part of it and put in the explanation or the example ? Could and would you, Chris, insert this (if you think its ok) into the help ?

Would it be best to have an extra entry in the forum for changed Help ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Great, thanks
PostPosted: June 24th, 2005, 4:24 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
ezuk wrote:
Do you really think the docs are keeping up?
I think the newer documentation is generally better than the older pages in the help file. I certainly put a lot more time into it than I used to.

Even so, I'd welcome help with the documentation. My goals are to keep it concise so that it doesn't repel users with its verbosity, but at the same time be informative enough to solve nearly every issue.

KalleW wrote:
2. There are always some points where an extra explanation (or further going expl.) could make something clearer.
...
Would it be ok: when I see such a point I copy the title and a part of it and put in the explanation or the example ?
This would be most welcome. As you know, the one who writes something is often blind to defects that would be obvious to a proofreader.

You can e-mail all such suggestions to support@autohotkey.com

Quote:
Would it be best to have an extra entry in the forum for changed Help?
Adding new forum areas is generally avoided because it adds complication/confusion for new visitors about where to post.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 25th, 2005, 5:58 am 
Offline

Joined: June 9th, 2005, 8:27 am
Posts: 31
Location: Germany near Cologne
[/quote]Adding new forum ...[/quote]
ok, thanks for the answer, Chris.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Great, thanks
PostPosted: June 25th, 2005, 3:10 pm 
Offline

Joined: June 4th, 2005, 1:54 am
Posts: 146
Chris wrote:

Even so, I'd welcome help with the documentation. My goals are to keep it concise so that it doesn't repel users with its verbosity, but at the same time be informative enough to solve nearly every issue.

Do you plan on implementing some sort of collaborative help authoring system, so other authors could help?

BTW, just out of curiosity: Where in the current docs can I find the 'A' token for 'currently active window'?

Quote:
This would be most welcome. As you know, the one who writes something is often blind to defects that would be obvious to a proofreader.

You can e-mail all such suggestions to support@autohotkey.com

I'll also keep this in mind and email you with anything I find valuable.

Thanks for all of your hard work!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 26th, 2005, 12:15 am 
Quote:
Where in the current docs can I find the 'A' token for 'currently active window'?
This information is repeated in the description of the "WinTitle" parameter of all (or almost all) window functions that have "WinTitle, WinText" as their first and second parameters (e.g. WinKill, WinMaximize, WinMinimize, etc.)

Jacques.


Report this post
Top
  
Reply with quote  
 Post subject: Re: Great, thanks
PostPosted: June 26th, 2005, 3:05 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
ezuk wrote:
Do you plan on implementing some sort of collaborative help authoring system, so other authors could help?
It could be done, but I wonder if there would be enough usage of it to justify the extra maintenance. For now, it might be easier just to post or e-mail changes and additions.

You can also feel free to write tutorials and other documentation and post them here and/or in the wiki.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Great, thanks
PostPosted: June 26th, 2005, 6:10 am 
Offline

Joined: June 4th, 2005, 1:54 am
Posts: 146
Chris wrote:
You can also feel free to write tutorials and other documentation and post them here and/or in the wiki.


Great, thanks! :) Will keep that in mind!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group