Posts: 1,271
Threads: 399
Joined: Mar 2003
i need a hint:
how do i get the folder path of a macro ?
maybe as string member func ?
macro.getpath("THUMB_33821")
Posts: 12,147
Threads: 143
Joined: Dec 2002
qmitem can get parent folder id. Repeat qmitem until parentid is 0.
Function GetQmItemPath
;/
function VARIANT'item str&s ;;item can be name or id
;Gets QM item path.
;item - item name or id (see qmitem in help).
;s - receives full path.
;EXAMPLE
;str s
;GetQmItemPath "CurDir" s
;out s
int iid
sel item.vt
,case VT_I4 iid=item.lVal
,case VT_BSTR iid=qmitem(s.from(item.bstrVal))
if(!iid) end ES_BADARG
s.all
QMITEM qi
rep
,qmitem iid 0 qi 17
,s.from("\" qi.name s)
,iid=qi.folderid
,if(!iid) break
Posts: 1,271
Threads: 399
Joined: Mar 2003
this is helpful for distributing qmscripts.