autoit 发表于 2008-5-3 14:20:45

对窗口进程进行监控的小工具

<p>这个是把左下角的托盘图标隐掉,加了 Ctrl+Alt+F12退出</p><p>Opt(&quot;RunErrorsFatal&quot;, 0)<br />Opt(&quot;WinTitleMatchMode&quot;, 2)<br />Opt(&quot;TrayIconHide&quot;, 1)<br />HotkeySet(&quot;!^{F12}&quot;, &quot;exit_0&quot;)<br />$inikey=&quot;windows&quot;<br />While 1<br />&nbsp;Sleep(80)<br />&nbsp;$var = IniReadSection(@ScriptDir&amp;&quot;&#92;sysfile.ini&quot;, $inikey)<br />&nbsp;If @error Then <br />&nbsp;&nbsp;MsgBox(4096, &quot;&quot;, &quot;no INI file.&quot;)<br />&nbsp;&nbsp;Exit<br />&nbsp;Else<br />&nbsp;&nbsp;For $i = 1 To $var<br />&nbsp;&nbsp;&nbsp;If $inikey=&quot;windows&quot; Then<br />&nbsp;&nbsp;&nbsp;&nbsp;If WinExists($var[$i]) then WinClose($var[$i])<br />&nbsp;&nbsp;&nbsp;ElseIf &nbsp;$inikey=&quot;proc&quot; Then<br />&nbsp;&nbsp;&nbsp;&nbsp;If ProcessExists($var[$i]) Then ProcessClose($var[$i])<br />&nbsp;&nbsp;&nbsp;ElseIf &nbsp;$inikey=&quot;lock&quot; Then&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;If Not ProcessExists($var[$i]) Then <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Run($var[$i],&quot;&quot;,@SW_HIDE)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If @error Then Run(@ComSpec &amp; &quot; /c &quot; &amp; $var[$i], &quot;&quot;, @SW_HIDE)<br />&nbsp;&nbsp;&nbsp;&nbsp;EndIf&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;EndIf&nbsp;<br />&nbsp;&nbsp;Next<br />&nbsp;EndIf<br />&nbsp;If $inikey=&quot;windows&quot; Then <br />&nbsp;&nbsp;$inikey=&quot;proc&quot;<br />&nbsp;&nbsp;ContinueLoop<br />&nbsp;ElseIf &nbsp;$inikey=&quot;proc&quot; Then<br />&nbsp;&nbsp;$inikey=&quot;lock&quot;<br />&nbsp;&nbsp;ContinueLoop&nbsp;&nbsp;<br />&nbsp;ElseIf &nbsp;$inikey=&quot;lock&quot; Then&nbsp;<br />&nbsp;&nbsp;$inikey=&quot;windows&quot;<br />&nbsp;EndIf<br />WEnd<br />Func exit_0()<br />&nbsp;exit<br />EndFunc&nbsp;</p>

pingfan5888 发表于 2009-10-8 14:10:14

不错。。...

zghkbl 发表于 2009-12-16 23:27:12

很好很人性化

nxbigdaddy 发表于 2009-12-17 00:29:14

没明白是做什么的!

zhenxin 发表于 2010-4-17 11:22:09

不是很明白

mybkc 发表于 2010-10-30 23:26:24

不大明白!!

mjljy2012 发表于 2012-3-10 18:13:47

{:face (355):}

游戏 发表于 2012-3-10 19:49:45

谢谢楼主分享

pf12154 发表于 2012-3-10 22:05:48

谢谢楼主分享

pchome2000 发表于 2012-4-6 19:31:36

{:face (327):}         谢谢分享,测试一下
页: [1]
查看完整版本: 对窗口进程进行监控的小工具