Jump to content

Reclaiming Context Menu Real Estate


Recommended Posts

This is no shade on AutoIt developers who have created an awesome and extremely useful Windows scripting utility but the default AutoIt context menu takes up a lot of space. I get it, as a developer you pretty much have to be in a new user's face in terms of options so they won't bombard you with questions but I  quickly figured I didn't need the 4 default AutoIt selections on the file context menu: compile | compile with options | edit script  and run.  (In addition you have the Windows insanity of the ubiquitous "Open" command, which, when you click on it, doesn't run an AutoIt script but simply opens it it Notepad, but I digress).

So I eliminated the clutter by creating a cascading AutoIt context menu and added my own custom icons so these old eyes could quickly tell the difference between edit and compile without reading the menu captions. Registry code appears, below:

Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\AutoIt3Script\Shell]

[HKEY_CLASSES_ROOT\AutoIt3Script\Shell\AutoIt_Options]
"MUIVerb"="AutoIt Options"
"SubCommands"="Compile;Edit;Run"
"icon"="C:\\PATH TO CUSTOM ICON\\*.ico"
"Position"="Top"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Compile]
@="Compile"
"icon"="C:\\PATH TO CUSTOM ICON\\*.ico"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Compile\Command]
@="\"C:\\Program Files (x86)\\AutoIt3\\SciTE\\..\\AutoIt3.exe\" \"C:\\Program Files (x86)\\AutoIt3\\SciTE\\AutoIt3Wrapper\\AutoIt3Wrapper.au3\" /ShowGui /in \"%l\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Edit]
@="Edit"
"icon"="C:\\Program Files (x86)\\AutoIt3\\SciTE\\SciTE.exe"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Edit\Command]
@="\"C:\\Program Files (x86)\\AutoIt3\\SciTE\\SciTE.exe\" \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Run]
@="Run Script"
"icon"="C:\\PATH TO CUSTOM ICON\\*.ico"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Run\Command]
@="\"C:\\Program Files (x86)\\AutoIt3\\AutoIt3_x64.exe\" \"%1\" %*"

 

Edited by copyleft
Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...