09-07-2026, 06:20 AM
Better solution - probably no.
Macro Get unknown identifiers from errors in QM output
Macro Get unknown identifiers from errors in QM output
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)))