AutoHotkey: TC Fav Menu: Features and Installation

From TotalcmdWiki
Revision as of 10:01, 23 June 2006 by Majkinetor (talk | contribs)
Jump to: navigation, search

<title>TC FavMenu 1</title>

<style> </style>


TC FavMenu

FavMenu Editor

                      for Windows XP & 2K

 

 

OVERVIEW

 

TC FavMenu is standard Open/Save dialog enhancer and application launcher.

It uses ini file to store information about your favorite folders and applications.

 

Format of the menu ini file is compatibile with Total Commander file manager directory menu, and was originaly written to

work as addon for this file manager but it can be used without it. All features of TC directory menu are supported, including

plugins and pseudovariables. Furthermore, TC doesn’t need to be started.

 

Menu Editor can be used to create, edit, delete and organise menu items.

This is complete replacement of TCs internal directory menu editor witch adds many new options.

It can be used together with FavMenu or separate.

 

Both programs use the same ini file to store configuration _Config.ini

 

 

INSTALLATION

 

You can run applications either by starting .exe or .ahk  files. If you want Total Commander executable

and its configuration file wincmd.ini to be automaticaly recognised start application from within TC.

To run .ahk, you must have AutoHotKey installed.

Make sure you have something in the TC directory menu before start using the program.

 

 

 

TC FAVMENU  FEATURES

 

 

- Full TC favorites. Possible items in the menu are:

 

MENU TYPE

COMMAND

EXAMPLES

PATH

cd path

cd c:\program files    cd %SYSTEMROOT%\System32

TC PLUGIN

cd \\\plugin

cd \\\Uninstaller      cd \\\Registry\HKEY_CURRENT_USER\Sofware

PSEUDOVARIABLE

cd %$var%\path

cd  %$DESKTOP%          cd %$PERSONAL%\My Pictures

EXECUTABLE

path_to_exectable

%$WINDOWS%\System32\Notepad.exe 

c:\boot.ini            will be resolved via associations

%w%%s%%n%              where w=C:\windows, s=\system32, n=notepad.exe

%UTILS%\Edit Plus\Editplus.exe "c:\boot.ini" "c:\1.txt"

 

 

- Enter (on menu item)

     If

·        Open/Save dialog is active (commctrl32.dll dialogs)

    

SELECTION

ACTION

PATH

change the path in the dialog

TC PLUGIN

open or activate TC

EXECUTABLE

run the application

 

·        Any other window is activate: open or activate TC

 

- CTRL + Enter (on menu item)

  Open Properties dialog with selected item. Move around with buttons. You can change

  title, command and set icon.

  Press Save on every individual item to save changes. It is much faster to use this dialog

  then TC's editor for single item change.

 

- SHIFT + Enter (on menu item)

  Open selected item in new TC tab

 

- Setup dialog

  On first run, Setup dialog will search for TC location in the registry and if not found it will

  also try  %COMMANDER_PATH%  environment variable. If not present in the system, this variable

  will be instantiate by TC privately.

  If setup can not find Total Commander, specify full paths to totalcmd.exe and wincmd.ini yourself.

  In case you want to start TC with parameters, create link to the totalcmd.exe and edit link info as you

  desire. After that specify the path to the totalcmd.lnk instead totalcmd.exe.

 

  You can set hotkey here and menu position.

 

  Later, you can call this Setup dialog via the tray menu. You can delete setup and force

  autodetection, with "Delete Config" item.

 

 

          - Current directories

  If TC is open, current left & right folders will be displayed at first 2 positions.

  If they are the same only 1 will be visible.

  If menu is called with TC active, this will not be displayed.

 

- Automatic Refresh

  Menu is refreshed on every call, so if you update your favorites in TC changes will be

  seen immediately.

 

