Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Gael
Beginner


Joined: 18 Sep 2006
Posts: 29

PostPosted: Tue Jul 03, 2007 6:29 pm   

Help with Scripting environment (VBScript)
 
I'm hoping that someone can provide an example of, or point me to an existing page/topic of using the new scripting environment feature. Ideally this would be in VBScript, though I can probably port it from another language if necessary. Specifically, what I'm looking for is:
    How to access and use the zmud session and its objects
    Connecting to an ODBC (.mdb) data source and sending info from there to zmud
    Anything else that you think might be of interest to a scripting newbie


Something like this is probably already available somewhere, so my apologies, but my own search hasn't turned up anything.

Thanks much,
G
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jul 03, 2007 9:23 pm   
 
I do believe the only things exposed right now are variables.
_________________
EDIT: I didn't like my old signature
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Jul 03, 2007 9:50 pm   
 
I thought I'd replied to this thread. Obviously it didn't send.

Matt is right - the only part of CMUD that's exposed via the WSH is variables. Commands and functions can't be used yet - this'll probably change in the next version. The objects will be totally different when Lua is added. For now, this, along with the added complexity, makes COM a much more obvious choice for this sort of problem. CMUD's exposes more to the COM interface than it does to its own scripting interface, and COM already lets you do many things like database accesses. If you have your heart set on using VBScript inside CMUD, though, I'm sure someone can help.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
MooNFisH
Newbie


Joined: 25 Apr 2007
Posts: 8

PostPosted: Fri Jan 21, 2011 5:17 pm   
 
Since this thread is about the same subject, I figured it would be wiser to ask my question here. If this is not how you do things around here, I apologize.

Has there been any change in the availability of commands and functions for using VBscript in the updates since 2007?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Jan 21, 2011 6:24 pm   
 
The preferred thing is to start a new topic, and you can reference an old topic if you like.

But to answer my question, the have been changes to the interface beyond that which would have been made available by an updated WSH (Windows Scripting Host) from Microsoft.
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jan 24, 2011 5:52 pm   
 
Actually, you *can* access more than just variables via VBScript. In the WSH scripting languages, you have access to all of the COM-based scripting. For example, you can use GetAlias to get an alias, CMUDCommand to execute a command, etc. See the page: http://www.zuggsoft.com/page.php?file=zmud/comserve.htm for the COM API and just replace occurrences of zMUD with CMUD (or maybe lowercase cmud, I forget). Both the main application class and the session class are added to the WSH name space.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net