Yes, you can call other subs from a single one.
doafter sends to the mud. If you want to do it otherwise then you can use script commands to create a timer or the like that calls the actual sub.
Timers, DoAfter, etc. however all work by seconds, not milliseconds. This has annoyed a few people trying to do conversions, but..
Probably everything zmud scripts do can be duplicated in VBScript or though one of the built in commands for Mushclient, but not always in the exact same way. For instance #CW creates some complications, since there is no direct command to change the color of words or lines, but you can have a trigger that captures the line and colors it at the same time, or you can use Colourtell and Colournote to print things to the window in color. The result is the same, but the method is less direct.
In your case you actually use #wa 200 in zmud. There is an equivalent command in VBScript, but the script doesn't let the program continue to do other things while this happens. It would freeze everything for 200 milliseconds. DoAfter actually creates a temporary, self deleting, timer that sends the command. Because timers are part of the client, not the script, they can delay things without stopping everything else. |