[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: Hacker, petermad, Stefan2, white

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

Post by *MVV »

OK, I understood your structure, thanx for explanation. So, you need to create folders w/o references to actual folders at first, then you may use trick suggested by me before.

E.g. you may just copy full structure from FR to VP w/o files - e.g. copy entire music base from FR to VP. When you will have prepared structure, save state using <save command and try to experimenting with <load command :) Suggested by me state file will replace your virtual folders with mp3's (that folders have icons with red border) with links to actual folders (icons w/o red border). So you don't need to remove mp3 files, VP will kill them for you (it will replace virtual folder with folder reference) :) Now please try and write about results, I'll help you if you get another troubles.

I may tell about state file format.
00000010<TAB>00000000 00000000<TAB>\Music\0001-U2-1987-The Joshua Tree\1987 - The Joshua Tree (MFSL)<TAB>D:\Music\0001-U2-1987-The Joshua Tree\1987 - The Joshua Tree (MFSL)\
First 8 bytes keep file's attributes (0x10 is directory attribute), next char is tab character, next 16 digits divided by space contain modify date and time (you don't need it for folders so you may leave zeroes here or paste any wanted value - e.g. taken from another state file), next char is tab, next string keeps virtual path, again tab and real path. If real path is absent, folder or file has no reference to actual object.

But keep in mind that you can't add references to files into physical folder's reference. If you need it, you should make that folder virtual and add references to folders and files into (you may refresh virtual folder's contents using auto-update script so files will be added automatically).
betatester
Junior Member
Junior Member
Posts: 16
Joined: 2007-11-18, 11:31 UTC

Post by *betatester »

@MVV

That worked. Changing the file attribute to 00000010 and adding a folder reference to the virtual path makes this work

Could it be possible to make this an option during copying of a directory to VP. This would save me a lot of work.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

betatester wrote:Changing the file attribute to 00000010 and adding a folder reference to the virtual path makes this work
Nice to hear that!
betatester wrote:Could it be possible to make this an option during copying of a directory to VP. This would save me a lot of work.
Its my wish too. It is not convenient to use <add command to add folder reference. So I suggested it under B number here and gave some ideas but I can't do more since TC doesn't inform VP about operations, it just creates virtual folders and puts file references into (I don't know if TC just makes folder or it makes upper folder for copied folder structure).
FR trick is nice (to recover physical folder path from file path) but it doesn't work if you want to add empty folder reference and it is hard to determine upper reference folder (FR remembers actual folder path for every virtual folder but in VP folder reference and virtual folder are different objects with unique features).
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

VirtualPanel 1.0.0.520:
+ <exec command now asks for command line if parameter begins with '?'
+ expanding environment variables in parameters for launched executables
+ "?" command now processed as "<?"
+ if parameter looks like ?:"<text>", text is used as ask param dialog text
* "%%" parsing error in script files


Now it is possible to add little script that will allow to ask and launch command line. To create such script in root VP folder execute command once (then set script read-only attribute to protect from removing and save state file):

Code: Select all

<add "\>Run command" {<exec ?:Enter command line to execute:}
Or just edit state file and add following line:
00000401<TAB>00000000 00000000<TAB>\>Run<TAB><exec ?:Enter command line to execute:
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Peace and quiet...


VirtualPanel 1.0.0.550: 8)
+ changed default image base address
+ now VP may execute scripts sent to TC using WM_COPYDATA message
+ attached tool VPBatch to send scripts to VP
* blocks multiple timer event thread creation (event skipped if previous yet working)
* kills timers and waits for exiting timer event processors when plugin is unloading
* log path changing from configuration dialog now works
* fixed launching applications from physical folder
* some fixes and optimizations


Now we may work on buttonbar for VP. Questions and suggestions are welcome. First button is Add to virtual panel as link:

Code: Select all

VPBatch.exe /w"" ^exec { ^ifok {Add %N as link?} { ^add %N %P%N } {} }
(parameter /w"" is needed only in first VPBatch version, newer versions will use last listed folder even w/o it)


VirtualPanel 1.0.0.560:
+ environment variables ${Virtual Panel}Path and ${}Path keep last listed VP path
+ new flags for <add command (to replace existing object and to create intermediate virtual folders)

* VPBatch now doesn't require /w""

Now it is possible to see current path in VP:

Code: Select all

VPBatch.exe ^exec { ^ifok "Add as %%${}Path%%"\%N? { ^add %N %P%N } {} }
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Well, new TC 7.55 is on public testing! So I may introduce some nice changes...


VirtualPanel 1.0.0.580 (changes after 1.0.0.560): 8)
+ multi-thread access to virtual system (NEW in TC 7.55 - put and get in background)
+ <move command
+ <for command now replaces %~<symbol> with just filename (%<symbol> is replaced with full path)
+ allows to cancel aborting of any operation (checks if Escape is held instead of accepting TC abort flag)
* Shift+Enter jumped to file's folder instead of jumping to file (after some changes in 1.0.0.550)
* Shift+Enter in TC 7.55 was overridden by internal execute feature
* <for command parameters processing bug
* buggy parsing paths with ".."
* removed questions in <save and <export commands after <silent
* some other fixes