- Office Dialogs

  Solid support to Office 2003 Open/Save dialogs (it doesn't work if ListView is focused)

  Make sure your carret is in the edit box  File Name  and you will not have any problems.

 

- Icons

  You can specify icon to display beside menu item.

  Icons are 12x12 with first pixel holding transparent color.

 

- Pseudovariables

  Similar to environement variables, but has slightly different syntax (%$var%, instead %var%).

  Currently supported:

       

APPDATA

Application Data, new for NT4

COMMON_APPDATA

All Users\Application Data

COMMON_DOCUMENTS

All Users\Documents

DESKTOP

C:\Documents and Settings\username\Desktop

FONTS

C:\Windows\Fonts

LOCAL_APPDATA

Non roaming, user\Local Settings\Application Data

MYMUSIC

My Music folder

MYPICTURES

My Pictures

PERSONAL

My Documents

PROGRAM_FILES_COMMON

C:\Program Files\Common

PROGRAM_FILES

C:\Program Files

PROGRAMS

C:\Documents and Settings\username\Start Menu\Programs

RESOURCES

%windir%\Resources\, For theme and other windows resources.

STARTMENU

C:\Documents and Settings\username\Start Menu

STARTUP

C:\Documents and Settings\username\Start Menu\Programs\Startup.

SYSTEM

System Directory (usualy C:\WINDOWS\System32)

WINDOWS

Windows Directory (usualy c:\Windows)

 

NOTE: Not all above pseudovariables are currently supported in TC but they may be in future versions.

 

 

FAVMENU EDITOR FEATURES

 

  FavMenu Editor doesn’t have setup on its own. The only thing it requires to work is the path to the ini file containing the menu

  (wincmd.ini or any other ini containing [DirMenu] ).If you run it along with TC FavMenu, use its Setup dialog to set this ini.

  Configuration entery for the ini file is located in _Config.ini under [TCFavMenu] section. The key holding the info is tcIni

 

 If you want to edit single item the fastest way is to use itegrated Properties dialog (CTRL ENTER).

 

  Since Editor is executable it can be added to the menu itself. Put it at the end of the menu and set its title to “Configure…” to mimic

  TCs internal menu.

 

- SHIFT Up/Down

  Move an item, or entire submenu.

  While moving, when you encounter submenu, if it is expanded, current item will become its child or will be removed from it.

  Otherwise, item will jump over the submenu.

 

- F2

  Change the title of an item. Do not use – as a first title character since it is reserved for internal usage.

  Use & to set a shortcut and to specify separator.

 

- ENTER

  Press ENTER after changing the Command or Icon field to save changes. Selected item will

  turn bold and *** will appear in the dialog to inform you that the item has been changed, but it is not yet

  saved to the disk.  Everything will be saved into the menu configuration after you press SAVE button.

  Button will be grayed while save is in progress.

 

- INSERT | SHIFT INSERT

  Press insert to add new menu item after currently selected. Hold shift to insert new submenu.

  When the last item of the submenu is deleted, submenu will be turned to simple menu item. 

 

- DELETE

  Remove the item from the menu, or remove complete submenu

 

- Browse buttons

  >> buttons can be used to speed up editing.

  If the first word in the command field is “cd”, browse for directory dialog will be displayed, otherwise, browse for file.

  You must still press ENTER to save changes.

 

- OPTIONS

  Edit  _Config.ini  file to set miscelineous options for the FavMenu Editor.

 

          Backup                                   Create backup of wincmd.ini before changing it

          ColapseOnMove                      Close submenus while moving out of them with shift up/down

ExpandOnStartup                  Expand all menus on start-up

 

  Enable option by seting it to 1 under the [EDITOR] section of _Config.ini file.

  Delete it or set it to 0 do disable it.

 

 

NOTES

 

You may encounter some problems related to Total Commander interaction with the menu.

It is the best to avoid using TC editor at all, since FavMenu Editor is much faster and functional

plus TC editor will delete menu information about your icons if you set them.

You can use “Add current dir” TC option.

 

-  If you have empty sub menus, script will not work.

 

-  If you have 2 submenu items with the same name, in order to see the second one, you must add

   pseudospace (ALT 0160) at the end of the title of the second one. For all subsequent items with

   the same name add additional pseudospace.

 

-  Menu is collected from the wincmd.ini [DirMenu] section. Format of this menu is:

 

            menuN =  title | - | -title | --

            cmdN  =  cd <path|plugin|pseudovarialbe> | executable

           

   While building the menu, section will be iterated sequentially up to the first menuX item

   that doesn't exist. If, for some reason, your TC menu has "hole" in a sequence, script

   will rise errors or will not display the complete menu.

   This menu, for instance will not work:

 

            [DirMenu]

       menu1=item1

       menu2=item2

       menu4=item3

 

   To make sure your menu is not messed-up, open TC Favorites configuration and click OK

   button. TC will rebuild the menu sequentially. If you still have problems, delete

   everything (backup wincmd.ini first) and create your menu again. And if you still

   have problems (very unlikely), visit developing forum to report this.

 

   If you have any other mistakes in menu syntax script will not work.

 

-  Win9x systems are not and will not be tested. If it works, cool, but if not,  don't ask for support.

 

 

 

TO DO

 

-         Settings to include desired non-standard windows, by your choice, like Office dialogs, Start->Run,
console, and basicly anything you would like to paste path into

-         HotKey to enable/disable the script.

-         Larger icons

 

 

 

 

ABOUT

 

Created by Miodrag Milic

in AutoHotKey <www.autohotkey.com>

using Windows XP Pro

 

 

e-mail:         miodrag.milic@gmail.com

homepage:   code.r-moth.com  |  www.r-moth.com   |  r-moth.deviantart.com

 

Belgrade, Jun 2006