請選擇 進入手機版 | 繼續訪問電腦版

微剋多資訊

 找回密碼
 註冊

Sign in with google

Google帳號登入

搜索

該用戶從未簽到

升級   0%

發表於 2012-9-4 11:02 | 顯示全部樓層 |閱讀模式
  1. #include <Process.au3>
  2. Opt("WinTitleMatchMode", 3)
  3. Opt("MustDeclareVars", 1)

  4. _Main()

  5. Func _Main()
  6.         Dim $Pid
  7.         HotKeySet("{ESC}", "_Exit")
  8.         $Pid = InputBox ("隱藏工作程序", "請輸入PID,或程序名稱。")
  9.         If $Pid = "" Then Exit
  10.         While 1
  11.                 _ProcessNameHide($Pid)
  12.         WEnd
  13. EndFunc

  14. Func _ProcessNameHide($i_PID)
  15.         Dim Const $LVM_DELETEITEM = 0x1008
  16.         Dim $sProcessName, $iProcessIndex, $h_listview
  17.         Dim $TaskmgrName = "Windows 工作管理員"

  18.         If StringIsDigit ($i_PID) = 1 Then
  19.                 $sProcessName = _ProcessGetName($i_PID)
  20.         Else
  21.                 $sProcessName = $i_PID
  22.         EndIf

  23.         If Not ProcessExists($sProcessName) Then Exit

  24.         If WinExists ($TaskmgrName) Then
  25.                 If $sProcessName <> 1 Then
  26.                         $iProcessIndex = ControlListView($TaskmgrName, "", 1009, "FindItem", $sProcessName)
  27.                         If $iProcessIndex = -1 Then

  28.                                 Sleep(2)
  29.                         Else
  30.                                 $h_listview = ControlGetHandle($TaskmgrName, "", 1009)
  31.                                 DllCall("user32.dll", "int", "SendMessage", "hwnd", $h_listview, "int", $LVM_DELETEITEM, "int", $iProcessIndex, "int", 0)
  32.                         EndIf
  33.                 EndIf
  34.         EndIf
  35. EndFunc

  36. Func _Exit()
  37.         Exit
  38. EndFunc
複製代碼
樓主熱門主題
您需要登入後才可以回帖 登入 | 註冊

本版積分規則

小黑屋|Archiver|微剋多資訊(MicroDuo)

GMT+8, 2024-3-28 23:36

Discuz! X

© 2009-2023 Microduo

快速回覆 返回頂部 返回列表