[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  More options for DoCommand - Maximize and Restore
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

More options for DoCommand - Maximize and Restore

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Cino   Australia  (17 posts)  [Biography] bio
Date Tue 04 Jul 2006 10:27 AM (UTC)
Message
Do such options already exist that have the same effect?

I am primarily interested in being able to have a macro that toggles between the maximized state and regular state of a world window, and hence, the rest of the MDI children.

Something like alt+m which would send
/if maximized then
   DoCommand("Restore")
else
   DoCommand("Maximize")
end

Though I do not know how to check for the maximized state, since I open maximized, it is not hard to track in a variable.

I understand this is somewhat achievable using the MDI keyboard shortcuts, like alt+- and then r to restore, and alt+- and then x to maximize, but they seem a bit cumbersome. Perhaps instead, is it possible to just put these into a macro?
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Reply #1 on Tue 04 Jul 2006 05:55 PM (UTC)
Message
Hmm.. Well, technically you could, in languages that support it, which Lua and Python could with the right setups, use the user32.dll API function "GetWindowPlacement". You can also use "SetWindowPlacement" to define max/min states. Likely some things like wxPython and wxLua support these already as part of their window management setups, but those do not come installed with the standard script systems, they have to be added. Python may already include some limited features in this set, but Lua doesn't, as near as I can tell.

It may be easier to support it internally in Mushclient than rely on addon libraries that a) are not available for all languages and b) don't come pre-installed as part of any of them.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Tue 04 Jul 2006 11:10 PM (UTC)
Message
These two DoCommand options are now available in version 3.75.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


4,153 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]