[WFX] VirtualPanel: Temporary panel for TC

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

A) you should add a command like "<aesName" to define it from VP.
Ok, I modified eas command:

Code: Select all

eas {<autoupdate_script_name>|<mask>}
B) could you add also a way to execute external prog from script "<do ....... "?
You may execute any internal file using <exec command. If this internal command pointed to physical application, it will be launched with passed parameters. So, if you have some little tool that launches any process, you may add it to VP and start any external process with it (e.g. cmd.exe or link to it that will be started minimized, or any tool w/o console window).
C) could you also have internal variables like TC's %F %S and why not a %L
I have no access to selection, TC doesn't provide such interface. I hope Ghisler will implement launching internal FS files from button bar etc - then you would use %L, %S, %L and all other functions (it was suggested here).
D) could you also support importing script entries with the put /l command ?
How do you see it? This command takes lines from files, takes filenames from it and adds to VP under that names. Script text have no name, so it can't be used with <put command.
I think it could be more convenient to prepare and save script in an editor than typing in the command bar.
You may use <edit command - it allows to copy/paste script text. Also you may edit scripts directly in state file - even more, you may save state with just one file, edit it to correct script and load it back to current virtual folder (or make some stub with single state file line for script creation). Also you may write script in editor and then use <add command with pasted text to make script file.

If you need %L etc now, you may start external tools that will get selection from TC panel.
User avatar
nsp
Power Member
Power Member
Posts: 1821
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

MVV wrote:
A) you should add a command like "<aesName" to define it from VP.
Ok, I modified eas command:

Code: Select all

eas {<autoupdate_script_name>|<mask>}
B) could you add also a way to execute external prog from script "<do ....... "?
You may execute any internal file using <exec command. If this internal command pointed to physical application, it will be launched with passed parameters. So, if you have some little tool that launches any process, you may add it to VP and start any external process with it (e.g. cmd.exe or link to it that will be started minimized, or any tool w/o console window).
I tried <exec c:\toto.exe truc and nothing happened !
I have to do <add \$tmp$ c:\toto.exe<exec \$tmp$ ....<del \$tmp for the result expected.

