optimize memory and image size. remove unnecessary language file
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
log("Hello world!!!");
|
||||
toast("Hello, AutoJs!");
|
||||
openConsole();
|
||||
console.show();
|
||||
@@ -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){
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user