Please report all found bugs. :)

Perhaps errors will appear if you copy files from some virtual folder and delete files there simultaneously (there is no way to determine if iterator is invalid) but it seems that TC makes entire download list before. I tried to test such stupid thing but unfortunately found no errors. :cry:
Last edited by MVV on 2010-03-29, 16:27 UTC, edited 2 times in total.
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

: )

predefined icon list

: )


eg: some ini section:

Code: Select all

[File Icons]
txt=d:\icons\please.ico

then in vp add command extra parameter to indicate use predefined icon

eg:

Code: Select all

<add somefile.txt  {<<u}
this will add somefile.txt but using d:\icons\please.ico icon




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

Post by *MVV »

Use script files instead (just start names with '>' and specify icon in script). :)
Or use internal TC associations and give for each file type unique extension assicoated with corresponding icon.
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

MVV wrote:Use script files instead (just start names with '>' and specify icon in script).
sounds good :wink:

MVV wrote: Or use internal TC associations and give for each file type unique extension assicoated with corresponding icon.


not good.

will use the above method.

thanks for all your hard work into this, i use it every day-
#181344 Personal licence
brahman
Senior Member
Senior Member
Posts: 208
Joined: 2006-04-26, 13:27 UTC

Post by *brahman »

It would be nice if you could implement that the plugin uses and recognizes TC path variables like %Commander_Path% in its DefFileList= parameter. TC now uses these variables as default too, f.e. when adding buttons.

Then the plugin can be used in a portable TC installation.

Also may I suggest to make the plugin more user friendly by setting first time installation in such a way that a default list file is saved automatically when the user begins to add files/folders.

Many user in this thread (who are certainly the more experienced kind) had initial problems setting up your very useful program, so I believe more user friendliness will certainly add more appeal to it.

Thank you for your wonderful addition and please continue your great work.
Regards, Brahman
Win10 & 11 Pro x64
User avatar
Vochomurka
Power Member
Power Member
Posts: 816
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

brahman wrote:It would be nice if you could implement that the plugin uses and recognizes TC path variables like %Commander_Path% in its DefFileList= parameter
It is implemented already:

Code: Select all

DefFileList=%COMMANDER_PATH%\VirtualPanel\base.lst
Also may I suggest to make the plugin more user friendly by setting first time installation in such a way that a default list file is saved automatically when the user begins to add files/folders.
I support. It was a feature that desoriented me badly when I used the Virtual Panel for the very first time.
Single user license #329241
PowerPro scripts for Total Commander
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

brahman wrote:It would be nice if you could implement that the plugin uses and recognizes TC path variables like %Commander_Path% in its DefFileList= parameter. TC now uses these variables as default too, f.e. when adding buttons.
As Vochomurka said, this was realized already, according to history since 1.0.0.121. So you may use %Commander_Path% in DefFileList parameter (or specify it using Preferences dialog; or using internal command <deflist - but don't forget to enclose path to braces then else it will expand variable before setting parameter).
brahman wrote:Also may I suggest to make the plugin more user friendly by setting first time installation in such a way that a default list file is saved automatically when the user begins to add files/folders.
Since 1.0.0.340 plugin uses default base as %TEMP%\VirtualPanel.lst but you may redefine this (I think experienced users find a way to change this, and non-experienced users don't clear temporary folders :)). Also don't forget that VP supports auto-save by timer feature.
brahman
Senior Member
Senior Member
Posts: 208
Joined: 2006-04-26, 13:27 UTC

Post by *brahman »

Thank you for your comments. They were very helpful in trouble shooting and correcting my installation.

I now realize that VP *supports* the use of TC path variables (previously mine was reset due to a typo in the path - my fault) but I would also like to make the point that the plugin should actively *use* and *set* TC path variables by itself, so that portability is not broken by a user who is not aware of the use of variables and to decrease maintenance and setup time for the experienced user.

Use of %Temp% for default base is IMHO not such a good idea, because it will get deleted sooner or later by automatic clean up utilities clearing the temp folder which even non experienced user employ. Then it will cause data loss and a bad user experience.
Regards, Brahman
Win10 & 11 Pro x64
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I don't think that it is VP's problem to replace paths to TC folder with environment variable. Anyway, VP doesn't add any parameters itself so you may always use environment variables and all will work.

I use %TEMP% because in Windows Vista/7 I don't know where user has writeable folders since UAC usually restricts write access to program folders.
I think that it better to have default state file in temporary folder than in read-only folder. :)


VirtualPanel 1.0.0.590: :roll:
* wrong <for parameters order
* set time/date for script files bug
* some optimizations
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

VirtualPanel 1.0.0.620: 8)
+ compact state file format
+ flag 'o' for save command to save old-style state file
+ safe multi-thread enum files (list builds in single critical section during FsFindFirst call)
+ faster saving (files in subfolders now searched from folder handle and not from root)
+ faster loading/unloading large states (now boost::fast_pool_allocator is used as map allocator)
* wrong for parameters order
* set time/date for script files bug
* put command accepted relative path incorrectly
* wrong mask processing by export command
* some other fixes and optimizations


Does anyone still visits this thread except me? :roll:
Post Reply