正确答案已经有了,这里需要注意的是eval命令可以将字符串转换为可执行代码并且执行,只要看eval里面的内容就好.
直接通过console执行eval中的内容
unescape('var%20dlg%......20%7D')
得到的内容格式化一下
var dlg = new Window("palette", "关于");
var res =
"group {\
orientation:'column', alignment:['fill','fill'], \
aboutPnl: Panel { properties:{ borderStyle:'sunken' },\
aboutEt: EditText { text:'" +
"此脚本由Jeffrey R. Almasol开发 经展翅鹰汉化 QQ 867753667 博客http://blog.sina.com.cn/ykcmgzs BY 老鹰 2011.1.1 " +
"', properties:{multiline:true}, preferredSize:[280,150], alignment:['right','center'] } \
}, \
\
\
btnsGr: Group \
{ alignment:['fill','fill'], \
okBtn: Button { text:'博客地址', alignment:['left','center'] } \
visitBtn: Button { text:'OK', alignment:['right','center'] }, \
} \
\
}";
dlg.gr = dlg.add(res);
dlg.gr.btnsGr.visitBtn.onClick = function () {
dlg.close();
};
dlg.gr.btnsGr.okBtn.onClick = function () {
var url = "http://blog.sina.com.cn/ykcmgzs";
var cmd = "";
if ($.os.indexOf("Win") != -1) {
if (File("C:/Program Files/Mozilla Firefox/firefox.exe").exists) {
cmd += "C:/Program Files/Mozilla Firefox/firefox.exe " + url;
} else {
cmd += "C:/Program Files/Internet Explorer/iexplore.exe " + url;
}
} else {
cmd += 'open "' + url + '"';
}
try {
system.callSystem(cmd);
} catch (e) {
alert(e);
}
};
|