Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ General
➜ Multiple windows on startup
|
Multiple windows on startup
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Gdiakcl
(4 posts) Bio
|
| Date
| Thu 09 Apr 2015 10:31 AM (UTC) |
| Message
| | I would like to be able to save my session (with 2 windows open and sized where I like them) and be able to load that session on startup. Is there a setting in MUSHclient to achieve that effect? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,171 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Thu 09 Apr 2015 08:30 PM (UTC) |
| Message
|
That should let you move and resize all of your windows to your desired position (run that at world open - there is a provision for running a script when the world opens, see the Scripting configuration tab).
You could make a script file, and put the appropriate function into it.
The above gets the world window positions which you could run at world close, to remember the current positions.
This isn't a "setting" per se, (although the main window should be remembered).
These days I would recommend using Miniwindows to achieve extra panes of information. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,171 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Fri 10 Apr 2015 04:39 AM (UTC) Amended on Fri 10 Apr 2015 04:40 AM (UTC) by Nick Gammon
|
| Message
| Something like this ...
Make a script file called, say, move_world_windows.lua.
Inside it put this:
function load_window_positions ()
-- Left, Top, Width, Height, WhichWindow
DoAfterSpecial (1.5, 'MoveWorldWindow (1, 1, 860, 818, 1)', sendto.script)
DoCommand "NewWindow"
DoAfterSpecial (2, 'MoveWorldWindow (870, 1, 400, 818, 2)', sendto.script)
end -- save_window_positions
In the world configuration -> Scripts make the above file your script file (browse for it).
Then in the World Events -> Open (same configuration page) put the word: load_window_positions
Save your world.
Now if you close and re-open the world both windows should open (after a brief pause) and reposition to where the script said.
To customize the numbers, just do it by trial and error, or position the windows how you want, and then use the Immediate scripting window to do this:
require "tprint"
print "------- main window ------"
tprint (GetWorldWindowPosition (1))
print "------- other window ------"
tprint (GetWorldWindowPosition (2))
You should see some numbers in the output window like this:
------- main window ------
"top"=1
"height"=818
"left"=1
"width"=860
------- other window ------
"top"=1
"height"=818
"left"=870
"width"=400
Use those to set the appropriate values in the script. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | 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.
13,597 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top