Sets the priority class for the specified process.
#Include <WinAPIEx.au3>
_WinAPI_SetPriorityClass ( $iPriority [, $PID] )
$iPriority | The priority class for the process. This parameter can be one of the following values. $ABOVE_NORMAL_PRIORITY_CLASS $BELOW_NORMAL_PRIORITY_CLASS $HIGH_PRIORITY_CLASS $IDLE_PRIORITY_CLASS $NORMAL_PRIORITY_CLASS $REALTIME_PRIORITY_CLASS Windows Vista or later $PROCESS_MODE_BACKGROUND_BEGIN $PROCESS_MODE_BACKGROUND_END |
$PID | [可选参数] The PID of the process. Default (0) is the current process. |
成功: | 返回 1. |
失败: | 返回 0 并设置 @error 标志为非 0 值. |
在MSDN中搜索
#Include <APIConstants.au3>
#Include <WinAPIEx.au3>
Run(@SystemDir & '\taskmgr.exe')
_WinAPI_SetPriorityClass($HIGH_PRIORITY_CLASS)
MsgBox(64 + 262144, '', 'Look what priority class has the "' & _WinAPI_PathStripPath(FileGetLongName(@AutoItExe)) & '" (' & @AutoItPID & ') process.' & @CR & @CR & 'Should be "High".')
_WinAPI_SetPriorityClass($IDLE_PRIORITY_CLASS)
MsgBox(64 + 262144, '', 'Look what priority class has the "' & _WinAPI_PathStripPath(FileGetLongName(@AutoItExe)) & '" (' & @AutoItPID & ') process.' & @CR & @CR & 'Should be "Low".')