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

Gammon Forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  Communicating with External Applications...
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Communicating with External Applications...

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


Posted by Accolades   (6 posts)  [Biography] 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 -
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] 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
[Go to top] top

Posted by Mav   (8 posts)  [Biography] 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
[Go to top] top

Posted by Accolades   (6 posts)  [Biography] 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 -
[Go to top] top

Posted by Accolades   (6 posts)  [Biography] 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 -
[Go to top] top

Posted by Mav   (8 posts)  [Biography] 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.
[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.


5,262 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]