找回密码
 加入
搜索
查看: 1468|回复: 7

如何设置一个进程的优先级!!!

  [复制链接]
发表于 2009-12-28 11:05:35 | 显示全部楼层 |阅读模式
本帖最后由 ailuzhen 于 2009-12-28 23:40 编辑

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2009-12-28 11:48:35 | 显示全部楼层
不会,不过帮你顶..
发表于 2009-12-28 12:05:45 | 显示全部楼层
$iProcessID = ProcessExists("Notepad.exe")

$hProcess = DllCall("Kernel32.dll", "hWnd", "OpenProcess", "dword", 0x200, "int", 0, "dword", $iProcessID)
If Number($hProcess[0]) < 1 Then Exit(Msgbox(48, "Error", "Error opening process."))
$iResult = DllCall("Kernel32.dll", "int", "SetPriorityClass", _
                "hWnd", $hProcess[0], "dword", 0x80) ; 0x80 = High.
DllCall("Kernel32.dll", "int", "CloseHandle", "hWnd", $hProcess[0])
If $iResult[0] Then Msgbox(0, "", "Succeed.")
SetPriorityClass - http://msdn.microsoft.com/en-us/library/ms686219(VS.85).aspx
发表于 2009-12-28 13:45:48 | 显示全部楼层
楼上的老大,我试过其它的进程可以,但是就是劲舞团的那个进程不行
发表于 2009-12-28 14:54:15 | 显示全部楼层
回复 4# yang3114


    可能这类的大型游戏都有防逆向和防外挂机制。个人觉得就算提升权限,上面的代码也不会正常工作。
发表于 2009-12-28 15:35:01 | 显示全部楼层
ProcessSetPriority ( "进程", 优先级 )


没事的时候多看看Au3的帮助

评分

参与人数 1金钱 +10 收起 理由
pusofalse + 10

查看全部评分

发表于 2009-12-28 15:56:00 | 显示全部楼层
本帖最后由 pusofalse 于 2009-12-28 16:59 编辑

- -|||| 惭愧,竟然没注意到有这个内置函数。
发表于 2010-1-1 19:15:47 | 显示全部楼层
哈哈,pusofalse老猫烧须.........
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-28 02:16 , Processed in 0.089327 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表