Yeah. I misread what you said. lol
Having cleared up what you mean, this client is a fairly recent arrival on the scene, so there are no vast repositories of examples and the like. Save for the ones on Magnum's site and here, and the various posts in the forums, the only place you might find some code for it is on muds where someone has posted a solution to some problem of one sort or another.
I have often seen the same questions over and over. And once in a while run into fun things like the trailing spaces you got, which the trigger couldn't match because you where basically telling it to find the 'literal' line that ended with '.'. It is one of those things that can drive you nuts when it doesn't want to work. lol I frankly think that we could do with such a FAQ page for scripting or a tutorial page, but imho it would really be better if it was here among the forums.
Not to say it wouldn't hurt for someone else to have one either, but I worry that such critical content could vanish due to the loss of the posters web page. That said, the forums here are the only place you are likely to find mud related code for JScript or the others. This fact tends to be quite inconvenient, since almost everyone here uses VBScript. Both of them have odd limitations. For instance it is easy to sort an array in JScript, but it lacks the functions Trim, RTrim and LTrim for removing leading and trailing spaces. Arrays themselves also seem more straight forward and understandable in VB. A recent attempt at posting some code in JScript to help someone out resulted in A) my being unable to make a complete plugin to handle the problem and B) no one else bothering to post anything to help solve the rest of the problem.
I am afraid that while we can help answer questions (maybe..) that like the rest of us you are more or less on your own in finding out the quirks and complications of trying to use script in Mushclient. They may be significantly more versitile because of the range of options you get and what they can actually do, but using them present far more complex problems than 'most' of what they are used for in the web environment and a number of things you can do there turn out to be impossible, complicated or really really stupid to try in Mushclient.
For-next loops for instance, when used to add a 'delay', are a major no-no, since they will freeze the client during the loop. You end have to use a timer to add such delays or to execute code that needed to be executed at specific intervals. Even connecting to some controls like the Inet control for ripping HTML pages is an issue here, since it will lag the client for the entire time it takes to connect, send a page request, and finally recieve the contents. The delay when initially executing a command to a database for the first time is 'much' shorter, but still noticable.
Some of us are aware of these things from experience, but even me and Magnum can't claim to be complete experts on all the quirks this client provides. Expecting to find code anyplace else that deals with muds, when even zMud only very recently added support for windows scripting (probably in a lame response to Mushclient), is very unlikely. Most clients impliment their own native scripting, of which zMud's is the only one that 'sort of' resembles any modern language. And that clients scripting has been so full of bugs and things that fail to work as documented that I won't touch it with a 100' pole.
Yeah. A tutorial page is something I and probably others have considered and just been too lazy to do. No matter how you look at it, it requires a lot of work to figure out, because finding existing examples for things ranges from hard to impossible. |