How to make a button or hotkey doing this?
Moderators: Hacker, petermad, Stefan2, white
How to make a button or hotkey doing this?
I pressed Ctrl+F12, then input *dev* to list all files containing ‘dev’ in name.
Then under the menu ‘Show’, there appeared an item ‘*dev*’ listed between ‘Programs Ctrl+F11 ’ and ‘Custom Ctrl+F12’. Choosing this ‘*dev*’ will list all files containing ‘dev’ in name.
Can I, or how can I make a button or hotkey to do the same as choosing this ‘*dev*’ in the Show menu?
Then under the menu ‘Show’, there appeared an item ‘*dev*’ listed between ‘Programs Ctrl+F11 ’ and ‘Custom Ctrl+F12’. Choosing this ‘*dev*’ will list all files containing ‘dev’ in name.
Can I, or how can I make a button or hotkey to do the same as choosing this ‘*dev*’ in the Show menu?
- Vochomurka
- Power Member
- Posts: 816
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
Use buttonor just type "cd *dev*" in the command line.
Code: Select all
TOTALCMD#BAR#DATA
cd *dev*
%COMMANDER_PATH%\totalcmd.exe,1
cd *dev*
-1
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
Maybe I didn't say it clearly at the beginning. Here I uploaded a picture. What I want to do is to create a button or a hotkey that can do the same as choosing the “*dev*” in the picture.
Image: http://farm9.staticflickr.com/8309/7896655530_c341fc6d81.jpg
Image: http://farm9.staticflickr.com/8309/7896655530_c341fc6d81.jpg
- Vochomurka
- Power Member
- Posts: 816
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
2Adams
1) Select text I gave as quote in this post;
2) Locate mouse over the free space of a button bar, press pight mouse button and pick "Paste";
3) Press the button just created. That's all.
1) Select text I gave as quote in this post;
2) Locate mouse over the free space of a button bar, press pight mouse button and pick "Paste";
3) Press the button just created. That's all.
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander
This doesn't work into command line. (At least not for me)Adams wrote:I tried 'cd *dev*' in command line but didn't
see anything happen. cd is for changing directory, isn't it?
It will work from an button as described above.
The same 'CD' command can also be written to an user.ini file
and then an shortcut can be assigned.
Once in the user.ini the command can also be added to the main menu.
- - -
As example for this see petermad's "Extended English Menus"
In the "wcmd_win7_2_eng.ini" (an user.ini) you will see e.g.
Code: Select all
[em_ext_show_images_web]
cmd=cd *.gif *.jpg *.jpeg *.jpe *.png *.bmp
menu=Show Image Files (web formats)
button=wcmicons.dll,24
and this command "[em_ext_show_images_web]"
is used in file "wcmd_win7_2_eng.mnu" (an custom main menu)
Code: Select all
POPUP "F&ilter"
POPUP "Show I&mage Files"
MENUITEM "&Web Formats", em_ext_show_images_web
To use this "em_ext_show_images_web" -command via an shortcut
see Configuration... > Misc. > hotkeys > Command: Lupe > Filter: em_ext_s
- - -
You can do this all your own
with an file called i.e. user.ini for the command, e.g. "em_Adams_dev"
Code: Select all
[em_Adams_dev]
cmd=CD *dev*
and then modify the default Language\WCMD_ENG.MNU:
Find
Code: Select all
POPUP "Sho&w"
Code: Select all
MENUITEM "&Programs\tCtrl+F11", cm_srcexecs
MENUITEM "*.*", cm_srcuserspec
MENUITEM "Adams: DEV", em_Adams_dev
MENUITEM "&Custom...\tCtrl+F12", cm_srcuserdef
(the shortcuts like "Ctrl+F11" are plain text here only!)
- - -
BTW
the above mentioned button can be modified to e.g.
Command: CD
Parameters: ?*dev*
The '?' will prompt you, so you can modify the filter on the fly.
And an '*' e.g. will list all files again.
HTH?
It is simple to create a button for that, Copy the following code, right click on the desired position in the button bar and Paste.
Code: Select all
TOTALCMD#BAR#DATA
cm_SrcUserSpec
wcmicons.dll,24
0
313
Thanks! I tried this. When the button defined this way, its function can change. It always functions the same as that defined in the previous Ctrl+F12.ts4242 wrote:It is simple to create a button for that, Copy the following code, right click on the desired position in the button bar and Paste.
Code: Select all
TOTALCMD#BAR#DATA cm_SrcUserSpec wcmicons.dll,24 0 313
Adams wrote:"cd *dev*" works. But I just don't understand why.
That's right, 'CD' is also the name of an DOS command.To my knowledge it's a DOS command to change directory.
Here, Yes.Is CD a TotalCmd command?
First It does the same as the DOS command.What does it do?
But since this is an TC command, the author can let it do what he want.
So if after 'CD' an expected string is found the app can react in several ways.
.
- Vochomurka
- Power Member
- Posts: 816
- Joined: 2005-09-14, 22:19 UTC
- Location: Russia
- Contact:
TC manual wrote:...The "cd" command is handled internally to change the current directory in the active panel. If you give the name of a file, TC will place the cursor on that file...
...You can make a button to change directories, by specifying cd directory name as the command. You can even choose which files to show, e.g. using the command cd directory\*.txt.
With parameter "/user:" (all lowercase!) you can specify the user to use for the connection to the remote share. If no user name is given, you will be asked to enter a user name and password.
Example: cd \\server\share /user:username
4. You can also open an ftp connection, using either cd ftp://ftp.servername.com
or: ftpopen session_name, where session_name is the name configured in the FTP connect dialog box...
...You can also start a port connection using a command in the button bar, start menu, or Ctrl+D menu (client only):
The command would be
cd port://lpt1/c:/subdir1/subdir2...
Single user license #329241
PowerPro scripts for Total Commander
PowerPro scripts for Total Commander