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, 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 ➜ Plugins ➜ My Plugins Page

My Plugins Page

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


Pages: 1  2  3 

Posted by Cage_fire_2000   USA  (119 posts)  Bio
Date Reply #30 on Thu 12 Nov 2009 10:31 PM (UTC)

Amended on Thu 12 Nov 2009 10:40 PM (UTC) by Cage_fire_2000

Message
Ok, new plugin, nothing big, I stumbled upon the hidden automatic resize feature of the command window in v4.30 and decided to write a command interface, so instead of having to go through the script to activate/change it, you can just type some commands to do the work.

On another note, I've been working a little more on my new yet-to-be-released mushcode conversion plugin, I've combined it with my Paste_As_MUSH plugin, and added different methods of using it, I may post it soon, but I looked and I noticed I ended up adding 5 different menu options to the alias menu, which seems like a little too much to me, so I'm trying to figure out a way to cut that down. One option would be to make it 1-2 menu option(s), and simply pop up a listbox to pick which option you want to use, however, that'd slow it down a bit I think, then again they might not be using it constantly, and some of them are already kinda... It'd be really nice if I could just have a way to make a sub-menu, although I'm not sure how that'd work without changing the way the alias menu works.

Anyways, I'll list the current options here:
* Convert Clipboard to MUSHcode(This takes the clipboard contents, converts them to MUSHcode, pops the result up in an edit box, allowing you to alter or copy it, then either click ok to insert in the command window, or cancel to discard it if you only wanted to copy it.)
* Convert Command Selection to MUSHcode(This takes the current selected text in the command window, converts to MUSHcode, then pastes it back, also selecting the converted text.)
* Convert Inputted Text to MUSHcode(This pops up an edit box for you to enter text, then proceeds like the Clipboard option, this option might be redundant so I might take that out. I suppose it might be good to type up a mail message or bbpost though, so I'm not sure, you could always type it in the command window and use the other option.)
* Convert Output Selection to MUSHcode 16 color(This takes the selected text in the output window, converts it to mushcode including using ansi() to get the colors, and pops up the result in an edit box for editing/copying, then allows you to either insert it or discard it.)
* Convert Output Selection to MUSHcode 256 color(8bit only, unless some other game uses the same color() function to make 256 color text. This works just like the 16 color option, only uses color() instead of ansi(), which also means it doesn't get stuff like underline and flash and the like.)

I'm trying to decide what to do, or how to tweak it. I was thinking I could combine the input selection, with the 16 color option, and simply have the code detect what window has the selection(as in a recent release it was made you can only have a selection in one or the other anyways.), if something is selected in the output window, use the 16 color code, otherwise check the input window, and if there's something selected then convert it. Then leave the 256 color as a seperate option, which can be disabled with a simple edit of the file just changing the 'enabled' status of the alias, or I can release 8bit and non-8bit versions. (BTW, I would be rather curious if there's any other games MUSH or not that use the 256 color standard.) Anyway, this would narrow it down to 3-4 options. Convert clipboard, Convert Inputted Text, Convert Selection, and optionally Convert Selection 256. Does anybody have any opinions about anything I could/should add/remove/change? Then again it's kinda hard to form an opinion without trying something first, but from what I've described?

Edit: I just had a thought, I could make it so that if nothing is selected in the output or input windows, then either prompt for something or grab it from the clipboard, but I'm not sure about that idea. Because that way you'd have to make sure nothing was selected to use that third option.

Edit: I could take that even further, first check the output window, then the input window, then prompt for input with the clipboard text as the default. Effectively combining 4 out of 5 options, but it'd be rather tricky for the user, as they'd have to make sure they meet the different conditions to get the effect they want.
Top

Posted by Cage_fire_2000   USA  (119 posts)  Bio
Date Reply #31 on Fri 13 Nov 2009 02:27 PM (UTC)
Message
OK, I altered my Edit_Command_Window plugin, now that I figured out selections in the command window, if you have something selected, only that will be editted, if you have version MC 4.40 or later, then it'll also reselect the changed selection afterwards. Although it's still compatible with previous versions back to 3.69, it just checks to see if SetCommandSelection exists and if not it can't select it. It's not really crucial to it's functioning anyway, so I didn't want to change the minimum version by such a large amount. They really should update to the most recent anyways, but if they don't want to that's their choice.

I think what I'm going to do with my MUSHcode conversion plugin, is narrow it down to three commands, one to convert the current selection, either output or input window. one to convert inputted text, which can easily be used with the clipboard by just hitting Ctrl-V in the edit box, and the third is the 256 color code, which most people besides 8bitters won't be able to use.

I was originally going to take Twisol's suggestion and pop up the results in an edit box for easy copying, but I think I have a better/faster alternative now. As of 4.40 they added SetCommandSelection(), so I'm just going to use that to highlight the code after it's been inserted into the command window, so if you want to copy/cut it, it's already selected and you just hit Ctrl-C or Ctrl-X. Also even with the editbox option, you'd still have to select it first before you could copy it(BTW, Ctrl-A for select all doesn't seem to work in the edit box, you have to right-click), this way you don't. Granted, you need 4.40 or later, but that's a minor thing, and if you still want to edit it in an editbox later, you could just use my new version of my Edit_Command_Window plugin that now allows you to edit the current selection. I think it covers all the bases.

If nobody has any more input, I may just make a few final tweaks to the plugin, and then maybe upload it.
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.


88,472 views.

This is page 3, subject is 3 pages long:  [Previous page]  1  2  3 

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.