I've also noticed that export command :
A) do not have any ansi option (i will have to switch back to old version ):(
B) export also scripts line but put do not import them :((
[/code]
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Of course, <exec c:\toto.exe doesn't work because <exec can only execute internal files. That's why I suggested to add virtual tool that will launch external applications. Here a little launcher for you:

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="Exec.7z"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Exec.7z"

N3q8ryccAAMqe0Y2XgIAAAAAAABbAAAAAAAAAJvanckAJpaOcAAX9+wFu+r0/5QBL0TuTr0JP39V
wXIs+2C8FAvofZL9OQyrmdRJ6fFEUwUox4AepJrWfamkx9MSo1AMPur1FMg8of0jfCyT3T8/4QjX
pnYBkhDSYOSUjCW0YWm/A/ufykqenX0kjRZtew9pwiZZ1TGq8XwEOCcgEa4pOuwMo8+dLFI5U/7f
ziLcYIzgDZ/M6QXqZkhEVAcsSB03wCkD1PSjV4I9q10bjokpk5I8BwZvhTznrocIGeFWHmvCo38b
Is335X0l4Bvvl1mkV9zyB7nHD1ekO6vJi7bvilFkzA5CJufw+vgeY3pbD4Uit7Lh/J/r/x3WD7LF
doNT1cGrauGnZx2gCFZsfvq2OGYy0PA8wn6pCfqYChec7XZTmdBxmSMDp+EizYNE2wb+4d4zfnVm
I/CEIHfgEbM6LRYQFeWjgdYHU+RJF/Pz7YHvARswKGjuzOBjpFf/8Jv8qJrI2ctr8AaYJqBP06UJ
fb0mJJu0XrPH+78V8r5nQUR+kFH74G4uysC/8HlJ+ge9F1oOFEfOJS8X8yxHys+UChSH2bQD2jz+
f0nJZ0ZJ+pLTU30MuqLGoHoHLuZv7MLHh8CGkenaLovcwjQk42A7YrWGoQTYYGpYUgPoOYFYh/Vi
ujHLBTQuzXrVB28JCUeo5oUk+1w0QM5P7Zxu51lGba/4OR27q+ZPFbuLQ9aap/WLZUPiDcytHjFz
FM4iNyAbScBwrP5pbvkqRiO3WTCSdEPnes1/lix1YZRaViNmNu3Xf2Yr44Km5RjtcBt6pco8lw58
8B+NuokmJHwoVAABBAYAAQmCXgAHCwEAAiMDAQEFXQAAAQAEAwMBAwEADIgAiAAACAoByi0v0wAA
BQEREwBFAHgAZQBjAC4AZQB4AGUAAAAUCgEAJRyMCIumygEVBgEAICgAAAAA

You need to put it somewhere and add to your VP once (if you don't know what to do with this text - save as text and use File - Decode). Then, you may launch any external application/document using this tool. It will call ShellExecuteEx system function and pass filename and all parameters to it. E.g.:

Code: Select all

<exec \exec.exe c:\toto.exe /parm1 /parm2 etc etc etc
I've also noticed that export command :
A) do not have any ansi option (i will have to switch back to old version )
B) export also scripts line but put do not import them (
Yes, I know that currently export command saves to Unicode only and that playlists don't use it, I'll add another line writer to support ANSI.
Yes, export command exports scripts because it exports all files. But when put command parses filelist, it ignores wrong lines (e.g. lines starting with #EXTM3U or #EXTINF) by checking if file exists. Since scripts are bad file paths, they are ignored. But I will repeat - you may use save/load instead of export/put -l in order to change script text - the only difference is file attributes and name before script text.

Ok, I added optional parameter /a for export/save commands to save filelist as ANSI (I just call wsprintfA instead of wsprintfW if this flag is set).
User avatar
nsp
Power Member
Power Member
Posts: 1821
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

MVV wrote:Of course, <exec c:\toto.exe doesn't work because <exec can only execute internal files. That's why I suggested to add virtual tool that will launch external applications. Here a little launcher for you:
Thank you i will use it !
MVV wrote: Ok, I added optional parameter /a for export/save commands to save filelist as ANSI (I just call wsprintfA instead of wsprintfW if this flag is set).
Cool !

I also understand your point with load and save...

About getting selected node i also understand that TC do not have any function to inform you about selection and un-selection and no scripting api.....
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

just a minor glitch : if i select a file in a VP with a different name than the actual one that exists and press F4 it will report

Code: Select all

Cannot find file [Keys.txt] in Dir [W:\Home\Keys\]
\\\Virtual Panel\Keys.txt ---- > w:\Home\Used.txt

enter opens the file oky.
#181344 Personal licence
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ehab wrote:just a minor glitch : if i select a file in a VP with a different name than the actual one that exists and press F4 it will report

Code: Select all

Cannot find file [Keys.txt] in Dir [W:\Home\Keys\]
That's strange, it works fine for me:

\Keys.txt -> Z:\Home\Keys.txt

F4 opens Z:\Home\Keys.txt in editor, and Enter launches editor too.
Can you view your file with F3? On F3 and F4 TC asks VP for real name, and it returns it. On Enter VP executes file using ShellExecuteEx function.
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

Dear MVV

Keys.tx does not exists i renamed a file in VP with a different name. This is what i have in deflist

00000420 01CAA403 78154F00 \Keys.txt W:\Home\Keys\Used.txt

BTW, no file renamed in VP works now!
#181344 Personal licence
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ehab wrote:Keys.tx does not exists i renamed a file in VP with a different name. This is what i have in deflist
Yes, I understood you. I just misprinted in previous post:
MVV wrote:\Keys.txt -> Z:\Home\Keys.txt
I tested following in fact:
\Keys.txt -> Z:\Home\Used.txt

I tested it once again, anyway, all works fine, regardless of where I rename file - in VP or in target folder. I restarted TC but works anyway. I don't know any reasons. :)

BTW, what is W drive? Is it mounted or network? Maybe you should test it on your physical volumes?
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

Dear MVV

its a mounted encrypted volume.

i recommend TrueCrypt

ehab
#181344 Personal licence
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I'm sorry but I have no TrueCrypt so I can't check what's wrong with it. If this file opens on F3 normally but can't be opened on F4 - its probably not VP's fault.


VirtualPanel 1.0.0.400:
+ removes physical files to recycle bin by default (checks if Shift is held and corresponding TC setting before)
+ default filelist now is saved on exit only if VP state was modified during session
+ load command may be executed w/o parameters now for loading default filelist state
+ eas command now allows to change autoupdate script name
+ new flag /a for save/export to save with ANSI encoding
+ new command ifcond that allows to check file attributes etc
* removed locked dialog on exit if INI can't be written
* all commands now fit into help dialog
* some other fixes
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

VirtualPanel 1.0.0.408:
+ Shift+Enter jumps to file or enters archive in new tab
+ new keyword to detect scripts (for ifcond command)
* fixed dates comparing in ifcond command (wrong conversion to number of minutes)

In 1.0.0.408 was fixed buggy entering archive function (sometimes TC switched focus to left tab from right).
Also script example with for and ifcond commands was added to Readme.
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

i liked 408 update, so thanks for all the time and effort you put in this project.
#181344 Personal licence
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ehab wrote:i liked 408 update, so thanks for all the time and effort you put in this project.
Thanks for using it. :)


VirtualPanel 1.0.0.416 (changes after 1.0.0.408):
+ ifcond now understands relative paths
+ log file size limit feature
* check for existance before starting autoupdate script (avoid some execution errors)
* %0 in script now treated as script filename
User avatar
nsp
Power Member
Power Member
Posts: 1821
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

Hi,

I've tested the following commands :

Code: Select all

<add \TC %commander_path%<export /ar c:\Mylist.lst \TC
<del /r \TC
A) The output file is ansi but the info are not correct.
C : \ t o o l s \ t o t a
instead of
C:\tools\totalcmd\r\n

B) recursive is not recursive.

C) delete do not delete

Did i missed smth ??
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

<export command I will check, thanks for the report.

Your \TC folder is a link and not virtual folder, so it doesn't contain virtual subfolders and/or files, so you don't need /r flag - folder links like files (but with directory attribute). But you need flag /d if you want to tell to <del command that you want to delete directory and not file (especially it is important when you use mask characters in name).


I forgot to change ANSI processor for <export command (I did it only for <save), so it wrote always in Unicode, but since /a flag was specified, function didn't wrote BOM.
Post Reply