Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetQmItemNames fetches content from system folder
#3
Yes, it is that function.

I did an output of what was fetched:

Code:
Copy      Help
qm_snippet_navList        fullpath: \RR_QM_enhancements\__ACTIVE__\QM_popupmenu\qmpop_dialog_clips\checkbox
qm_snippet_navList        fullpath: \System\Functions\Window (*)
qm_snippet_navList        fullpath: \RR_QM_enhancements\__ACTIVE__\QM_popupmenu\qmpop_dialog_clips\ddlb
qm_snippet_navList        fullpath: \System\Functions\Control\ComboBox, ListBox\ListBox (*)

qm_snippet_navList = function
fullpath = container (variable)

The paths marked with the (*) should not be there in stead these should be retrieved:
fullpath: \RR_QM_enhancements\__ACTIVE__\QM_popupmenu\qmpop_dialog_clips\window
fullpath: \RR_QM_enhancements\__ACTIVE__\QM_popupmenu\qmpop_dialog_clips\listbox
both foldernames ('window' and 'listbox') are lowercase

When I run the provided code I get only one output:
Code:
Copy      Help
QM_popupmenu

it is a folder (subfolder of '__ACTIVE__')

edit:

Maybe this is the problem:
I used this code to get the item names to be stored in container "all_items":
GetQmItemNames(base_pth all_items)

Then I strip the "[" and "]" and "." and get the path using the function:
GetQmItemPath

But "GetQmItemPath" does not skip the system folders.

I think this is the problem.

edit2

Function qm_snippet_navList
Code:
Copy      Help
GetQmItemNames(process_pth all_items)

str regx_current_lvl_folder="^\["

foreach _s all_items
,if(findrx(_s regx_current_lvl_folder)>=0)    
,,str c=_s
,,;c.replacerx(regx_cleanup_item_1 "")
,,c.replacerx(regx_cleanup_item_2 "")
,,c.replacerx(regx_cleanup_item_3 "")
,,
,,;;SD5
,,midclick_menuname=c
,,midclick_menuname.findreplace(basemenu_name "")
,,
,,;;SD4
,,str x.getmacro(c 7)
,,int qid=val(x)
,,
,,;;SD2
,,str fullpath
,,GetQmItemPath qid fullpath
,,
,,;;SD3
,,GtPathOrFolder(fullpath before_bslash after_bslash)
,,
,,;;SD6
,,if(findrx(_s regx_filefolder)>=0)
,,,isfilefolder="folder"
,,else
,,,isfilefolder="file"            
,,
,,level=CharAmountCount(_s level_char)
,,out F"{_s.getmacro(getopt(itemid) 1)}        fullpath: {fullpath}"
,,if(findrx(fullpath basename)>=0)            

,,,;;       1      2                          3                        4                5                   6             7
,,,;;     [id] [full_item_pth] [after last bslash 'qmpop_%NAME%'] [menu item ID] [middle click menu name] [file / folder] [level]
,,,str sd1(cnt) sd2(fullpath) sd3(after_bslash) sd4(qid) sd5(midclick_menuname) sd6(isfilefolder) sd7(level)
,,,nav_list.AddRowSA(0 7 &sd1 0)
,,,;;SD1
,,,cnt=cnt+1
;
nav_list.Sort(4 0)


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)