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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  how to execute commands in "{}"s
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

how to execute commands in "{}"s

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

Posted by Vls87   (3 posts)  [Biography] bio
Date Fri 02 Jun 2006 10:00 AM (UTC)

Amended on Fri 02 Jun 2006 10:02 AM (UTC) by Vls87

example:wipe {123;wipe {456}}

how can i execute command "wipe" using "123;wipe {456}" as a parameter.
and then,execute command "wipe" again using "456" as a parameter

ps:"{}" can be replaced by other symbols

i'm a chinese.please forgive my poor english.^_^
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #1 on Fri 02 Jun 2006 10:17 AM (UTC)
You'll need to provide more details. It would be best to just describe what it is you are trying to do in the end.

From the looks of it, I get an impression that you are trying to chain two commands, but are just taking a long way around to doing it. For example, if {} symbols can change, then are you sure you need them at all?
[Go to top] top

Posted by Vls87   (3 posts)  [Biography] bio
Date Reply #2 on Sat 10 Jun 2006 01:12 PM (UTC)
for example:"b {}" is a command
this command is used to check busy.After confirm I'm not busy(this will cost some seconds),it will execute commands in "{}"

eg2:b {get flower;b {tear cloth;b {jump river}}}
"get flower" & "tear cloth" will cause busy.

firstly ,I check busy,
if not,then execute "get flower;b {tear cloth;b {jump river}}"
after "get flower",I will be busy.
Secondly , I check busy again,
if not,then execute "tear cloth;b {jump river}"
and so on...
[Go to top] top

Posted by Nick Gammon   Australia  (21,607 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Tue 13 Jun 2006 02:23 AM (UTC)
I'm not sure what you mean by "check busy" - is that a client or server thing?

Anyway, this alias will match things in {}:

  <send>%%1 = %1
%%2 = %2</send>

Assuming you do not have ";" set up as a command stack character, if I enter:

b {get flower;b {tear cloth;b {jump river}}}

It echoes:

%1 = b
%2 = get flower;b {tear cloth;b {jump river}}

Re-entering the second part (if it isn't busy, however you test that) I get:

%1 = get flower;b
%2 = tear cloth;b {jump river}

Then re-entering the second part again:

%1 = tear cloth;b
%2 = jump river

I think you would need to split up the first part at the semicolon (eg. using utils.split) so you could send each command separately.

I hope this answers your question.

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


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.


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 FutureQuest]