aardio关闭打开进程调用句柄

admin2021-01-20  2.7K+

import win.ui;
import win.util.tray;
import console;
import process;
import thread;
import winex;
import winex.mouse;
import winex.key;
/*DSG{{*/
mainForm = win.form(text="调用测试";right=884;bottom=469;topmost=1)
mainForm.add(
button={cls="button";text="启动调用程序";left=10;top=80;right=210;bottom=105;z=1};
button2={cls="button";text="生成上传";left=10;top=45;right=210;bottom=70;z=4};
button3={cls="button";text="关闭调用";left=10;top=115;right=210;bottom=140;z=5};
cc={cls="combobox";left=50;top=10;right=210;bottom=35;edge=1;items={};mode="dropdown";z=2};
custom={cls="custom";text="自定义控件";left=130;top=190;right=640;bottom=375;z=6};
static={cls="static";text="账号";left=10;top=10;right=50;bottom=35;center=1;transparent=1;z=3}
)
/*}}*/
mainForm.button.oncommand = function(id,event){
    process.kill("调用程序.exe");
    process_test=process("路径/调用程序.exe");
    winex.waitActive(process_test);
    mainForm.hitmin();  
    dddd=winex.find(,"通过标题查找程序句柄");
    var login_form={
        username=winex.fromClientPoint(dddd,400,115);
        password=winex.fromClientPoint(dddd,400,170);
        submit=winex.fromClientPoint(dddd,400,275);
    }
    winex.key.send(login_form.username,"username")
    winex.mouse.click(login_form.submit)    
}
mainForm.button3.oncommand = function(id,event){
    process.kill("调用程序.exe");
}
mainForm.show();
return win.loopMessage();
转载请注明原文地址: https://aardio.net/read-139.html
最新回复(0)
aardio问答
aardio编程语言