|
急急急!
小弟第一次上来提问,请各位高手多多指教。
#include <Process.au3>
;#Include <WinAPI.au3>
$i=iniread("config.ini","status","total","1")
$j=iniread("config.ini","status","status","1")
$sleep=iniread("config.ini","status","sleep","3600")
if int($i) >= int($j) Then
word($sleep)
$j=$j+1
IniWrite("config.ini","status","status",$j)
sleep(10000)
shutdown(2)
Else
msgbox(0,"","finish")
EndIf
Func word($sleep)
sleep($sleep*1000)
run("cmd")
sleep(500)
WinActivate("cmd")
sleep(1000)
send('"test.xls"'&@CRLF)
$begin=TimerInit()
WinWaitActive("test","robbin")
;监控PDF的打开时间,直到窗口弹出
$opentime=TimerDiff($begin)
FileWriteLine("opentime.txt",$opentime)
sleep(20000)
processClose("cmd.exe")
$close=TimerInit()
winClose("test")
ProcessWaitClose("EXCEL.exe")
$closetime=TimerDiff($close)
FileWriteLine("closetime.txt",$closetime)
EndFunc
这段程序我用WORD的时候是没问题的能正常监控WORD窗口的打开时间
但是换成EXCEL和PDF(ADOBE 9.0)就有问题了。
WORD,EXCEL,PDF文件名都叫test
请问版上各位WinwaitActive 和WinWait 不能监控PDF或者EXCEL窗口么,还是有什么我没考虑到的地方,多谢多谢。 |
|