[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 »

Boofo wrote:But for someone who knows absolutely nothing about scripting, how do I get it to do all that it can without being about to write the scripts it needs?
I think you've read my topic with suggestions and know that a lot of things that may be usef within FS/TP plugin aren't realized. So you have a choice here - use only realized stuff or create some scripts and use much more things. BTW, my scripts are just sequences of commands, like batch files.



VirtualPanel 1.0.0.121: added panels refreshing after VP operations.
User avatar
Hacker
Moderator
Moderator
Posts: 13040
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

MVV,
Additional features may be achieved only via internal commands - I don't know another way. [...] You know, suggestions are welcome.
Well, I suggested to show "pseudo files" to execute internal commands, as it is done in TC Burner. They could show additional dialogues upon pressing Enter, either one dialog per command, or a wizard-like series of dialogues.
I see you are not headed into that direction, though, so I wonder if there are other ways to make such complex interaction with your plugin easier.

Roman
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.
WhACKO
Junior Member
Junior Member
Posts: 67
Joined: 2009-04-07, 11:17 UTC

Post by *WhACKO »

MVV

thanx for considering my suggestion, I've been playing with the latest ver. all morning, and I have a couple of questions:

How do I make the script autoload by default?
e.g. I have

Code: Select all

<add ">!refresh" {<silent<put . F:\Movies\*.*<put . H:\Movies\*.*<put"}
and it does what it's supposed to do but if I add it in

Code: Select all

DefFileList=script.vlist
it just doesn't work...

Is there a way to exclude a folder from the <add path?
e.g. I don't want to add

Code: Select all

f:\Movies\[b]Temp[/b]
folder or subfolders to be added to the list.

If you change any of the rel files and then use the same script the files keep gettind appended to the virtual folder (hence the add command), so maybe there could be a command that refreshes the whole virtual folder and re-adds the contents of the script.

Also why did the default .ini change from VirtualPanel.ini (in addon folder) to the root of TC, is there a way to change it back? And if there is no path for DefFileList= or VirtualFolderIcon= the files to be searched in the same folder as the .wfx addon.

These are just my opinions, hope they can be met :)

Keep up the good work!
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

Maybe a good thing would be a simple scripting tool. It could be either internal to VirtualPanel or a small external EXE. The UI would have dropdowns for commands and options, and path/file browser buttons (similar to the way TC itself exposes additional plugin attributes in the "Change attributes" dialog). The tool would build a syntax-correct script and allow the user to name/save it.
Last edited by JohnFredC on 2009-10-18, 13:45 UTC, edited 1 time in total.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Hacker wrote:Well, I suggested to show "pseudo files" to execute internal commands, as it is done in TC Burner. They could show additional dialogues upon pressing Enter, either one dialog per command, or a wizard-like series of dialogues.
Now you may add batch files to execute internal commands with any parameters. Also you may create one batch file that will create in current folder such batch files. But I won't add persistent files into every folder - they will overload folder contents.


WhACKO, DefFileList option allows to set file for load/save VP contents on start/exit, but not for script execution. You may export some folder or whole VP contents to a list file and see its format (each line contains attributes, date and time, internal name and real name).

Default placement of INI file determined by TC and for last versions it should be a fsplugin.ini - this works w/o troubles with access rights. Only if TC don't tell suggested INI path to plugin, plugin uses INI in its folder.

About relative path to default state file - I'll add environment variables support for it too, so you would specify path using %COMMANDER_PATH% variable e.g.

About folder excluding - when you add real folder, you can't choose what you will see inside - you will browse that real folder. But you may create a virtual folder and to place wanted subfolders into it.
User avatar
Hacker
Moderator
Moderator
Posts: 13040
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

MVV,
Now you may add batch files to execute internal commands with any parameters.
Well, it's nice that the possibilities are there but we are back to the question if people are going to use them. For instance I do not understand what the difference is between removing a file using "del" or by pressing Delete. "Add" or "put" vs. F5 or F7? It's just too confusing for me and even though I cannot speak for all the users, I am afraid many might feel the same.

Roman
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.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Hacker wrote:Well, it's nice that the possibilities are there but we are back to the question if people are going to use them. For instance I do not understand what the difference is between removing a file using "del" or by pressing Delete. "Add" or "put" vs. F5 or F7? It's just too confusing for me and even though I cannot speak for all the users, I am afraid many might feel the same.
I agree with you but what can I do?

When you delete using Del, TC sends delete command (not <del) to plugin for each file and folder, so if you try to delete real folder link, TC will delete whole its contents (but plugin will warn you).
When you use <del command, plugin just deletes link (or virtual folder with all its links).

When you use F7, you create virtual folder, exactly as if you use <add command w/o real path parameter.

When you copy files using F5 (as if you use F8 for deleting) TC creates every folder and copies every file separately. So, you will get virtual structure with links to files only.
Buth when you use <add command and real path points to folder, you will get real folder link and will be able to browse it as usual folder (and only one item will be added to VP).

Later I'll add detailed description for each command and for standard operations.
User avatar
Samuel
Power Member
Power Member
Posts: 1929
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

Why not show a Question on delete/copy/etc. like:
Do you want to delete only the links? (or also the linked files)
If this dialog will popup for every single file you may "remember the decision", for one process.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Samuel wrote:Why not show a Question on delete/copy/etc. like:
Do you want to delete only the links? (or also the linked files)
If this dialog will popup for every single file you may "remember the decision", for one process.
Thanks for idea, but plugin already have it. :)
Just answer No in first (group) warning and plugin won't ask you up to end of operation.

