Simple help with context menu

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
John_C
Posts: 336
Joined: 16 May 2018 20:04

Simple help with context menu

Post by John_C »

This is a script to create custom "right-click on white in file list" menu.

When I select "New Folder", XY doesn't create it for me. The same for other menu items, they doesn't really work.

Code: Select all

"Right-Click on White in File List"
  $menu = <<<MENU
New Folder;#231
New Text File;#234
-
Paste;#202
-
Refresh;#1001
  MENU;

  popupmenu($menu);
As I understand, it seems there might be necessary to use eval() instead of popupmenu($menu), but it still doesn't work:

Code: Select all

"Right-Click on White in File List"
  $menu = <<<MENU
New Folder;#231
New Text File;#234
-
Paste;#202
-
Refresh;#1001
  MENU;

  $selected = popupmenu($menu);
  if (strpos($selected, "#") != -1) { eval("""$selected"""); }
  else { eval($selected); }

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Simple help with context menu

Post by highend »

1st works fine in 23.00.0013 fresh...
One of my scripts helped you out? Please donate via Paypal

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Simple help with context menu

Post by John_C »

Works for me in 23.00.0013 too.

Still doesn't work in 23.00 after I have removed the Data folder. Not sure of course, but it seems there was a bug, which is now fixed

Post Reply