JnLlnd / FoldersPopup

Popup menu to jump instantly from one folder to another. Freeware.
code.jeanlalonde.ca/folderspopup/
45 stars 7 forks source link

Triggering the popup menu from the Explorer / File dialog box context menu #90

Closed JnLlnd closed 9 years ago

JnLlnd commented 10 years ago

See: http://code.jeanlalonde.ca/folderspopup/#comment-8801 and https://mail.google.com/mail/u/0/#inbox/14929f0f2228e04f

Idea: create a compiled script to read folderspopup.ini to get the popup menu hotkey and send this hotkey. Add an item in the Explorer context menu to execute this script.

Note: Explorer context menu when you click on a "white" zone is not the same context menu as when you right-click on a file or folder name/icon. There is also a context menu when you right-click in a dialog box "white" zone.

Examples of adding items to Explorer context menu: http://www.autohotkey.com/board/topic/37423-new-context-menu-item-puts-any-folder-into-a-dialog-window/

Example of registry key: HKEY_CLASSES_ROOT\Folder\shell\Browse with Paint Shop Pro

JnLlnd commented 10 years ago

See also this example:

#NoTrayIcon
#NoEnv
#SingleInstance ignore
SetWorkingDir %A_ScriptDir%
Gui, +OwnDialogs

Title    := "Copy Path"
CMD      = %1%
RegEntry := A_IsCompiled ? """" A_ScriptFullPath """ ""`%1""" : """" A_AhkPath """ """ A_ScriptFullPath """ ""`%1"""

If !CMD {
    RegRead, ExistingEntry, HKey_Current_User, Software\Classes\*\shell\%Title%\Command
    If (ExistingEntry = RegEntry) {
        RegDelete, HKey_Current_User, Software\Classes\*\shell\%Title%
        RegDelete, HKey_Current_User, Software\Classes\Folder\shell\%Title%
        RegDelete, HKEY_CLASSES_ROOT, lnkfile\%Title%
        MsgBox, 0x40, %Title%, Explorer context entry removed.
    } Else {
        RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Classes\*\shell\%Title%\Command, , %RegEntry%
        RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Classes\Folder\shell\%Title%\Command, , %RegEntry%
        RegWrite, REG_SZ, HKEY_CLASSES_ROOT, lnkfile\%Title%\Command, , %RegEntry%
        If A_IsCompiled {
            RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Classes\*\Shell\%Title%,icon, %A_ScriptFullPath%
            RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Classes\Folder\shell\%Title%,icon, %A_ScriptFullPath%
            RegWrite, REG_SZ, HKEY_CLASSES_ROOT, lnkfile\%Title%,icon, %A_ScriptFullPath%
            }
        MsgBox, 0x40, %Title%, Explorer context entry added.
        }
    }
Else MsgBox, 0x40, %Title%, % Clipboard := CMD
ExitApp
JnLlnd commented 10 years ago

See also the OnMessage approach: http://www.autohotkey.com/docs/commands/OnMessage.htm

JnLlnd commented 9 years ago

This issue was moved to JnLlnd/FavoritesPopup#7