From a command prompt;
Code:
chdir "D:\path\to\scripts\dir"
nasc myscript.txt
Make sure you have a backup of ai.obj cause it will overwrite the one in that directory. The compilation overwrites ai.obj
Also, if the first line is not empty in your script, you may get errors.