Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Current File and Current Macro
#9
Hello All,
I wrote a little function that can be put at the beginning of a function that outputs the current item (item from which is called this function) and the thread entry function (macro or function that started execution) ....

This was based on the above and something else in the forum which I can't find right now but also demonstrates how to use the context arguments of getopt in conjunction with getmacro, which can be a bit confusing.

Not sure yet what difference is between option 2 and 3.
Any thoughts or more elegant solutions, Gintaras?
S

Function OutCurrentAndThreadEntryMacros
Code:
Copy      Help
str cmacro tmacro;; current macro; thread entry macro,
tmacro.getmacro(getopt(itemid 3) 1);; thread entry function (macro or function that started execution)
cmacro.getmacro(getopt(itemid 1) 1);;current item (item from which is called this function)
out "------------------------[]Macro: %s called in thread: %s[]------------------------[]" cmacro tmacro


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)