viewtopic.php?f=3&t=18674#p157659
?
Here is what I have currently:
Code: Select all
"Paste" #202
"Undo" #203
"Redo" #204
"Refresh" #1001
"New Shortcut" #241
"New Items (should be expandable. How?)" #240
Code: Select all
"Paste" #202
"Undo" #203
"Redo" #204
"Refresh" #1001
"New Shortcut" #241
"New Items (should be expandable. How?)" #240
Code: Select all
popupnested()
I have tried different examples from docs, but it works slightly different compared to the linked image. On the image, as you can see, the item on first menu is already expandable. In my case, it doesn't. Here is my current code:highend wrote:By usingand either manually stored items for "New items" or by parsing them in their location...Code: Select all
popupnested()
Code: Select all
"Paste" #202
"Undo" #203
"Redo" #204
"Refresh" #1001
"New Shortcut" #241
"New" // #240
$menu = <<<MENU
Top;;:paper;1
Sub;;;4
Sub
Sub2;;*.ini
Sub2
Sub2;;;2
Top;;<xy>
MENU;
text popupnested($menu);
Well, here is updated version. Much cleaner:highend wrote:Ofc you need to arrange these leading items in the popupnested() menu as well?
Code: Select all
$menu =
<<<MENU
Paste;#202;:paste
Undo;#203;:undo
Redo;#204;:redo
Refresh;#1001;:refresh
New Items;#240
Foo
Bar
MENU;
popupnested($menu);
Code: Select all
new("NewFolder", "dir");
new("file.txt");
Code: Select all
eval()
Could you please show how to use it together with my code?Filehero wrote:Examples for SC new().
Code: Select all
new("NewFolder", "dir"); new("file.txt");
Code: Select all
popupmenu()
I already read, but can't understand.highend wrote:Read the docs for. It explains how the necessary parts are put togetherCode: Select all
popupmenu()
Code: Select all
Paste;#202;:paste
caption;DATA;icon
I'm not a programmer. If it's hard to post a working solution? I see your code, but it works for "Paste" button. I already have working "Paste" button. I'm trying to understand how to add "new folder" and "new text file" instead of "Foo" and "Bar".highend wrote:What? You're already using the necessary structure in your other items?What to use for DATA for an item was posted and how to execute that returned DATA stuff was also posted...Code: Select all
Paste;#202;:paste caption;DATA;icon
1+1=?
For example, I tried this:highend wrote:What? You're already using the necessary structure in your other items?What to use for DATA for an item was posted and how to execute that returned DATA stuff was also posted...Code: Select all
Paste;#202;:paste caption;DATA;icon
1+1=?
Code: Select all
$menu =
<<<MENU
Paste;#202;:paste
Undo;#203;:undo
Redo;#204;:redo
Refresh;#1001;:refresh
New Items
Foo;new("NewFolder", "dir"));
Bar;new("file.txt")
MENU;
popupnested($menu);
eval($menu);
Code: Select all
eval(popupnested($menu));
Code: Select all
$selected = popupnested($menu);
eval($selected);
Thank you very much, it works perfectly!highend wrote:...