Scripts inside aliases no longer working

Posted by Krenath on Wed 29 May 2002 04:38 PM — 3 posts, 15,005 views.

USA #0
Whether by accident or design, it was previously possible to add script commands to an alias without creating a subroutine in the script file.

All one had to do was add a line to the Send: text that started with a /. Everything after the slash was executed as script, exactly as if it were entered from the command window.

Currently, Version 3.22 sends the Send: text to the world, complete with leading /

This was a feature I had been using extensively, because it saved a good deal of work writing script subroutines to support the various aliases.

If this is something that can be resurrected, would it be possible to allow "Expand Variables" to expand the variables before the script parser gets its hands on the Send: text?

I'd like to have an alias work line so:

Alias: Target *
Send: /world.Setvariable "Target","%1"

Alias: Attack
Send: /World.Send "Attack " & World.GetVariable("Target")

Sure, I can write script routines to accomplish this, but even with my new approach of using multiple script files in a 'modules' directory (which I'll detail elsewhere), my script files are getting quite long and complicated...

Oh yeah, this feature does indeed still work for "Macros", allowing me to call scripts by pressing function keys. This is yet another feature I use extensively and hope MUSHclient will retain.
Amended on Wed 29 May 2002 04:42 PM by Krenath
Australia Forum Administrator #1
This was not deliberately removed (not recently). Testing under version 3.17, which had been the current version for around a year, reveals identical behaviour to what you describe, namely the alias script is not evaluated.
Australia Forum Administrator #2
The new plugins feature might solve the problem of long and complex script files.