Jump to content

Recommended Posts

Hi all,

Not specifically related to autoit, but probably easiest way for me, to address my question to experienced coders.

I know how to add a single item and command to windows context menu for desktop, my computer, drives, directories and file types but I failed to find a simple answer on how to make new otem + subitem. 

All what I am trying to achieve is to build up context windows menus with subitems, giving me an option to run my script on directories with different parameters.

So, how do we do it?
 

Edited by DesireDenied
Link to comment
Share on other sites

Have you looked at the Helpfile examples for GUICtrlCreateContextMenu?

As, the first example shows the creation of a subitem.

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Yes, of course but that is not the case.

I was thinking of windows shell context menus working only for directories.

Like this one for eg.

 

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Example - Hit me]
@="Example - Hit Me"

[HKEY_CLASSES_ROOT\Directory\shell\Example - Hit me\command]
@="cmd.exe /c dir \"%1\" /L /B /O:N > \"%1\".txt"

This will add a single item to your windows context menu for directories, the command itself will create a text file for folder content.
The thing I want to learn, is how to instead of single item, create a submenu where I can run scripts and pass to them different parameters directly from windows explorer only by rightclicking the folder and selecting interesting option.

 

Example.reg

Edited by DesireDenied
Link to comment
Share on other sites

Here is an example for windows:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\msdncascade]
"MUIVerb"="ExtendedSubCommandsKey cascade"
"ExtendedSubCommandsKey"="*\\shell\\msdncascade\\menus\\flyout1"

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus]

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout1]

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout1\shell]

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout1\shell\cmd1]
"MUIVerb"="flyout2"
"ExtendedSubCommandsKey"="*\\shell\\msdncascade\\menus\\flyout2"

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout1\shell\cmd2]
"MUIVerb"="Notepad"

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout1\shell\cmd2\command]
@="notepad.exe %1"

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout1\shell\cmd3]
"MUIVerb"="Wordpad"

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout1\shell\cmd3]
@="Wordpad %1"

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout1\shell\cmd3\command]
@="Wordpad.exe %1"

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout2\shell\cmd1]
"MUIVerb"="Notepad"

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout2\shell\cmd1\command]
@="notepad.exe %1"

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout2\shell\cmd2]
"MUIVerb"="Wordpad"

[HKEY_CLASSES_ROOT\*\shell\msdncascade\menus\flyout2\shell\cmd2\command]
@="Wordpad.exe %1"

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...