01-05-2010, 08:42 AM
Function GetQmItemNames
Function GQIN_Enum
example
Macro Macro1288
;/
function $folder str&s [flags] ;;flags: currently not used
;Gets list of QM items in a QM folder and subfolders.
;Folders named "private" and "System" are excluded.
;folder - folder name or path ("\folder1\folder2"). Use "" to include all macros.
;s - variable that receives the list.
type __GQIN_DATA str*sp str'st level flags htv
__GQIN_DATA d.sp=&s
d.flags=flags
d.htv=id(2202 _hwndqm)
s.len=0
EnumQmFolder folder 1 &GQIN_Enum &d
Function GQIN_Enum
;/
function# iid QMITEM&q level __GQIN_DATA&d
int i r f=q.itype=5
;skip some folders
if(f)
,sel(q.name) case ["private","System"] r=1; goto g1
,if(!SendMessage(d.htv TVM_GETNEXTITEM TVGN_CHILD q.htvi)) r=1; goto g1
d.st.all(level 2 '.') ;;indentation
if(f) d.sp.formata("%s[%s][]" d.st q.name)
else d.sp.formata("%s%s[]" d.st q.name)
;g1
d.level=level
ret r
example
Macro Macro1288