I've added special confirmation dialog with buttons Yes/No/Cancel/Yes to All/No to All instead of two message boxes.

Also I found a division by zero error when copy empty file.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Version 1.0.0.162 released. :)

New features:
* new FsExtractCustomIcon function extracts non-standard icons in background and causes TC to use less GDI objects
+ special delete physical files confirmation dialog
+ del command supports wildcards and keeps read-only files
+ autoexecuted scripts - on load list and on list directory contents
+ full Readme file
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Short instruction for creating auto-updated virtual folder:

1. Create folder (e.g. \Video) and open it;
2. Place script file with name like >Refresh and contents like following:

Code: Select all

<silent<del *.*<put . D:\Video\*.avi<put . /l E:\Video\*.mls
You may execute following command for this task:

Code: Select all

<add >Refresh {<silent<del *.*<put . D:\Video\*.avi<put . /l E:\Video\*.mls}
Mask *.* won't affect on script file because it have no extension.
3. Make this script file read-only to protect from deletion;
4. Enable scripts autoexecution with command <eas 1 e.g. (see all flags in Readme file);
5. Close TC and edit plugin INI file in order to set AutoUpdateName parameter to value >Refresh (this step is needed only once, you may use any update script name).

Created folder \Video will update its contents on each browse or refresh with all AVI files from D:\Video folder and all files from MLS filelists in E:\Video folder.
User avatar
ate
Senior Member
Senior Member
Posts: 274
Joined: 2003-12-17, 22:48 UTC

Post by *ate »

I have 2 movie-folders on D: and E: with many subfolders.

It works like a charm, if I use:
<silent<del *.*<put . D:\Movies\*.* <put . E:\Movies\*.*
in the command line. But I have a little problem to understand/use the instruction for the script-solution:

1. I create the folder Videos in the VirtualPanel
2. I make a file with the name videos.script in a real folder (e.g. a TC- subfolder named Scripts) and with the file-content:
<silent<del *.*<put . D:\Filme\*.* <put . E:\Filme\*.*
3. I copy the file videos.script to the folder Videos in the VirtualPanel and change the name of the file to >videos.script
4. After Enter on >videos.script the following error occur:
Error in batch file! Script should begin with '<'!
\Videos\>videos.script


I use the version 1.0.0.162
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ate wrote:2. I make a file with the name videos.script in a real folder (e.g. a TC- subfolder named Scripts) and with the file-content:
<silent<del *.*<put . D:\Filme\*.* <put . E:\Filme\*.*
3. I copy the file videos.script to the folder Videos in the VirtualPanel and change the name of the file to >videos.script
You misunderstood instruction a bit. You need to specify script instead of path to real file but not to create a file with script text. So, you must use <add command to create such script, e.g.

Code: Select all

<add \Videos\>videos.script {<silent<del *.*<put . D:\Filme\*.* <put . E:\Filme\*.*}
This will create a virtual file >videos.script in current virtual folder with script. And if you give to script general name like >Refresh and specify this name in AutoUpdateScriptName parameter, it will update your folder contents automatically when you enter it. Also I recommend you to give to scripts names w/o extensions. In this case <del *.* command won't delete script file because it have no extension (you may set read-only attribute for script to protect it but if you have <del command in it, this command may delete script before you set attribute if script have wrong name. :)
User avatar
ate
Senior Member
Senior Member
Posts: 274
Joined: 2003-12-17, 22:48 UTC

Post by *ate »

Thanks for helping me ...

In VP I created a Folder named Videos and then used the command:
<add \Videos\>Aktuell {<silent<del *.*<put . D:\Filme\*.* <put . E:\Filme\*.*}

After that I made the virtual file (>Aktuell) read only (to protect it). Then I used the command:
<eas 1
(Is it to set EnableAutoScripts=1 ?!)

I closed the TC and changed die fsplugin.ini (AutoUpdateName=>Aktuell).

But after restart the TC there is no Folder Videos in the VP and I have to recreate this folder again and do all the other steps.

AutoUpdateName=\Videos\>Aktuell don't work.

Sorry, if I get on your nerves. I thought, that after all the steps I have a folder (named Videos with all the virtual files in it) and that VP remember all the settings after a restart of TC (like the libraries in Windows 7).
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ate wrote:I closed the TC and changed die fsplugin.ini (AutoUpdateName=>Aktuell).
This is the right setting! You need to set only filename. :wink:
ate wrote:But after restart the TC there is no Folder Videos in the VP and I have to recreate this folder again and do all the other steps.
You did all right, but first of all, you need to specify default state file or you will lose your VP structure on close TC. :) Also you may set DefFileList parameter directly.
Post Reply