add console.rawInput, app.intent

This commit is contained in:
hyb1996
2017-05-09 00:58:16 +08:00
parent 0349c113ca
commit 08654b8f90
31 changed files with 663 additions and 90 deletions

View File

@@ -0,0 +1,8 @@
//显示控制台
console.show();
console.verbose("这是灰色");
console.log("这是黑色");
console.info("这是红色");
console.warn("这是蓝色");
console.error("这是绿色=_=");

View File

@@ -0,0 +1,13 @@
var sh = new Shell();
sh.setCallback({
onNewLine: function(str){
console.log(str);
}
})
console.show();
console.info("请输入要运行命令:");
do {
var cmd = console.rawInput();
sh.exec(cmd);
}while(cmd != "exit");
sh.exit();