Rajat
Joined: 28 Mar 2004 Posts: 1717
|
Posted: Fri Aug 20, 2004 6:51 pm Post subject: Instant process priority alteration |
|
|
To instantly give an application more CPU time to make it faster, or to make it a low priority so as it uses CPUonly when its available use this script.
I used to alter priorities for tasks like Divx compression, making it low priority and using my computer normally so as to allow it to use only freely available CPU time and not hog it when its required by other active tasks.
call it using a hotkey from your 24/7 script or turn it into a hotkey function.
(uses the new process cmd)
| Code: |
; allows cmd line params to be sent
; script.ahk PID
IfEqual, 1,, WinGet, curr_pid, PID, A
Else SetEnv, curr_pid, %1%
Menu, priority, add, Realtime, Change_Priority
Menu, priority, add, High, Change_Priority
Menu, priority, add, Above Normal, Change_Priority
Menu, priority, add, Normal, Change_Priority
Menu, priority, add, Below Normal, Change_Priority
Menu, priority, add, Low, Change_Priority
Menu, priority, add
Menu, priority, add, Kill Process, Kill_Process
Menu, priority, show
Exit
Change_Priority:
StringLeft, new_priority, A_ThisMenuItem, 1
Process, Priority, %curr_pid%, %new_priority%
Return
Kill_Process:
Process, Close, %curr_pid%
Return
|
_________________
 |
|