[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  Scripts inside aliases no longer working

Scripts inside aliases no longer working

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Krenath   USA  (76 posts)  [Biography] bio
Date Wed 29 May 2002 04:38 PM (UTC)

Amended on Wed 29 May 2002 04:42 PM (UTC) by Krenath

Message
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.

- Krenath from
bDv TrekMUSH
ATS TrekMUSH
TNG TrekMUSE
TOS TrekMUSE
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 29 May 2002 11:50 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (22,973 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Thu 30 May 2002 04:06 AM (UTC)
Message
The new plugins feature might solve the problem of long and complex script files.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


10,393 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]