send - Execute a command in a different application http://www.purl.org/tcl/home/man/tcl8.4/TkCmd/send.htm send ?options? app cmd ?arg arg ...? This command arranges for cmd (and args) to be executed in the application named by app. It returns the result or error from that command execution. App may be the name of any application whose main window is on the display containing the sender's main window; it need not be within the same process. If no arg arguments are present, then the command to be executed is contained entirely within the cmd argument. If one or more args are present, they are concatenated to form the command to be executed, just as for the eval command. If the initial arguments of the command begin with "-" they are treated as options. The following options are currently defined: '''-async''' Requests asynchronous invocation. In this case the send command will complete immediately without waiting for cmd to complete in the target application; no result will be available and errors in the sent command will be ignored. If the target application is in the same process as the sending application then the -async option is ignored. '''-displayof''' ''pathName'' Specifies that the target application's main window is on the display of the window given by pathName, instead of the display containing the application's main window. -- Serves no purpose except to terminate the list of options. This option is needed only if app could contain a leading "-" character. (From: Tk help) ---- Send is a revelation. Many Tk (and even Tcl) programmers claim it as indispensable. Start by reading the distribution documentation [http://dev.scriptics.com/man/tcl8.4/TkCmd/send.htm]. ---- Can different Tk bindings communicate through send? Yes--Perl/Tk, Tcl/Tk, and [Tkinter] are all happy sending messages to each other with built-in send. At some point, we need to present examples of this ... [Steve Lidie] devotes an entire chapter of his unpublished book to send. ---- Start small with your send programming. Use a couple of simple Tk instances, to work out the security and application-name issues. Once those are properly settled, it's usually quick work to automate as much as you choose. ---- CAVEAT: The Tk send command depends on working with an X server and thus does not work normally on Windows or MacOS. Check out dde for Windows and Tcl's AppleScript support for Mac. ---- See also [comm], [dde], and other methods listed in the [Inventory of IPC methods]. ---- [Tk syntax help] - [Arts and crafts of Tcl-Tk programming] - [Category Command], part of the [Tk] package