Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
End all running
#3
Macro end all threads
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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)