Send command to specific window

Posted by Wraithian on Fri 06 Feb 2004 10:43 PM — 2 posts, 14,166 views.

USA #0
Hi.

How do I send a command from one world window to another?

Example: I have two world windows open: mud1 and mud2. I want to send, from mud1, to mud2 the command "heal chicken"... Furthermore, I want to make an alias that will let me do this.

Any help? Please.
Australia Forum Administrator #1
Yes, you can do that. See this page:

http://www.gammon.com.au/scripts/doc.php?function=GetWorld

Here is what you could do in an alias:


set otherworld = world.getworld ("mud2")

if not (otherworld is nothing) then
  otherworld.send "heal chicken"
  set otherworld = nothing  
end if



Put all that in the "send" box and set the alias to "send to script".