Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shortcut to Kill all Running Threads
#1
Is there a GM shortcut to Kill all running threads similar to what PAUSE does to a running macro. I had a look and couldnt find it but i could just be blind. If its not there is there a quick macro i could hook up with a global trigger to accomplish the task? Trying to manually close threads that are bugged out and activating other windows is not fun
#2
Macro
Code:
Copy      Help
;kills all threads except some important threads

int i n=EnumQmThreads(0 0 0 0)
ARRAY(QMTHREAD) a.create(n)
for i 0 EnumQmThreads(&a[0] n 0 0)
,if(a[i].threadid=GetCurrentThreadId) continue ;;don't kill itself
,str name.getmacro(a[i].qmitemid 1)
,out name
,sel name
,,case ["ImportantThread","ImportantThread2"] ;;don't kill these
,,case else
,,shutdown -6 0 name
#3
Works like a charm, thanks!


Forum Jump:


Users browsing this thread: 1 Guest(s)