Question: new internal commands in 9 beta?

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
sirksel
Junior Member
Junior Member
Posts: 61
Joined: 2013-04-24, 10:24 UTC

Question: new internal commands in 9 beta?

Post by *sirksel »

I've noticed a lot of new internal commands available in TC9. Thanks, Mr. Ghisler! I may be missing something, but I'm trying to find a few that correspond to basic navigation, such as:

GotoNextItem ---- like pressing Down (arrow) in the file list
GotoPrevItem ---- like pressing Up (arrow) in the file list
GotoNextPage ---- like pressing PgDn in the file list
GotoPrevPage ---- like pressing PgUp in the file list

Does anyone know if I'm missing any commands like this that already exist (or any reasonable TC-only substitutes)? Here are a couple of potential use cases:

1. Go to next directory at same level as the one you are in. Right now, I use an AHK keystroke to send TC a {backspace}{down}{enter}, and that works OK, until the next item is a file, and then it gets launched. I notice we now have discrete internal commands to accomplish almost all of this using command chaining. For example, we could do:

Code: Select all

[em_GotoNextSiblingDir]
cmd=cm_GoToParent, cm_GotoNextItem, cm_GoToDir
(...if I could find cm_GotoNextItem...) This would have the benefit of failing at the parent level when you are out of directories to traverse, rather than launching the file below those directories (as the AHK solution does). I know, I could make AHK test the file under the cursor to see if it's a directory, but it's so much simpler and more elegant to keep it in a command chain in TC rather than sending keys. Does anyone know if there's a TC-only solution that would accomplish the same goal for a keystroke?

2. Redefine some home-row navigation. As I was remapping keystrokes for TC9, I thought it might be cool to try some home-row j/k style navigation of the file list (or, in my case, Alt+J/K). This is not to replace the arrows, but to augment them, for those times when you don't want to lift your hands from home row. Anyhow, it would be easily accomplished with:

Code: Select all

[Shortcuts]
A+J=cm_GotoNextItem
A+K=cm_GotoPrevItem
...except as far as I can tell, those internal commands don't exist. Do they? Right now, I'm also doing this using by remapping keys in AHK. However, as with the case above, it's so much better to keep keystroke maps all in TC, and use the AHK scripts for more complicated things like processing batches of files.

Thanks for your help in taking a look at this. Please let me know if I've missed a good TC-only solution. Or if you think these commands would be easy to add and helpful, is it something that could be added easily?
User avatar
Stefan2
Power Member
Power Member
Posts: 4155
Joined: 2007-09-13, 22:20 UTC
Location: Europa

How to lookup and find TC internal commands or make own

Post by *Stefan2 »

Hi sirksel,

take a look into "TOTALCMD.INC" file (try F3 or F4 command on that file)

There you will find all available commands.

Also the History.txt and e\KEYBOARD.TXT are great sources of information.


For the missing one you can try to use workarounds with AutoHotkey,
or with VBS or NirCmd sendkey commands.
AutoHotkey you can also utilize to send WM_USER and WM_COPYDATA to TC.
See the forum for some examples.


Additionally find some existent thread in the Suggestions forum and add your support.






 
sirksel
Junior Member
Junior Member
Posts: 61
Joined: 2013-04-24, 10:24 UTC

Post by *sirksel »

Stefan, thanks so much for your note back. You pointed out some great resources, some of which I've used before. I did read all of totalcmd.inc -- which is why I knew that Mr. Ghisler has been adding many new commands. I was pretty excited because some of these command are about enabling simple built-in-command access to basic functions, like cm_Select, cm_UnSelect, and cm_Reverse. I've already put these to use and moved some keyboard mappings, which used to rely on sendkeys, now to be native inside TotalCmd.

I definitely have an OK workaround now with Autohotkey that I've been using for a while. I will try to do more with SendMessage and WM_USER/WM_COPYDATA, based on your suggestions.

I figure an advanced user like you would definitely know if these commands exist, and based on your answer, it sounds like they don't. So I will continue with my present workaround and maybe augment it using the tools you suggest. In the meantime, could a moderator please move my thread to the TC Suggestions forum so Mr. Ghisler can see if he might add it? It seems like he might at least listen to the request because he's been adding other commands lately that have to do with basic navigation, and I'm hoping these wouldn't be too complicated to add at some point.

Thanks so much for all the help!
User avatar
Hacker
Moderator
Moderator
Posts: 13064
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod]Moved to the suggestions forum.

Hacker (Moderator)[/mod]
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply