Wish: Command Line Plugins

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Unjoanqualsevol
Junior Member
Junior Member
Posts: 39
Joined: 2003-02-27, 11:41 UTC
Location: Catalunya

Wish: Command Line Plugins

Post by *Unjoanqualsevol »

Well, we have packer, filesystem and lister plugis. Then, why not command line plugin?

What I have in mind?

I type some string in command line, if TC doesn't reconize it then shows a window and ignore it. A command plugin could catch this string (command) and react to it. Inspired from Dave's Searchbar.


Examples:

:arrow: If I type "4+2" then a command plugin returns 6 to the command line.

:arrow: If I type "x=3", the plugin return a nul string, later I type x+2, then plugin returns 5 to the command line.

:arrow: If I type "alarm 14:00", the plugin remaind in background until and at 14:00 shows a message box.

:arrow: It could execute internet searches. "gg something" opens a internet browser with the google's search of "something"

:arrow: Or, for instance, a command plugin could execute totalcommander 'scripts'. Like batch files..




Several command line plugins can be ordered for priorty, like lister plugins.

Wath do you think about?

I hope you understand, sorry for bad english.
User avatar
norfie
Power Member
Power Member
Posts: 1194
Joined: 2003-02-18, 14:18 UTC

Post by *norfie »

Last edited by norfie on 2004-09-10, 21:37 UTC, edited 1 time in total.
Unjoanqualsevol
Junior Member
Junior Member
Posts: 39
Joined: 2003-02-27, 11:41 UTC
Location: Catalunya

Post by *Unjoanqualsevol »

2Norfie
2Unjoanqualsevol
Sorry, but I think that are not tasks for a file manager. You can solve your tasks with OS-tools today.
Ok, but TC is more than a filemanager. Why lister plugins in a file manager? Actually Imageviewers are powefull and cheaper (or free).
And also fileedit tools.

I'm thinking only in plugin implementation. TC only pass an invalid command line string to a plugin and put the answer in the command line. I think it isn't very hard to implement and make TC most powerfull. If it's possible, of course. :wink:
Use "calc.exe" and clipboard.
Yes, I know. :) but may be it would be fast and easy with a command line plugin :wink:
User avatar
Pete
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-08, 18:05 UTC
Location: Bodensee (Southern Germany)

Post by *Pete »

Haha :)

Well seriously, these features can be done by OS itself.

But I am thinking about TConsole plugin. For now it does not have its own command interpreter, does it?

What about adding some extensions to this plugin, so it could handle "calculations", "alarms", etc. as mentioned by Unjoanqualsevol above.

And as some ppl have requested, also adding to TConsole the ability of scripting.

Greets
Pete
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Unjoanqualsevol

Given the input examples from your first posting how could Total Commander decide which of all installed Command line plugins responds to the current input?
User avatar
Maxwish
Senior Member
Senior Member
Posts: 370
Joined: 2003-02-05, 19:13 UTC
Location: .NL

Post by *Maxwish »

I think that Unjoanqualsevol idea's are infact all scripts.
Then you could add different scrips for commands (eg. the calc command, use internet command, alarm command, etc). This could not be done in the command line box, because of interferance with normal DOS commands, but as a plugin ?

eg:
calc 5+2 (simple calculator functions)
inet www.ghisler.com (send url to browser)
alarm 12:00
note "download new version of fileinfo plugin" (add note to a todo list)
backup /config (enter 'backup' command configuration menu)
backup mail (apply backup rule 'mail' that zips and backups my mail databases)
Last edited by Maxwish on 2003-11-07, 09:37 UTC, edited 2 times in total.
...BRB...
Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Re: Wish: Command Line Plugins

Post by *Jonas »

2Lefteous
Unjoanqualsevol wrote:Several command line plugins can be ordered for priorty, like lister plugins.
In fact, I like the idea of a Commandline-plugin. It could be more powerfull then only read CL-input and write into the CL. If it get's a callback-funktion for accessing TC's internam commands (cm_*) and could be called from extern (with "totalcmd.exe /O /CLP: name_of_CL-plugin \path\to\makro.tcm") it should ba called "batch-interpreter-plugin". A scripting-ability could added this way over plugins....
Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas »

2Maxwish
Yes, this is exaclty waht I'm thinking too (see above but you were faster ;))
you could give such commands a button or an entry in the directory-hotlist with the action ">backup mail".... (the '>' tells TC that the string should be sended to its own commaldline)
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Several command line plugins can be ordered for priorty, like lister plugins.
exactly this doesn't make sense. The first plugin will always be executed until you format the input to make it distinguishable.

by the way:
http://toolbar.google.com/deskbar/
User avatar
Maxwish
Senior Member
Senior Member
Posts: 370
Joined: 2003-02-05, 19:13 UTC
Location: .NL

Post by *Maxwish »

good idea: '>'

IIRC the intergration/use of macros or scripts has been discussed before. Don't exactly remember what the 'final conclusion' by Christian was though ;)
...BRB...
Unjoanqualsevol
Junior Member
Junior Member
Posts: 39
Joined: 2003-02-27, 11:41 UTC
Location: Catalunya

Post by *Unjoanqualsevol »

2Lefteous
2Unjoanqualsevol

Given the input examples from your first posting how could Total Commander decide which of all installed Command line plugins responds to the current input?
OK, TC doesn't do this job. The plugin itself could say if it accepts the string or not. First TC ask to the first plugin to accept the string, if the string has been accepted then proces the string by the plugin and put the answer in TC command line. If the string isn't accepted try the next command-line plugin.
Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas »

Lefteous wrote:
Several command line plugins can be ordered for priorty, like lister plugins.
exactly this doesn't make sense. The first plugin will always be executed until you format the input to make it distinguishable.
Why? TC get's a unknown cmd-input and send a pointer to the string to the first plugin. This don't know that to do this it and returns false or something like "CL_NOT_FOR_ME". TC calls the next plugin until one returns true or "CL_OK".
May detectionstrings like for the lister speed the whole thing up if the CL begins with "backup", the backup-plugin is called, if the first char is a number, the calc-plkugin is called, etc...
You could configure TC if plugins should be called before or after he tried to execute the command itself.
Unjoanqualsevol
Junior Member
Junior Member
Posts: 39
Joined: 2003-02-27, 11:41 UTC
Location: Catalunya

Post by *Unjoanqualsevol »

2Maxwish

Thanks, you explain the concept better than me :)

2Jonas

'>' Good idea, I like it
User avatar
norfie
Power Member
Power Member
Posts: 1194
Joined: 2003-02-18, 14:18 UTC

Post by *norfie »

Last edited by norfie on 2004-09-10, 21:37 UTC, edited 1 time in total.
Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas »

you could script your worklfow in TC.
ex. "backup mail" (or your button with ">backup mail") compares the existing backup with the local email and if there are somne changes it backups your M2 and KMail (over the ext2-plugin) mailbox.
Post Reply