对于几乎零基础的俺来说,各种语法实在是傻傻分不清楚.
aardio的确是个好东西,居然从零开始,对着帮助手册写出了个测试工具,简单实用,good.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
import win.ui; import fsys.dlg
mainForm = win.form(text="简单的测试辅助工具";right=599;bottom=47) mainForm.add( button={cls="button";text="浏览";left=415;top=12;right=495;bottom=36;dr=1;dt=1;font=LOGFONT(name='微软雅黑';h=-14);z=2}; button2={cls="button";text="载入";left=507;top=12;right=587;bottom=36;dr=1;dt=1;font=LOGFONT(name='微软雅黑';h=-14);z=3}; edit={cls="edit";text="文件路径";left=12;top=12;right=403;bottom=36;acceptfiles=1;aw=1;color=-1;dl=1;dr=1;dt=1;edge=1;font=LOGFONT(name='微软雅黑';h=-14);multiline=1;tabstop=1;z=1} )
filepath = mainForm.edit.text;
mainForm.edit.oncommand = function(id,event){
if(filepath == "文件路径"){ if(event == 0x100){ owner.text = ""; } return ; } return ; }
mainForm.button.oncommand = function(id,event){ var str = fsys.dlg.open("动态库|*.dll|所有文件|*.*|"); mainForm.edit.text = str; }
mainForm.button2.oncommand = function(id,event){
var filepath = mainForm.edit.text; var dllname = string.endWith("dll","dll");
if(filepath == ""){ mainForm.msgbox("请选择或输入文件路径"); return ; } elseif(dllname == false){ mainForm.msgbox("只支持dll文件载入"); } else {
try{ raw.loadDll(filepath); }
win.msgboxTimeout("已经执行载入","提示",2000); }
return ; }
mainForm.show(); win.loopMessage();
|