Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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.
 Entire forum ➜ MUSHclient ➜ Suggestions ➜ Option to disable TabStop on (after) Send TextBox

Option to disable TabStop on (after) Send TextBox

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


Posted by Daniel P   USA  (97 posts)  Bio
Date Sun 18 Mar 2018 04:16 PM (UTC)

Amended on Sun 18 Mar 2018 04:17 PM (UTC) by Daniel P

Message
I saw this mentioned briefly in https://www.gammon.com.au/forum/?id=3506, but thought it would still be a useful and (possibly) easy to implement feature to option in.

Would it be difficult to add a checkbox to the Scripts configuration window or, more likely, a global configuration tab which would disable the UI TabStop after the Send TextBox, so that more reasonable indenting could be used while scripting via the in-client editor?

True, it's possible to edit in an external text editor or in a notepad, then copy it in, or set up an alias to reload a plugin, or whatever, but this seems like a very roundabout way of simply trapping the cursor in the inline editor...and takes about as much work, at least in my world, as tracking all the spaces to keep code clean and readable.

Thoughts? Yes? No?
Top

Posted by Nick Gammon   Australia  (23,057 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 20 Mar 2018 03:57 AM (UTC)

Amended on Tue 27 Mar 2018 10:32 PM (UTC) by Nick Gammon

Message
I've added this for multi-line editing windows so you would need to click the "Edit" button (sometimes labelled with "...") to enter the editor.

First, though, you need to get the latest version and enable the option.

Get latest version


See http://www.gammon.com.au/forum/?id=13903 for how to download the pre-release version of MUSHclient and install it.

Make the option available


Using the latest version, open MUSHclient, open Global Preferences (File -> Global Preferences) and then hit OK to save the preferences. This will add a new key to the preferences file on disk. Then close and re-open MUSHclient.

Install the option-changer plugin


See https://www.gammon.com.au/forum/?id=10603

Install the Global_Option_Updater plugin (File -> Plugins).

Type:


list_global_options


You should now see the option:


TabInsertsTabInMultiLineDialogs


... in the list of options.

Change the option


Type:


change_global_option TabInsertsTabInMultiLineDialogs 1


Save the global options


Close MUSHclient now to make sure it reads the options from disk next time.

Try out the new option


Go into a trigger or alias (or scripting Immediate window) and click on the edit button (...) to to edit the text. The tab key should now indent rather than move the focus to the next button.




Commit details: https://github.com/nickgammon/mushclient/commit/65a4ff8

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Daniel P   USA  (97 posts)  Bio
Date Reply #2 on Thu 22 Mar 2018 04:43 PM (UTC)

Amended on Mon 26 Mar 2018 04:47 PM (UTC) by Fiendish

Message
Very cool! I've only just gotten back to this, but thanks for the quick turnaround!

I'll take a glance when I get a chance soon and let you know how it works.

[EDIT] 2018-03-26: Just confirmed this works, though the option was not automatically added to the database on first execution of 5.06-pre (cd7bc71), and it doesn't look like the Global_Option_Updater plugin has an insert record command. Rather, I used the old method of opening it in DB Browser for SQLite and added the option to the prefs table manually. Then after that everything worked just fine, and the [...] dialog captures tabs perfectly. Anyway, thanks again!
Top

Posted by Nick Gammon   Australia  (23,057 posts)  Bio   Forum Administrator
Date Reply #3 on Mon 26 Mar 2018 11:02 PM (UTC)
Message
When I tested you had to follow my instructions exactly including opening the global options, hitting OK so it thought they might have changed, closing MUSHclient (to write out the options) and re-opening it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Daniel P   USA  (97 posts)  Bio
Date Reply #4 on Tue 27 Mar 2018 07:24 PM (UTC)
Message
Ah, that would make sense. And yes, this does work as intended as well.
Top

Posted by Nick Gammon   Australia  (23,057 posts)  Bio   Forum Administrator
Date Reply #5 on Tue 27 Mar 2018 10:33 PM (UTC)
Message
Amended reply #1 to mention closing and re-opening the client to read back in the global preferences. It looks like I omitted that instruction the first time around.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,057 posts)  Bio   Forum Administrator
Date Reply #6 on Wed 28 Mar 2018 06:02 AM (UTC)

Amended on Wed 28 Mar 2018 06:03 AM (UTC) by Nick Gammon

Message

I have also amended the Global_Option_Updater plugin to be more useful in this situation. It has changed from only allowing existing options (in the database) to be changed, to allowing known options (in the client) to be changed.

This new plugin can be found here.


- 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.


20,142 views.

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

Go to topic:           Search the forum


[Go to top] top

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