Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Bug reports ➜ 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 page


Posted by Krenath   USA  (76 posts)  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
Top

Posted by Nick Gammon   Australia  (23,133 posts)  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
Top

Posted by Nick Gammon   Australia  (23,133 posts)  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
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.


11,633 views.

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

Go to topic:           Search the forum


[Go to top] top

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