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 ➜ General ➜ Problem about Send to Execute

Problem about Send to Execute

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


Posted by Lidi   China  (6 posts)  Bio
Date Sat 10 Sep 2005 06:19 AM (UTC)
Message
Alias: test
Send to Execute:
/Note("test")
say test

It cannot work.
Help!
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Sat 10 Sep 2005 07:02 AM (UTC)
Message
What doesn't work about it?

Do you have scripting enabled (which language)?

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Lidi   China  (6 posts)  Bio
Date Reply #2 on Sat 10 Sep 2005 02:16 PM (UTC)
Message
I am using lua.
Script Error:
[string "Command line"]:2: `=' expected near `test'
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 18 Sep 2005 06:07 AM (UTC)

Amended on Sun 18 Sep 2005 06:10 AM (UTC) by Nick Gammon

Message
When you execute a command starting with the scripting prefix (ie. / in this case) then the entire command is considered a script, not just the first line. Thus "say test" is not a valid Lua statement.

You get the same effect if you enter a multi-line command in the command window, pressing Ctrl+Enter to start new lines. You only have to put "/" at the very start, and can have multi-line script statements in it.

To do what you are trying to do, try this:


/Note("test")
Send ("say test")


However then you may as well "send to script" and leave out the "/" on the first line.

Send to Execute is intended really to let you re-process aliases (or speedwalks). Eg. if "foo" is an alias, then doing this:


Alias: bar
Send to: execute
Send: foo


... would evaluate the alias "foo", whereas just send to world would simply send "foo", not what the alias turned it into.


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


15,773 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.