;聚焦到输入窗口
ControlFocus("打开","","Edit1");等待10sWinWait("[CLASS:#32770]","",10);输入文件地址ControlSetText("打开","","Edit1","F:\test_liz\screenshot\jt1.jpg")Sleep(2000);点击打开按钮ControlClick("打开","","Button1")
参数化输入文件,和调用方法--将地址参数化为$CmdLine[1]
;聚焦到输入窗口
ControlFocus("打开","","Edit1");等待10sWinWait("[CLASS:#32770]","",10);输入文件地址ControlSetText("打开","","Edit1",$CmdLine[1])Sleep(2000);点击打开按钮ControlClick("打开","","Button1")
调用方法为
#file_path = r"F:\test_liz\screenshot\jt1.jpg"
#os.system(r"F:\test_liz\py_file\upfile.exe %s" %file_path)