The Tk Remote Controller, or rmt, is one of the demo scripts that comes with Tk. It implements a simple remote-control mechanism for Tk applications, which allows you to select an application and then type commands to that application. The underlying IPC mechanism is the send command.

Tk Fossil repository location: http://core.tcl.tk/tk/artifact/ceb09feba7fdfdb5

Tkcon also provides this functionality, and more.

dislocate is an Expect script of similar utility, which may be useful if a GUI is not available.