how to execute commands in "{}"s

Posted by Vls87 on Fri 02 Jun 2006 10:00 AM — 4 posts, 17,942 views.

#0
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.^_^
Amended on Fri 02 Jun 2006 10:02 AM by Vls87
Russia #1
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?
#2
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...
Australia Forum Administrator #3
I'm not sure what you mean by "check busy" - is that a client or server thing?

Anyway, this alias will match things in {}:


<aliases>
  <alias
   match="*{*}"
   enabled="y"
   send_to="2"
   sequence="100"
  >
  <send>%%1 = %1
%%2 = %2</send>
  </alias>
</aliases>


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.