Baritonomarchetto Posted July 4, 2012 Posted July 4, 2012 (edited) Hi all, what's the default priority on autoit script not defining "ProcessSetPriority" ? Normal (2)? Also: i want to change the priority of the script itslef: how can i detect the "self ID" of my script? Thanks PS: notice that in the online manual there's a broken link to "_ProcessGetPriority" Edited July 4, 2012 by Baritonomarchetto
hannes08 Posted July 4, 2012 Posted July 4, 2012 Baritonomarchetto, from the helpfile: @AutoItPID PID of the process in which the script is running. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Baritonomarchetto Posted July 4, 2012 Author Posted July 4, 2012 (edited) Thanks, I hadn't tought about looking at macros I am trying to change the priority loading a value from a ".ini" with a script like: #include <Process.au3> Local $priority= IniRead(".celler.ini", "misc", "priority", "0") ProcessSetPriority("celler.au3", $priority) $i_Priority_Level = _ProcessGetPriority(@AutoItPID) MsgBox(0, "AutoIt Script", "Should be 0: " & $i_Priority_Level) ... but it always returns the default value (2), whatever i define in the "iniRead" string or ".ini" file ... what could be wrong with it? Thanks Edited July 4, 2012 by Baritonomarchetto
hannes08 Posted July 4, 2012 Posted July 4, 2012 (edited) By default all programs run as normal priority. You can programatically change that, but it is not recommended to go higher than "high" (that means real-time), because you're going to get your PC unresponsive. Edited July 4, 2012 by hannes08 Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Baritonomarchetto Posted July 4, 2012 Author Posted July 4, 2012 Thanks, i know that toying with priority levels is not recommended . May i ask you to take a look at the little script i wrote in the previous post for "priority check/change"?
hannes08 Posted July 4, 2012 Posted July 4, 2012 Use the @AutoItPID macro in both function calls: ProcessSetPriority and _ProcessGetPriority Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now