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

Gammon Software Solutions forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Plugins
. . -> [Subject]  My Plugins Page

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: My Plugins Page
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1 2  3  

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Fri 13 Nov 2009 02:27 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Thu 12 Nov 2009 10:31 PM (UTC)  quote  ]

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.
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Thu 22 Oct 2009 05:22 AM (UTC)  quote  ]
Message
Ok, I only posted the Edit_Command_Window plugin a few hours ago, but if anybody has downloaded it already, I've updated it. The description now explains that to bind it to an accelerator or macro use "Edit_Command_Window", also if unpause on send in the output config is not set it'll pause the output window while your editing the command, also, I forgot to set the omit from command history and omit from log file flags, so they're now in version 1.02.
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Thu 22 Oct 2009 02:55 AM (UTC)  quote  ]
Message
Ok, figured I'd start out with a simple plugin, before I start working on more complicated plugins. So here we go, new on my plugins page. The Edit_Command_Window plugin, almost ridiculously simple to make, but hopefully still useful. What it does is simple, you simply Ctrl-Click to bring up the alias menu. Click Edit Command Window, and the contents of the command window pop up in an edit box. Allowing you to edit large commands/messages that take up a lot of lines. Unfortunately there's no way to keep stuff like Auto-Complete and such that you have in the command window(I never use it anyway myself, but some might), but it's a trade off, for being able to edit large commands without increasing the size of your command window, and thus decreasing the size of your output, and also you don't need to write it in a notepad then copy and paste it into a command window. It's not my most /fantastic/ plugin I'll admit, but it does have it's uses.
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Sun 18 Oct 2009 11:25 PM (UTC)  quote  ]
Message
All that sounds quite good really. Glad it helped give you some ideas. :)

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Sun 18 Oct 2009 11:19 PM (UTC)  quote  ]
Message
Twisol said:

No, no, I meant paste the converted code into the editbox for easy copying, instead of into the command window.


Err, if you want that, I could just have the plugin put it on the clipboard directly... Or I could just make it so that it puts it in an edit box where you can edit/copy it, and if you click ok then it inserts it into the command window, and if you click cancel it does nothing. So if you simply want to copy the code, you just click the command, which brings up the edit box, where you can just copy it, and then click cancel. I could also just make seperate menu options where one is Insert as mushcode, and another is copy as mushcode, and so on.

Hmm, I wonder, with the alias menu, is it possible to make submenus to group commands together, like "Ctrl-Click > Copy As > Mushcode with 16 color" or "Ctrl-Click > Copy As > Mushcode with 256 color"? Or for general use it could be "Ctrl-Click > Attack > Punch" Well, there is a script thing for opening menus if I recall but it was meant for miniwindows. Wait, no you have to specify a miniwindow and I don't feel like having to make a background window just so I can popup a menu. Oh well.

Hmm, all this is making me start to think about editing some of my other plugins to use the edit box and such. Not to mention the other Lua utilities that I didn't have when I first wrote them. I have several ideas now actually. Thanks for suggesting it, I may come out with some new updates.


Sorry for the runon paragraphs I'm not quite sure where to break it up.
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Sun 18 Oct 2009 09:06 PM (UTC)  quote  ]
Message
No, no, I meant paste the converted code into the editbox for easy copying, instead of into the command window.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Sun 18 Oct 2009 09:04 PM (UTC)  quote  ]

Amended on Sun 18 Oct 2009 09:05 PM (UTC) by Cage_fire_2000

Message
Twisol said:


Okay... I'll admit I didn't read the whole post. But could you put the text into a utils.editbox() call? Would make it easier/cooler.


str = "this is some MUSHcode"
utils.editbox("MUSHcode", "MUSHcode Converted", str)


EDIT: Seems to be a Lua-only extension, and by the earlier discussion I'm not sure you're using it, but it's just one of those nice touches if you are.


