|
Problem about Send to Execute
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Lidi
China (6 posts) bio
|
| Date |
Sat 10 Sep 2005 06:19 AM (UTC) [ quote
] |
| 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) [ quote
] |
| 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) [ quote
] |
| Message |
I am using lua.
Script Error:
[string "Command line"]:2: `=' expected near `test' | top |
|
| Posted by |
Nick Gammon
Australia (18,772 posts) bio
Forum Administrator |
| Date |
Reply #3 on Sun 18 Sep 2005 06:07 AM (UTC) [ quote
] 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.
2,561 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )