Jump to content

The displayed string in the context menu


Recommended Posts

I'm not sure if it's possible to give less information in a request than this.

Please try and explain what it is you're looking for with as much detail as possible, including what application, what you've tried (regardless of whther it's working or not.)

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

  • 1 month later...

For example, in the registry section that is responsible for the context menu of .dll files, there is an entry {098f2470-bae0-11cd-b579-08002b30bfeb}. Question: how do I get a string representation of the corresponding context menu item? In this case, this item has this line: "Open using Resource Hacker"

8b6584981adf65fec609ed02d87b62ac.png

Link to comment
Share on other sites

Maybe you find it in HKEY_CLASSES_ROOT\*\shell

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Link to comment
Share on other sites

Use RegRead to get the default value listed within the CLSID key...?
 

Local $sCLSID = "{09799AFB-AD67-11d1-ABCD-00C04FC30936}"
msgbox(0,"",_GetCLSIDDefaultValue($sCLSID))

Func _GetCLSIDDefaultValue($sCLSID)
    Local $sValue = RegRead("HKCR\CLSID\" & $sCLSID,"")
    Return SetError(@error, @extended, $sValue)
EndFunc

 

Link to comment
Share on other sites

AFAIK, CLSIDs do not translate/convert directly to strings, they are reference IDs.  You have to find where the CLSID source is and pull the string from there.  

Link to comment
Share on other sites

What is the specific case/scenario you are trying to work this with?  There is apparently no one-size fits all solution how this is done, so knowing exactly the effort you are dealing with will help us help you better.  Hopefully it is with something anyone can access and troubleshoot in their own and then hopefully someone will investigate and dedicate the time to assist you.

Edited by spudw2k
Link to comment
Share on other sites

I'm writing the context menu editor, but I still can not display some menu items in my editor, for example, from the shellex\ContextMenuHandlers sections, and from the PersistentHandler sections that form the file type menu. All these data are formed by CLSID codes and lead to unknown depths of the shell. In my case, it's enough for me to display these items in my editor, having a string of the view, in the language corresponding to the current localization of Windows. It can be system menu items, and there may be items created by the installed programs. Both of them interest me.

The forum has a related topic The Shell Context Menu, there is a shell implementation script for the shell context menu in the GUI window. But I still do not understand how to extract the lines from this. Forgive me for my ignorance. The author of the post also did not want to communicate with me. The Shell Context Menu

Link to comment
Share on other sites

I answered your first PM, but I didn't answer the rest of your PMs because I have no answer. I don't know how to get the menu item name from such a menu ID. It's my impression that you simply cannot get the the menu item name from this menu ID. But I have not investigated it. It's also my impression that the menu ID is simply hardcoded in a switch/case statement in the code and that's the link between the menu ID and the rest of the code. But maybe I'm wrong.

In my example about the Shell Context Menu I'm using the IContextMenu interface to create the context menu. But I'm not using the menu ID as input. I'm using the file name as input. The name of the file that you right click. Or a list of file names if you are right clicking a group of files in a selection. Or an empty file list if you are right clicking in empty space. My example does not give you a link between the menu ID and the menu item name.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...