Hmm, sure, it's written in LUA, I've been trying to put all my plugins in LUA lately, even though I don't use the language for anything else. Heck, this is the first time I've even used the editbox. It just never occured to me that since I was using Lua I could use them. I'm not sure why you'd need the edit box, although it'd make editing large logs or whatever easier. Heck, I could alter my Paste_As_MUSH plugin to use it too... Let you edit it before it's pasted into the command window. Or... I have another idea. I'll get back to you. I'm not quite ready to release it anyway.
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Sun 18 Oct 2009 08:07 PM (UTC)  quote  ]
Message
I have amended the main plugins page to mention the new site Cage_fire_2000. (In fact, I can't see a reference to the old one).

http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=108

- Nick Gammon

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

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Sun 18 Oct 2009 07:39 PM (UTC)  quote  ]

Amended on Sun 18 Oct 2009 07:42 PM (UTC) by Twisol

Message
Cage_fire_2000 said:
First of all, I heard from a friend that geocities may be dropping free web hosting near the end of this month, I don't know if it's true or not, but just in case I'm moving everything to my tripod website. I'll leave the geocities site alone for this month but I won't update it.

A simple google search led me to the Geocities homepage [1], where it says "GEOCITIES IS CLOSING ON OCTOBER 26, 2009" in a large font.

[1] http://geocities.yahoo.com/

Cage_fire_2000 said:
Stay tuned, I am working on a plugin that'll let you select text in the output window, click an alias menu option and convert it into MUSHCode /complete/ with color and then it pastes it into the command window. I already have it working, there might be a few bugs or ways to optimize it. Again it's mostly designed for 8bitMUSH, and we now use the extended 256 color ansi that mushclient added support for, but I did write an alternative standard 16 color version in the same plugin that should hopefully work with any pennmush game and supports underline, inverse, and flash. Although the 256 color version does not, as 256 color and standard ansi don't completely mix well on our game. Although with 256 colors to choose from, not many people bother with underline(we mostly use the colors for artwork anyway where underline doesn't matter much). I suppose I could hack it a little, but the output would be a bit larger... maybe in a later version.


Okay... I'll admit I didn't read the whole post. But could you put the text into a utils.editbox() call? Would make it easier/cooler.


str = "this is some MUSHcode"
utils.editbox("MUSHcode", "MUSHcode Converted", str)


EDIT: Seems to be a Lua-only extension, and by the earlier discussion I'm not sure you're using it, but it's just one of those nice touches if you are.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Sun 18 Oct 2009 07:30 PM (UTC)  quote  ]
Message
I don't know if anybody cares or not. But I have some updates. First of all, I heard from a friend that geocities may be dropping free web hosting near the end of this month, I don't know if it's true or not, but just in case I'm moving everything to my tripod website. I'll leave the geocities site alone for this month but I won't update it. Anyway, the new page for the plugins is http://cagefire2000.tripod.com/MCPlugins/MCPlugins.html

Furthermore, I discovered a tiny bug in Paste_As_MUSH where if you had a single space at the end of the text to encode it mistakenly wouldn't escape it. Normally this wouldn't be an issue in most cases, but I was using the code in another plugin where it had to break it up and run through segment by segment and it caused problems. So I've released version 1.21 on my tripod site(It's not on my geocities, I don't see the point if it's going to be gone in a month.)



Stay tuned, I am working on a plugin that'll let you select text in the output window, click an alias menu option and convert it into MUSHCode /complete/ with color and then it pastes it into the command window. I already have it working, there might be a few bugs or ways to optimize it. Again it's mostly designed for 8bitMUSH, and we now use the extended 256 color ansi that mushclient added support for, but I did write an alternative standard 16 color version in the same plugin that should hopefully work with any pennmush game and supports underline, inverse, and flash. Although the 256 color version does not, as 256 color and standard ansi don't completely mix well on our game. Although with 256 colors to choose from, not many people bother with underline(we mostly use the colors for artwork anyway where underline doesn't matter much). I suppose I could hack it a little, but the output would be a bit larger... maybe in a later version.

