|
楼主 |
发表于 2008-9-22 16:53:37
|
显示全部楼层
$begin = TimerInit()
$dif = 0
$i=0
While 1
do
$dif = TimerDiff($begin)
Until $dif >= 300000
;----------------------------------------------------------------------------------
; 列出所有进程
$list = ProcessList()
for $i = 1 to $list[0][0]
;msgbox(0,"",$list[$i][0])
Check_kill($list[$i][0])
next
Func Check_kill($task)
$file = FileOpen("test.txt", 0)
; Check if file opened for reading OK
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
; Read in lines of text until the EOF is reached
While 1
$line = FileReadLine($file)
If $task = $line Then ExitLoop
If @error = -1 Then
MsgBox(0, "提示","由于文件允许列表没有: " &$task &" 程序将结束该进程^_^!!!")
ProcessClose($task)
ExitLoop
EndIf
;MsgBox(0, "Line read:", $line)
Wend
FileClose($file)
EndFunc
;------------------------------------------------------------------------------------
$begin = TimerInit()
$dif = 0
WEnd
(16,1) : ERROR: missing Wend.
Func
(4,1) : REF: missing Wend.
While
(41,1) : ERROR: syntax error
WEnd
2 error(s), 0 warning(s)怎么解决啊? |
|