Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with window specific toolbar functions
#3
This is for your toolbar (Dont run more then one Macro)

Create this function

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

Macro or Function in Toolbar:
Code:
Copy      Help
rep 10
,if(IsFunctionRunning("type in function here"))
,,out "Function is Running" ;;use this to test
,;;Add what you would like the function to do if this function is already running
You can either do this OR Ctrl+P and set function to single instance.
Smile 8)


Messages In This Thread

Forum Jump:


Users browsing this thread: 10 Guest(s)