The problem with the 16 color version is that if you use any coloring triggers to change text to custom colors then the code can't tell what the original color was and tries to find the closest matching color which does /not/ always work very well. (I don't have any better code for finding how close one color is to another.) For example I have one color that's /looks/ mostly yellow I think it was #FFFF80, but the code changes it to white or grey. The 256 code works great though, but unless your game uses the [color()] function(As far as I know it only comes if you hacked FANSI into your game, and probably wouldn't work with the latest pennmush code as I believe they changed how ansi is handled) then it won't work for you. Well, unless you hack it to use whatever function your game uses, but please inform me if you do.

Anyway, the 16 color version should work on just about any pennmush based game, with the exception of custom colors and if you use MXP or Pueblo for hyperlinks(which changes it to a custom color so same thing) or for color changes.

An interesting quirk is that due to the way mushclient works, if you do something like [ansi(rh,Te)][ansi(rh,st)] even though they come out the same color they are in two seperate style runs which is how the plugin converts them back into two [ansi()] statements. I could possibly fix this, but it'd get complicated fast, involving looking ahead to future style runs and checking if they have the exact same colors and flags, and then joining the text together before escaping it. All in all I don't think it's that big of an issue to bother myself with fixing it.
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Wed 15 Oct 2008 05:01 PM (UTC)  quote  ]
Message
Another update. When converting my Paste_As_MUSH plugin to Lua I made the honest mistake of keeping the repeated appending code, which apparently in Lua can cause a lot of garbage collection after a while(using almost exponentially increasing amounts of memory.), so longer strings were slowing it down noticably. In v1.2 of my Paste_As_MUSH plugin, I've changed it to use table.insert() and table.concat() and it should be much better now, and it has been uploaded to my site. If you are using an older version please upgrade, as version 1.1 will run slowly with large strings.
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Sat 11 Oct 2008 04:59 AM (UTC)  quote  ]
Message
Ok, update. I'm pleased to announce I've finally gotten around to converting my Paste_As_MUSH plugin into Lua so that everybody should be able to use it. In addition I've rewritten the code so that /any/ character that is repeated a sufficient number of times will be converted into a repeat() call in addition to being escaped if necessary. For those not familiar with the plugin, it can be invaluable for showing code and logs to other people without having to manually go through and escape all the parenthesis and newlines and such. This plugin basically does a decompose()(for those familiar with newer penn) on the contents of the clipboard and pastes the result into the command window so that when it's evaluated by the game it /should/ come out exactly as it is in the clipboard, minus any color. Please try it out if you'd like and give me feedback and let me know of any bugs since I'm relatively new to Lua.
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Fri 05 Sep 2008 01:00 AM (UTC)  quote  ]

Amended on Fri 05 Sep 2008 01:01 AM (UTC) by Cage_fire_2000

Message
Sorry to dig up an old thread, but I have an update. I've rewritten my QueueControl plugin in Lua. It's available on my website. I had some difficulty getting the syntax right on this one since I'm new at Lua and there /might/ be bugs I haven't found yet, I'd appreciate if you guys could check it out for me. I still have the original JScript version up so you can compare the scripts and let me know if I did it right. Next up, converting the other plugins if I can figure out how. Many won't be that difficult, but at least one will.

Update: Holy cow, I just checked my last post, it's been over a year since I worked on this.
[Go to top] top

Posted by Cage_fire_2000   USA  (119 posts)  [Biography] bio
Date Tue 11 Sep 2007 02:40 AM (UTC)  quote  ]
Message
I discovered the GrabPack plugin had a problem with the grablock code, I have uploaded a fixed version of the plugin to my site. If you have downloaded a previous version of the plugin you should redownload it.
[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.


13,125 views.

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

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]