开始的问题已经解决,不过还有个新的问题要了解一下,请高手们再指点一下,学习学习:比如结束360进程,无法结束,但我想它提示为“些进程无法结束”或者用另类方法将其进程真正结束也可以。
我开始的代码为:#include <GUIConstantsEx.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("明兵进程结束工具", 301, 101, 392, 324)
GUISetIcon("D:\autoit3\AU3TOOL.exe", -1)
$Label1 = GUICtrlCreateLabel("请输入要结束的进程名", 8, 40, 132, 25)
$Input1 = GUICtrlCreateInput("比如QQ", 144, 40, 113, 21)
$Button1 = GUICtrlCreateButton("结束进程", 128, 72, 65, 17)
$Button2 = GUICtrlCreateButton("退出程序", 216, 72, 65, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$prr=GUICtrlRead($Input1)& ".exe"
If $prr="" Then
MsgBox(16,"警告","进程名不能为空",2)
Else
If ProcessExists($prr) Then
MsgBox(0,"提示","进程存在,马上将结束",1)
ProcessClose($prr)
ElseIf Not ProcessExists($prr) Then
MsgBox(0,"提示","进程不存在,马上退出",1)
EndIf
EndIf
Case $Button2
Exit
EndSwitch
WEnd
|