Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get macro path
#1
i need a hint:

how do i get the folder path of a macro ?
maybe as string member func ?

macro.getpath("THUMB_33821")
pi
#2
qmitem can get parent folder id. Repeat qmitem until parentid is 0.

Function GetQmItemPath
Code:
Copy      Help
;/
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
#3
this is helpful for distributing qmscripts.
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)