Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to pass string in a function
#5
To check whether current function is running, use getopt(nthreads):

Code:
Copy      Help
if(getopt(nthreads)>1)
,out "this function is already running"

To check whether some other function is running, you need QM 2.1.7 or later. Function IsFunctionRunning:

Code:
Copy      Help
;/
function# $functionname

;Returns 1 if function is running, 0 if not.

;EXAMPLE
;if(IsFunctionRunning("MyFunc"))

,;out "MyFunc is running"


int i n=EnumQmThreads(0 0 0 0)
ARRAY(QMTHREAD) a.create(n)
for i 0 EnumQmThreads(&a[0] n 0 0)
,_s.getmacro(a[i].qmitemid 1)
,if(_s~functionname) ret 1


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)