Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get the list of all custom functions and member functions contained in a specified QM
#1
I often share the source code of a certain function with friends, but that function contains many of my custom functions and member functions, which are scattered in different folders. Because of this, every time (or when updating later) it takes a lot of time to organize them, which is not convenient.
I have tried using the shared folder method, but it still doesn't meet my needs.

So, I want to get the list of all custom functions and member functions contained in a specified QM function, and then export them programmatically.

I noticed that in the Make exe dialog shown below, there is an option to output this list to the output pane.
[Image: exe.png]

If possible, could you share the source code of that feature? I want to try using ChatGPT to modify the code to achieve the functionality I need.
Thank you very much.
#2
Not possible. The used functions are gathered during compilation, which is very complex.
#3
Is there any way to get the function name when a compilation error occurs? As shown in the figure below,

I want to import functions on demand through error handling, but first I need to obtain the function name. 

Or is there a better solution?
[Image: aaa.png]
#4
Better solution - probably no.

Macro Get unknown identifiers from errors in QM output
Code:
Copy      Help
str s; sub.SciGetText id(2201 _hwndqm) s ;;get QM output panel text

ARRAY(str) a
findrx(s "(?m)^Error in <open '':(\d+): /(\d+)''>.+:  unknown (?:identifier|member)." 0 4 a) ;;find all errors "unknown identifier"
int i
for i 0 a.len ;;for each error, find the unknown identifier
,int itemId=val(a[1 i]) ;;of QM item where is the error
,int pos=val(a[2 i]) ;;offset of the unknown identifier in code
,str text.getmacro(itemId) ;;get code
,str funcName
,findrx(text "\w+" pos 0 funcName)
,out funcName
,

;output error example
;Error in <open ":1: /12">Macro3690:  unknown identifier.


#sub SciGetText
function hwnd str&s
int lens=SendMessage(hwnd SCI.SCI_GETTEXTLENGTH 0 0)
s.fix(SendMessage(hwnd SCI.SCI_GETTEXT lens+1 s.all(lens)))


Forum Jump:


Users browsing this thread: 1 Guest(s)