Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
End all running
#1
What would I need to do to end all running functions and macros?
#2
You could bounce QM with, though that may be a more ham-handed approach than you are willing to accept. it does, however, clear all the memory allocations 80)

Macro Macro
Code:
Copy      Help
shutdown -2
An old blog on QM coding and automation.

The Macro Hook
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)