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 ➜ VBscript ➜ Communicating with External Applications...

Communicating with External Applications...

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


Posted by Accolades   (6 posts)  Bio
Date Tue 16 Jul 2002 02:20 AM (UTC)
Message
Since MUSHclient doesn't have the ability to open multiple windows and specify which data is displayed in each, I am hoping to emulate this with a third party application I want to write.

Basically, the application will be in Visual Basic, and will just display certain command responses in several "windows" that can run alongside MUSHclient (zMud has this ability built in, but I really don't care for that client)

It should be relatively simple, but I don't know where to begin, I've never done any COM programming so I don't know where to turn.

Also, how hard would it be to program the ANSI color coding from MUDs into my VB Program?

If anyone is wondering, this is for the BattleTech MUXes, the effect I'm looking for is kind of like Mav's BTSuite, but I'm not looking for the graphical aspects (or the downloaded map files) I just want to echo text into new windows.

Thanks in advance
- Tim -
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 16 Jul 2002 05:42 AM (UTC)
Message

Check out this post Does MUSHclient use DDE? - this describes making a COM object in VB and calling it from MUSHclient.

As for the colouring, use GetLineInfo and GetStyleInfo to get the information about the colouring for a line in the output window.


- Nick Gammon

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

Posted by Mav   (8 posts)  Bio
Date Reply #2 on Tue 16 Jul 2002 09:52 AM (UTC)

Amended on Tue 16 Jul 2002 09:53 AM (UTC) by Mav

Message
Hello,

Well, its pretty simple actually. First you need your COM program written of course. Then you need to write a script to communicate with that COM object. an example is btech.vbs (check http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/btsuite/btsuite_v1/MushClient/BTech.vbs?rev=HEAD&content-type=text/vnd.viewcvs-markup).

As for colors, the problem is not to get them or even interpret ansi codes, they are simple, but it is with windows Memo controls(no color). You might need to use a RichEdit control, which will be slow. Matters ? You decide, do extra windows need speed ?

Besides those, I think it should be pretty simple. I hope you dont get much trouble with it.

Regars,
Mav
Top

Posted by Accolades   (6 posts)  Bio
Date Reply #3 on Tue 16 Jul 2002 11:21 AM (UTC)
Message
Wow, timely and informative replies from the two people who probably know the most about this subject.

Thanks a lot, both of you.

I'm sure you'll be hearing more from me!

- Tim -
Top

Posted by Accolades   (6 posts)  Bio
Date Reply #4 on Tue 16 Jul 2002 04:39 PM (UTC)
Message
I thought you would be hearing more from me! I was hoping it wouldn't be this soon. I was hoping you could both take a stab at this for me.

Everything is working well so far, thanks to the VB6 help files I can even have MUSHclient display my forms and everything, and thanks to you guys I can interact with the MUD thru my application via MUSHclient. My next question is:

What do you think is the best way to capture text from MUSHclient and *NOT* allow it to show up on the output window for the user. I want the text to only be displayed in my application, I was thinking something like GetLineCount to find out how many lines were returned by the MUD, now how to I herd them into my application instead of MUSHclient?

Thanks again for your time.

- Tim -
Top

Posted by Mav   (8 posts)  Bio
Date Reply #5 on Tue 16 Jul 2002 08:45 PM (UTC)
Message
The way I have choosen to do that was to write a softcode command that sends me the information I need, but prefixed by an identifier. This would turn a line like

This_Line_Is_A_Line_You_Get_From_MUX


into a


MUX::This_Line_Is_A_Line_You_Get_From_MUX


Then you could define a trigger on
MUX::*
to get the line you want. Write a trigger-handler SUB in your VBScript to handle this line, ie, send to your COM Object app. Then of course you can do with that line as you please.

However, despite this was the way I used, later there was a protocol implemented, named HUDINFO, that does the line prefixing and sending formated data, but in hardcode. You could use that protocol instead. Of course, some mux's dont have that protocol (like 3065 for instance), some have(3030/3029-basically every mux that uses cvs source).

Oh, I didnt mention that you can check "Omit From Output" in trigger settings and have that line not displayed. You need to do that in any case if you dont want it to be shown.

I hope that helps.
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.


26,843 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.