Code: Select all
"Right-Click on White in File List"
$newFlags = "ru";
$cntIndent = 6;
$newItems = "";
$folders = listfolder("<xydata>\NewItems",, 2);
$files = listfolder("<xydata>\NewItems",, 1);
foreach($item, $folders . "|" . $files,, "e") {
$caption = gpc($item, "file");
$captionTrimmed = regexreplace($caption, "^New ", "");
$data = 'new("' . $caption . '"' . ((exists($item) == 2) ? ', "dir"' : ", ") . ",'" . $item . "'," . (($newFlags) ? ' "' . $newFlags . '")' : ")");
$icon = $item;
$newItems .= strrepeat(" ", $cntIndent) . $captionTrimmed . ";" . $data . ";" . $icon . <crlf>;
}
$menu =
<<<MENU
New Folder;#231
New Text File;#234
-
Refresh;#1001
-
Paste;#202
-
New
$newItems
MENU;
$selected = popupnested($menu);
if (strpos($selected, "#") != -1) { eval("""$selected"""); }
else { eval($selected); }
Is it possible to have the items from the NewItems folder as a part of the main pop-up menu? Like this:
Code: Select all
New Folder
New Text File
New Markdown File
New InDesign File
-----------
Refresh
-----------
Paste
XYplorer Beta Club