optimize memory and image size. remove unnecessary language file

This commit is contained in:
hyb1996
2017-05-10 15:42:58 +08:00
parent e5ade55519
commit 1222e00adc
77 changed files with 590 additions and 436 deletions

View File

@@ -5,11 +5,11 @@ var dialogs = {};
dialogs.rawInput = function(title, prefill){
prefill = prefill || "";
return __runtime__.dialogs.rawInput(title, prefill);
return String(__runtime__.dialogs.rawInput(title, prefill));
};
dialogs.input = function(title, prefill){
return eval(dialogs.rawInput(title, prefill) + "");
return eval(dialogs.rawInput(title, prefill));
}
dialogs.prompt = dialogs.rawInput;
@@ -25,6 +25,9 @@ dialogs.confirm = function(title, prefill){
}
dialogs.select = function(title, items){
if(items instanceof Array){
return __runtime__.dialogs.select(title, items);
}
return __runtime__.dialogs.select(title, [].slice.call(arguments, 1));
}

View File

@@ -1,3 +1,3 @@
log("Hello world!!!");
toast("Hello, AutoJs!");
openConsole();
console.show();

View File

@@ -1,5 +1,5 @@
var num1 = dialogs.input("请输入第一个数字");
var op = dialogs.singleChoice("请选择运算", 0, "加", "减", "乘", "除", "幂");
var op = dialogs.singleChoice("请选择运算", ["加", "减", "乘", "除", "幂"]);
var num2 = dialogs.input("请输入第二个数字");
var result = 0;
switch(op){

View File

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