跳出消息框后,程序就暂停了,也就不会继续执行后面的 Send()... , 除非用多线程或多进程监视这个可能弹出 ... afan 发表于 2010-7-9 17:26
举报
$a=ShellExecute("d:\aaa") If $a=0 Then Exit WinWaitActive("aa") If WinExists("aa") Then Send("{enter}") Else MsgBox(48,"2","文件存在",2) EndIf
回复 afan 呵呵,我们开始聊了,我再改下我的代码不过,我是按lz的意思改的, 写了这么多就不如你的那段 ... lchl0588 发表于 2010-7-9 18:05
您需要 登录 才可以下载或查看,没有账号?加入
$title = $CmdLine[1] While 1 If WinExists($title, 'Windows ') Then WinActive($title) Send('{enter}') Exit MsgBox(48, '这是监视程序弹出的', $title & ' 不存在 ') ElseIf WinExists('ok文件夹存在') Then Exit EndIf Sleep(1) WEnd
$title = 'C:\aaa' ShellExecute('1.au3', '"' & $title & '"') ShellExecute($title) Sleep(200) If WinActive('[CLASS:CabinetWClass]') Then MsgBox(64, 'ok文件夹存在', '文件夹存在')
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-5-3 16:55 , Processed in 0.148648 second(s), 14 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2025 Discuz! Team.