hover to open "New" and "New Item" in context menu

Features wanted...
Post Reply
terrytw
Posts: 121
Joined: 03 Mar 2023 03:37

hover to open "New" and "New Item" in context menu

Post by terrytw »

Based on viewtopic.php?t=27931

I wish the context menu could behave same as normal menu items with automatic expansion of submenu.

Thank you!

eil
Posts: 1832
Joined: 13 Jan 2011 19:44

Re: hover to open "New" and "New Item" in context menu

Post by eil »

Since original topic is connected to menu scripted via popupmenu(), maybe popupnested() command can be used for desired results.
Win 7 SP1 x64 100% 1366x768|1900x1080

terrytw
Posts: 121
Joined: 03 Mar 2023 03:37

Re: hover to open "New" and "New Item" in context menu

Post by terrytw »

eil wrote: 09 Oct 2024 15:45 Since original topic is connected to menu scripted via popupmenu(), maybe popupnested() command can be used for desired results.
I am using popnestedmenu already...Maybe you misread it.

terrytw
Posts: 121
Joined: 03 Mar 2023 03:37

Re: hover to open "New" and "New Item" in context menu

Post by terrytw »

I have found a workaround.

Just use the script function "new" and its source file option.

xy123
Posts: 214
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

Re: hover to open "New" and "New Item" in context menu

Post by xy123 »

terrytw wrote: 26 Oct 2024 21:59 Just use the script function "new" and its source file option.
Could you paste the code?

terrytw
Posts: 121
Joined: 03 Mar 2023 03:37

Re: hover to open "New" and "New Item" in context menu

Post by terrytw »

xy123 wrote: 26 Oct 2024 22:06
terrytw wrote: 26 Oct 2024 21:59 Just use the script function "new" and its source file option.
Could you paste the code?

Code: Select all

		$menu = <<<MENU
-
#230
 ::New Folder|/"<xypath>\Data\Icons\XYicon_FolderGeneric.ico"|new(,,"<xypath>\Data\NewItems\New",ru);
 ::New Text File|/"%windir%\System32\notepad.exe"|new(,,"<xypath>\Data\NewItems\New.txt",ru);
 ::New Word Document|/"%ProgramData%\Microsoft\Windows\Start Menu\Programs\Word.lnk"|new(,,"<xypath>\Data\NewItems\New Word Document.docx",ru);
 ::New Excel Worksheet|/"%ProgramData%\Microsoft\Windows\Start Menu\Programs\Excel.lnk"|new(,,"<xypath>\Data\NewItems\New Excel Worksheet.xlsx",ru);
 -
 MENU;
		popupnested($menu, 7:="|");
#230 is only there for the name, it doesn't really do anything per se.
"7:="|"" means I am using "|" to separate sections in each line, the default is ";", I need to use ";" to separate multiple script command, which is irrelevant to this particular section so you can change it back if you want.
"ru" means going straight into edit file name mode and enable to ability to "ctrl+z" the new item action.

You need to have New.txt, New Word Document.docx, New Excel Worksheet.xlsx in <xypath>\Data\NewItems folder.

xy123
Posts: 214
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

Re: hover to open "New" and "New Item" in context menu

Post by xy123 »

Got it, thank you.

Post Reply