Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check if function called by a macro is running
#1
Function "tempf10" is called by macro "temp15" or - equivalent - by a toolbar. I wonder whether there exists a way to check if "tempf10" is running, inasmuch as QM-Threads window displays "temp15" only. Tnak you in advance for any advice.

Macro temp15
Code:
Copy      Help
tempf10

Function tempf10
Code:
Copy      Help
mes "Test"
#2
Macro temp15
Code:
Copy      Help
out "calling tempf10"
tempf10
out "tempf10 returned"
Function tempf10
Code:
Copy      Help
lock tempf10
mes "Test"
Function Check_if_function_called_by_a_macro_is_running
Code:
Copy      Help
lock tempf10 "" 0; err int running=1
lock- tempf10
out running
#3
Maybe this is better.

Macro temp15
Code:
Copy      Help
out "calling tempf10"
tempf10
out "tempf10 returned"
Function tempf10
Code:
Copy      Help
#compile "__AutoResetVariable"
int+ g_tempf10Running; AutoResetVariable x.Init(g_tempf10Running 1)
mes "Test"
Function Check_if_function_called_by_a_macro_is_running
Code:
Copy      Help
int+ g_tempf10Running
out g_tempf10Running


Attached Files
.qml   AutoResetVariable.qml (Size: 5 KB / Downloads: 314)
#4
Perfect, many thanks indeed!


Forum Jump:


Users browsing this thread: 1 Guest(s)