Map multiple CScript commands to a single key

Question :

Can I map multiple CScript commands to a single key?

Answer :

Yes, by separating them with semicolons. For example, the following string can be mapped to a key:

te.cls();te.displaynl("Hello World!");

This script will clear the screen, then display "Hello World!" on a single line.

Question :

I need to map an entire script to a key, though. Is there some way I can do that with just one command?

Answer :

The CompileFile() command will do that. The format for the command is:

CompileFile("scriptname.cs");

Replace "scriptname.cs" with the name of your script. The quotation marks are required.