Register to post in forums, or Log in to your existing account
 

 Related 
Contents
Miscellaneous
  #CR
  #DEBUGFILE
  #EXECUTE
  #FTP
  #HELP
  #MSS
  #NOOP
  #SCRIPT
  #SEND
  #SENDPROMPT
  #SENDRAW
  #SENDSB
  #SS
  #VERSION
  #WIZLIST
  %ansi
  %clip
  %color
  %colorname
  %exec
  %exp
  %expand
  %gsl
  %literal
  %mcp
  %mss
  %null
  %numparam
  %param
  %params
  %random
  %time
  Miscellaneous
Command Reference
  #nnn
  #ABORT
  #ACTION
  #ADD
  #ADDITEM
  #ADDKEY
  #AFK
  #ALARM
  #ALIAS
  #ALL
  #BACKUP
  #BEEP
  #BREAK
  #BUTTON
  #C-
  #C+
  #CALL
  #CAPTURE
  #CASE
  #CHARACTER
  #CLASS
  #CLOSE
  #CLR
  #CMD
  #COLOR
  #COM
  #CONDITION
  #CONFIGURE
  #CONNECT
  #CONTINUE
  #CR
  #CW
  #DBCLOSE
  #DBDELETE
  #DBFIRST
  #DBGET
  #DBLOAD
  #DBNEXT
  #DBOFFLINE
  #DBONLINE
  #DBPREV
  #DBPUT
  #DBRESET
  #DBSAVE
  #DDE
  #DEBUG
  #DEBUGFILE
  #DEFAULT
  #DELCLASS
  #DELITEM
  #DELKEY
  #DELNITEM
  #DESCRIBE
  #DIRECTION
  #DISCONNECT
  #DOOR
  #ECHO
  #ECHOPROMPT
  #EDITOR
  #ERASE
  #EVALUATE
  #EVENT
  #EXECUTE
  #EXECWIN
  #EXIT
  #FILE
  #FIND
  #FIRE
  #FORALL
  #FREEZE
  #FTP
  #FUNCTION
  #GAG
  #GAGBLOCK
  #GAGLOG
  #GAGOFF
  #GAGON
  #GAGSPACE
  #GAUGE
  #H-
  #H+
  #HELP
  #HIGHLIGHT
  #HISTLOAD
  #HISTORY
  #HISTSAVE
  #HOST
  #IF
  #IGNORE
  #IMAGE
  #INPUT
  #KEY
  #KILLALL
  #LAUNCH
  #LMAP
  #LOAD
  #LOCAL
  #LOCATION
  #LOG
  #LOOK
  #LOOP
  #LOOPDB
  #LOOPVIEW
  #LUA
  #MAKEROOM
  #MAKEWINDOW
  #MAP
  #MAPQUERY
  #MARK
  #MATH
  #MEDIA
  #MENU
  #MERGE
  #MESSAGE
  #MODULE
  #MOVE
  #MSS
  #MXP
  #MXPTRIG
  #NAME
  #NEW
  #NEWVAR
  #NODEF
  #NODIR
  #NOINPUT
  #NOMAP
  #NOOP
  #NOSAVE
  #OK
  #ONINPUT
  #PATH
  #PATHHIGH
  #PAUSE
  #PCOL
  #PICK
  #PLAY
  #PLUGIN
  #PORTAL
  #PRINT
  #PROMPT
  #PSUB
  #PUEBLO
  #PW
  #QUERY
  #QUEUE
  #RAISEEVENT
  #READ
  #RECALL
  #RECORD
  #REGEX
  #RENAME
  #REPEAT
  #RESET
  #RESUME
  #RESULT
  #RETRACE
  #RETURN
  #SAVE
  #SAY
  #SAYADD
  #SAYPROMPT
  #SCRIPT
  #SCROLL
  #SECTION
  #SEND
  #SENDGMCP
  #SENDPROMPT
  #SENDRAW
  #SENDSB
  #SESSION
  #SET
  #SETPROMPT
  #SHOW
  #SHOWARR
  #SHOWDB
  #SHOWPROMPT
  #SHOWTABLE
  #SIGNAL
  #SLOW
  #SORT
  #SQLCLOSE
  #SQLDB
  #SS
  #STATE
  #STATUS
  #STEP
  #STOP
  #STWIN
  #STYLE
  #SUBSTITUTE
  #SUSPEND
  #SWITCH
  #T-
  #T?
  #T+
  #TAB
  #TAG
  #TELEPORT
  #TEMP
  #TEMPVAR
  #THREAD
  #TIMER
  #TRACK
  #TRIGGER
  #TSET
  #TYPE
  #TZERO
  #UNALIAS
  #UNBUTTON
  #UNCLASS
  #UNDIR
  #UNGAG
  #UNKEY
  #UNEVENT
  #UNLOAD
  #UNLOC
  #UNMENU
  #UNPATH
  #UNPORTAL
  #UNSTYLE
  #UNTAB
  #UNTIL
  #UNTRIGGER
  #UNVAR
  #UPDATE
  #URL
  #VARFUNC
  #VARIABLE
  #VERBATIM
  #VERSION
  #VIEW
  #WAIT
  #WAITFOR
  #WAITSIGNAL
  #WAITTHREAD
  #WALK
  #WHILE
  #WINDOW
  #WITHLOC
  #WIZLIST
  #WRAP
  #WRITE
  #WRITELOG
  #YESNO
#EXECWIN [[cmud_#EXECW]] 
Added in v2.17
EXECWIN

Syntax: #EXECWIN windowname {commands}

Executes the specified commands in the specified window. This is similar to doing:

windowname:command;command;...

however it allows you to execute a multiline script. It also allows you to use a variable for the windowname.

You can only send commands to a single window. To send a command to all windows, use the #ALL command.

 User comments 
Tech: Thu Feb 21, 2008 7:49 am    

One should remember that the scope for commands executed with #EXECWIN is the scope of the window you specify. Recall that that all window scopes are private so if one of your commands (alias, functions, or even variable references) are in another window (or for that matter a private module); the command will not be accessible to the window you specify and will be sent to the mud as plain text.

To access these aliases, functions etc you have several options.

The first, and the one I recommend is to move the desired aliases and any other you need into a global module so that they will be readily accessible.
The second option is to copy the needed aliases to the window you are specifying (this is less flexible for obvious reasons).
The third option is to explicitly refer to the alias using the //WindowOrModuleName/VariableFunctionOrAliasName syntax.

(Gurus feel free to edit as necessary)
Anaristos: Sat Feb 23, 2008 4:55 am    

As I just learned with the help of Tech, #EXECWIN deffers from #EXEC in that the former expects a raw command sequence. This means that the commands to be executed cannot be stored in a variable. This could change in the future if Zugg adds a vartype of "command".
To execute a command sequence that is stored in a variable use the following code (Many thanks to Tech for this!):
Code:
#EXECWIN windowname {#EXEC @variablename}
Viewer Comments [2 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net