Most likely too late now, as far as backward compatibility is concerned.L (or Low), B (or BelowNormal), N (or Normal), A (or AboveNormal), H (or High), R (or Realtime).
Thread Priority Values
Thread Priority Values
Rather than one navigating through -2147483648 to 2147483647 for thread priority values, perhaps it would have been be more consistent to offer (quoted from Process):
itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
Re: Thread Priority Values
What do you mean?
Priority: Changes the priority (as seen in Windows Task Manager) of the first matching process to Param3 and sets ErrorLevel to its Process ID (PID). If the PID-or-Name parameter is blank, the script's own priority will be changed. If there is no matching process or there was a problem changing its priority, ErrorLevel is set to 0.
Param3 should be one of the following letters or words: L (or Low), B (or BelowNormal), N (or Normal), A (or AboveNormal), H (or High), R (or Realtime). Note: Any process not designed to run at Realtime priority might reduce system stability if set to that level.
Re: Thread Priority Values
For example,
looks a little better than
That's all.
Code: Select all
Thread, Priority, B
Code: Select all
Thread, Priority, -1147483648
itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
Re: Thread Priority Values
As far as I understand it, "Thread Priority" makes no sense in the context of normal/below normal/etc
"Thread Priority" is for the author to manage the priority of pseudo-threads within his own app:
https://autohotkey.com/docs/misc/Threads.htm
"Thread Priority" is for the author to manage the priority of pseudo-threads within his own app:
https://autohotkey.com/docs/misc/Threads.htm
Re: Thread Priority Values
Note that the thread priority only affects interuption between threads of your script, it has nothing to do with the system priority as the Process, Priority affects. (As far as I understand)
You can do this, if you find it more convenient/readable.
Cheers.
You can do this, if you find it more convenient/readable.
Code: Select all
; Example
SetThreadPriority("Low")
SetThreadPriority(p){
; L (or Low), B (or BelowNormal), N (or Normal), A (or AboveNormal), H (or High), R (or Realtime).
static priority:={L:-2,B:-1,N:0,A:1,H:2,R:3}
Thread, Priority, priority[SubStr(p,1,1)]
return
}
Re: Thread Priority Values
Ah, okay thanks. SetThreadPriority deals with small discrete values where:
Wonder where they got -2147483648 to 2147483647 from then?A thread with a base priority level above 11 interferes with the normal operation of the operating system
itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
Re: Thread Priority Values
Did you even read the link I pasted? I already told you that AHK's Threads are not real OS threads..lmstearn wrote:Ah, okay thanks. SetThreadPriority deals with small discrete values where:Wonder where they got -2147483648 to 2147483647 from then?A thread with a base priority level above 11 interferes with the normal operation of the operating system
Re: Thread Priority Values
Like to know a little more about AHK threads and their priority attributes.
Have fun!
Code: Select all
SetThreadPriority("Low")
SetThreadPriority(p){
; L (or Low), B (or BelowNormal), N (or Normal), A (or AboveNormal), H (or High), R (or Realtime).
;Gets out calculator to derive mean values:
static priority:={L:-1,610,612,735,B:-536,870,911,N:0,A:536,870,911,H:1,610,612,735,R:2147483647}
Thread, Priority, priority[SubStr(p,1,1)]
return
}
itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
Re: Thread Priority Values
It's not a choice AHK can make since this is Windows internal.lmstearn wrote:Like to know a little more about AHK threads and their priority attributes.Have fun!Code: Select all
SetThreadPriority("Low") SetThreadPriority(p){ ; L (or Low), B (or BelowNormal), N (or Normal), A (or AboveNormal), H (or High), R (or Realtime). ;Gets out calculator to derive mean values: static priority:={L:-1,610,612,735,B:-536,870,911,N:0,A:536,870,911,H:1,610,612,735,R:2147483647} Thread, Priority, priority[SubStr(p,1,1)] return }
Recommends AHK Studio
Who is online
Users browsing this forum: No registered users and 51 guests