How do I use MetaCard to build non-graphical programs?
Any UNIX MetaCard engine can be used execute scripts stored in text files instead of in stacks (this feature is not available on Win32 or MacOS engines). By convention, these script files should have a “.mt” extension. The script is executed by making it the first command line parameter (e.g., “mc sample.mt”). The scripts should contain an “on startUp” handler, which will be called when the script is executed. The script can read from its standard input with the statement “read from stdin until empty”, and can write to its standard output with “write x to stdout”. The “put” command without a destination container will also write the expression to stdout (normally it goes into the Message Box in this case).