Basic Console I/O
Command Line Arguments
app.Print(app.argc + " command line arguments:\n");
for(var i=0; i < app.argc; i++)
{
app.Print("argument " + (i+1).toString() + " = " + app.argv(i)+"\n");
}
Prompt User to Select a Function
app.Print("Please select a function:\n");
app.Print("T = Clean Temp Directory; C = Clean Cookies; X = Exit");
var f="";
while(f!="t" && f!="c" && f!="x")
{
var k=app.getch(false);
f=k.toLowerCase();
}
app.Print("\nYou have selected " + f.toUpperCase() + "\n");
Prompt User to Enter a Directory
var fo=null;
while(true)
{
var dir=app.Input("Please enter the directory: ");
fo=app.FindFile(dir);
if(fo.Valid? fo.AttributeDirectory : false)
{
break;
}
}
app.Print("\nThe directory is " + fo.FullPath + "\n");