Context Menus for Total Commander

Title Context Menus for Total Commander
File Name tc_cm.powerpro
Description Execute context menu commands for folders and archives
Author Robin Siebler
Parameters -
Plugins Called win, file
Version 1.1
Updated on 30.01.2009
@opposite
; open new tab in opposite pane 
if(activewindow("Total Co*")) do
    Keys {fast}{to Total Co*}+^{up}
    QUIT
endif

@this
; open new (active) tab in this pane 
if(activewindow("Total Co*")) do
    Keys {to Total Co*}^{up}
    QUIT
endif

@backg
; open new tab in this pane in the background 
if(activewindow("Total Co*")) do
    Keys {to Total Co*}^+T
    QUIT
endif

@extract_to
; extract to user specified path 
if(activewindow("Total Co*")) do
    LOCAL hFocus=WIN.GetFocus
    local extract_path = InputCancel("Extraction Path: ")
    WIN.SetFocus(hFocus)
    Wait.For(20000, activewindow("Total Co*"))
    Keys {to Total Co*}%{F9}
    Wait.For(20000, activewindow("Unpack*"))
    IF(NOT activewindow("Unpack*"))
    QUIT
    Keys {to Unpa*}{end}+{home}&(extract_path)\{enter}
endif

@extract_here
; extract archive into this subdir 
if(activewindow("Total Co*")) do
    Keys {to Total Co*}%{F9}
    Wait.Until(activewindow("Unpack*"))
    Keys {to Unpa*} {enter}
endif

@extract_opposite
; extract archive into active tab in opposite pane 
if(activewindow("Total Co*")) do
    Keys {to Total Co*}%{F9}
    Wait.Until(activewindow("Unpack*"))
    Keys {to Unpa*}{enter}
endif

@extract_subdir_current_pane
; extract archive into a subdir of the currently active pane 
if(activewindow("Total Co*")) do
    local filepath
    filepath = file.folder(_file_) ++ "\\" ++ file.name(_file_)
    Keys {to Total Co*}%{F9}
    Wait.Until(activewindow("Unpack*"))
    Keys {to Unpa*}&(filepath){enter}
endif

@extract_subdir_opposite_pane
; extract archive into a subdir of the opposite active pane 
if(activewindow("Total Co*")) do
    Keys {to Total Co*}%{F9}
    Wait.Until(activewindow("Unpack*"))
    Keys {to Unpa*}{end}&(file.name(_file_))\{enter}
endif

Comments

To install the context menus for Total Commander, you need to perform the following steps:

  1. Run the PowerPro Configuration tool (pproconf.exe).
  2. On the Setup tab, click Install Context Menu.
  3. Next, click Import from text and click Command List.
  4. In the Open dialog, browse to the location where you extracted this file and double-click on context.ini.
  5. Repeat steps 3-4 for contextfolder.ini.
  6. Copy tc_cm.powerpro to \PowerPro\scripts.
Now launch Total Commander. When you right-click on a folder, you will see Total Commander Tab options with a flyout menu:

When you right-click on an archive, you will see Total Commander Unpack options with a flyout menu:

Full archive (script + 2 ini-files + readme)
Main Page Total Commander PowerPro