| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Message
| I doubt that will work.
The words after "world" (eg. world.xxxx) are all predefined in the program, and are listed in the mushclient.tlb file. This is a binary file produced from the mushclient.odl file, which I reproduce below.
You cannot just add your own words to the list.
I still think my earlier suggestions of using a database, or sharing variables, will work. You can have any number of variables in MUSHclient, and each one can hold any amount of data. As I said before, they are looked up by a hash lookup which should be fast. Faster still is probably to do it with an ODBC database, because then you don't have to load the table each time, and the problem of sharing the data goes away. You can use mySQL, which is free, as your database server. That works very well, and is very fast.
// MUSHclient.odl : type library source for MUSHclient.exe
// This file will be processed by the MIDL compiler to produce the
// type library (MUSHclient.tlb).
[ uuid(11DFC5E7-AD6F-11D0-8EAE-00A0247B3BFD), version(1.0) ]
library MUSHclient
{
importlib("stdole32.tlb");
// Primary dispatch interface for CMUSHclientDoc
[ uuid(11DFC5E8-AD6F-11D0-8EAE-00A0247B3BFD) ]
dispinterface IMUSHclient
{
properties:
// NOTE - ClassWizard will maintain property information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_PROP(CMUSHclientDoc)
[id(7)] short NoteColour;
[id(2)] short LogNotes;
[id(3)] short LogInput;
[id(8)] boolean Trace;
[id(4)] short LogOutput;
[id(9)] short SpeedWalkDelay;
[id(5)] boolean Mapping;
[id(6)] boolean RemoveMapReverses;
[id(1)] short EchoInput;
[id(10)] long NoteColourFore;
[id(11)] long NoteColourBack;
//}}AFX_ODL_PROP
methods:
// NOTE - ClassWizard will maintain method information here.
// Use extreme caution when editing this section.
//{{AFX_ODL_METHOD(CMUSHclientDoc)
[id(12)] long GetLineCount();
[id(13)] boolean IsConnected();
[id(14)] BSTR WorldName();
[id(15)] void Note(BSTR Message);
[id(16)] long Send(BSTR Message);
[id(17)] long Sound(BSTR SoundFileName);
[id(18)] long DeleteTrigger(BSTR TriggerName);
[id(19)] long AddTrigger(BSTR TriggerName, BSTR MatchText, BSTR ResponseText, long Flags, short Colour, short Wildcard, BSTR SoundFileName, BSTR ScriptName);
[id(20)] long EnableTrigger(BSTR TriggerName, BOOL Enabled);
[id(21)] long GetTrigger(BSTR TriggerName, VARIANT* MatchText, VARIANT* ResponseText, VARIANT* Flags, VARIANT* Colour, VARIANT* Wildcard, VARIANT* SoundFileName, VARIANT* ScriptName);
[id(22)] long IsTrigger(BSTR TriggerName);
[id(23)] VARIANT GetTriggerList();
[id(24)] VARIANT GetVariable(BSTR VariableName);
[id(25)] long SetVariable(BSTR VariableName, BSTR Contents);
[id(26)] VARIANT GetVariableList();
[id(27)] boolean Save(BSTR Name);
[id(28)] long Connect();
[id(29)] long Disconnect();
[id(30)] long DeleteAlias(BSTR AliasName);
[id(31)] long EnableAlias(BSTR AliasName, BOOL Enabled);
[id(32)] long GetAlias(BSTR AliasName, VARIANT* MatchText, VARIANT* ResponseText, VARIANT* Parameter, VARIANT* Flags, VARIANT* ScriptName);
[id(33)] VARIANT GetAliasList();
[id(34)] long IsAlias(BSTR AliasName);
[id(35)] long CloseLog();
[id(36)] long OpenLog(BSTR LogFileName, BOOL Append);
[id(37)] long WriteLog(BSTR Message);
[id(38)] boolean IsLogOpen();
[id(39)] long EnableTimer(BSTR TimerName, BOOL Enabled);
[id(40)] long AddAlias(BSTR AliasName, BSTR MatchText, BSTR ResponseText, long Flags, BSTR ScriptName);
[id(41)] long DeleteVariable(BSTR VariableName);
[id(42)] void ResetTimers();
[id(43)] void SetStatus(BSTR Message);
[id(44)] long SetCommand(BSTR Message);
[id(45)] BSTR GetNotes();
[id(46)] void SetNotes(BSTR Message);
[id(102), propget] long NormalColour(short WhichColour);
[id(102), propput] void NormalColour(short WhichColour, long nNewValue);
[id(103), propget] long BoldColour(short WhichColour);
[id(103), propput] void BoldColour(short WhichColour, long nNewValue);
[id(104), propget] long CustomColourText(short WhichColour);
[id(104), propput] void CustomColourText(short WhichColour, long nNewValue);
[id(105), propget] long CustomColourBackground(short WhichColour);
[id(105), propput] void CustomColourBackground(short WhichColour, long nNewValue);
[id(47)] void Redraw();
[id(48)] long ResetTimer(BSTR TimerName);
[id(49)] void SetOutputFont(BSTR FontName, short PointSize);
[id(50)] void SetInputFont(BSTR FontName, short PointSize, short Weight, BOOL Italic);
[id(51)] boolean SendToNotepad(BSTR Title, BSTR Contents);
[id(52)] boolean AppendToNotepad(BSTR Title, BSTR Contents);
[id(53)] boolean ActivateNotepad(BSTR Title);
[id(54)] void Activate();
[id(55)] IDispatch* GetWorld(BSTR WorldName);
[id(56)] VARIANT GetWorldList();
[id(57)] BSTR FixupHTML(BSTR StringToConvert);
[id(58)] BSTR Replace(BSTR Source, BSTR SearchFor, BSTR ReplaceWith, BOOL Multiple);
[id(59)] BSTR FixupEscapeSequences(BSTR Source);
[id(60)] BSTR Trim(BSTR Source);
[id(61)] boolean ReplaceNotepad(BSTR Title, BSTR Contents);
[id(62)] VARIANT GetAliasInfo(BSTR AliasName, short InfoType);
[id(63)] VARIANT GetTriggerInfo(BSTR TriggerName, short InfoType);
[id(64)] BSTR EvaluateSpeedwalk(BSTR SpeedWalkString);
[id(65)] BSTR ReverseSpeedwalk(BSTR SpeedWalkString);
[id(66)] long AddTimer(BSTR TimerName, short Hour, short Minute, short Second, BSTR ResponseText, long Flags, BSTR ScriptName);
[id(67)] long DeleteTimer(BSTR TimerName);
[id(68)] long IsTimer(BSTR TimerName);
[id(69)] VARIANT GetTimerList();
[id(70)] long GetTimer(BSTR TimerName, VARIANT* Hour, VARIANT* Minute, VARIANT* Second, VARIANT* ResponseText, VARIANT* Flags, VARIANT* ScriptName);
[id(71)] VARIANT GetTimerInfo(BSTR TimerName, short InfoType);
[id(72)] long GetUniqueNumber();
[id(73)] long Queue(BSTR Message, BOOL Echo);
[id(74)] long DiscardQueue();
[id(75)] VARIANT GenerateName();
[id(76)] long ReadNamesFile(BSTR FileName);
[id(77)] long AddToMapper(BSTR Direction, BSTR Reverse);
[id(78)] long GetMappingCount();
[id(79)] VARIANT GetMappingItem(long Item);
[id(80)] VARIANT GetMappingString();
[id(81)] long DeleteLastMapItem();
[id(82)] long DeleteAllMapItems();
[id(83)] long GetSentBytes();
[id(84)] long GetReceivedBytes();
[id(85)] long GetConnectDuration();
[id(86)] double GetScriptTime();
[id(87)] BSTR WorldAddress();
[id(88)] long WorldPort();
[id(89)] void DeleteCommandHistory();
[id(90)] void DeleteOutput();
[id(91)] void Tell(BSTR Message);
[id(92)] void NoteColourRGB(long Foreground, long Background);
[id(93)] void NoteColourName(BSTR Foreground, BSTR Background);
[id(94)] BSTR Version();
[id(95)] void Reset();
[id(96)] long GetOption(BSTR OptionName);
[id(97)] VARIANT GetOptionList();
[id(98)] long SetOption(BSTR OptionName, long Value);
[id(99)] VARIANT Debug(BSTR Command);
[id(100)] void Pause(BOOL Flag);
[id(101)] IDispatch* Open(BSTR FileName);
//}}AFX_ODL_METHOD
};
// Class information for CMUSHclientDoc
[ uuid(11DFC5E6-AD6F-11D0-8EAE-00A0247B3BFD) ]
coclass World
{
[default] dispinterface IMUSHclient;
};
//{{AFX_APPEND_ODL}}
//}}AFX_APPEND_ODL}}
};
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|