[REQ] for WdxInfoPacker plugin

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

Moderators: white, Hacker, petermad, Stefan2

icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

[REQ] for WdxInfoPacker plugin

Post by *icfu »

@all:
In case you don't know it, it was announced in French forum only, this is definetely a must-have plugin which allows creating files with data exported directly from WDX plugins:
http://www.totalcmd.net/plugring/WdxInfopacker.html

@franck8244:
Would it be possible to format the output? Maybe it is already possible and I have overlooked it?
1. A switch for right alignment would be sweet.
2. What about using field separators like <space> or <tab>?

Ok, I would like to create exported file lists with adjusted columns:

Code: Select all

Input:
Filename: @Mod=Size@ShellDetails.wdx
Filename <x> info: % %N

Output:
  268364 bdfghfga.txt
84629456 sdsdfhhgfhgffg.mpg
     873 ghjsdfgh.m3u
I have found several glitches:
1. When plugin config is activated TC doesn't get focus anymore when clicking on taskbar button
2. Adding junk at end of lines lead to TC crash, for example when adding an additional % in example above:

Code: Select all

Filename: @Mod=Size@ShellDetails.wdx%
3. When using field separators a superfluous field separator is added at the beginning of output line, in the above example with field separator "," I get this:

Code: Select all

,268364, bdfghfga.txt
,84629456, sdsdfhhgfhgffg.mpg
,873, ghjsdfgh.m3u
4. It would be nice to autoactivate the edited scheme after pressing OK on scheme tab. Right now you get the error message "Select a scheme to use".

Thanks again, I got addicted meanwhile. :)

Icfu
This account is for sale
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2All

1-Right Alignement
I'll see what I can do about that

2) Field Separator
for space use " " as separator and for tab " " :wink:

3) Superfluous separator
You can use WDX info in any field (see in the readme), simply ask your wanted value one step earlier

4) Auto Activate the edit Scheme
When the sheme is saved, it directly appears in the list. The thing is the Scheme creation should be used once in a while.
I took time to increase the possibility of autoselected scheme. (extension, double click in the list, rememberlast,... (all these thing were made thinking of icfu) ).

5) Junk ...
You have to separate "WDX Info" from any other thing with ";"
With your example my plugin tried to load the
ShellDetails.wdx% plugin that is does not know ...

6) TC loses focus
I know, I'll see what I can do...
TC#88260 -
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

1) Fine.
2) This is what I tried first, doesn't work here. :(
3) You have meant starting in "before filename" field? Ok, this works, indeed.
It needs a while to get used to the fields all behaving equally although they have different names, it's a little irritating, I just try to learn, don't forget that... ;)
4) So, it's by design that pressing OK on scheme tab calls the info box? What's the use of that?

1. I press Alt-F5 and enter config
2. I choose a scheme for editing and change to scheme tab
3. I edit the scheme, press save and press OK -> popup

I would expect that after pressing OK the dialog closes and chooses the scheme I have just edited because I already selected it when entering the dialog, is that wrong? I thought it was a bug...
5. Yep, I know. It was just a hint for you that missing error handling leads to TC crashes when stupid users like me start to do strange things... ;) I thought you might be interested in that, I discovered it "by accident".
6. Fine, thx.

Icfu
This account is for sale
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2Icfu
I made a few change :wink:, here they are

2) Now the separator is also "processed" eg : you can use
"% " for one space and "%%" for the percent sign this way for a tab you'll be able to use "% % % % "

3) When I started to create this plugin, I wanted to use WDX information at only one position, but coding it I saw that multiple position would be much more powerful. The "name" given to the field is just an indication where the information will be placed :wink:. Anyway You can edit the language file to meet your needs...

4) I have corrected it : When a scheme is edit or created , after saving change it is selected (in the 1st page) , so you will not see this message... :wink:

5 & 6 ) I'll correct it a bit later (family at home :evil: :wink:)

->New release
TC#88260 -
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

2) Works great but a little glitch is left:
When the scheme is edited a second time the quotes are not loaded in field separator box anymore so the quotes have always be manually edited again on each scheme change.
3) I'll do that and send translation to your email adress, ok? :)
4) Great.
5 & 6) :)

Icfu
This account is for sale
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2Icfu

2) I guess I'll have to add quotes around values (maybe all ?) when saving them. I'll fix it later (same reason :wink:)

3) No problem

4) You know you can use a scheme without opening the config dialog, don't you ? (Of course when all the wanted scheme has been created correctly...)
TC#88260 -
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

New version
- German language thanks to Icfu

- The problem with the quotes is fixed.
- Added the possibility to right align the text (scheme dependant)
- Checking for plugin loading "error" to avoid TC to crash

TODO : Find the reason of the focus loss :( (I can easily set my form to always on top but that'll not really fix the bug...)
TC#88260 -
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I think on the the right alignment option you got me wrong unfortunately.

What I had proposed was a right alignment optionally for each field, not in general, so that I can right align file sizes for example but still keep left alignment of file names:

Code: Select all

Output: 
  268364 bdfghfga.txt 
84629456 sdsdfhhgfhgffg.mpg 
     873 ghjsdfgh.m3u

    ^        ^
    |        |
    |        |

  right     left
aligned     aligned
I think a good choice would be an additional switch like %R to be added in each field, would be really great. Maybe this is possible without too many efforts? ;)

Error occurs when clicking in free space in scheme list on the left:

Code: Select all

Indice de liste hors limites (-1)

Thanks for the fixes :)

Icfu
This account is for sale
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

Icfu wrote:What I had proposed was a right alignment optionally for each field
:oops: , I'll see if it's possible with the method I use...
Edit : the problem is that I don't know the length of the "wdx result" (or any other information)
For every line (file), I have a big array of char in which I'm adding each wanted value (before, filename,...) without knowing its length and then I'm writting this array of char in the text file...
In other word, I would have to process all information twice to know the length then adjust it to be right align.
Anyway, once this plugin will be "done" I'll distribute the source so anyone will be able to improve it ...
Icfu wrote:Error occurs when clicking in free space in scheme list on the left
I haven't succeed to reproduce it, can you show me where you click ? and when ?
Last edited by franck8244 on 2005-04-10, 17:36 UTC, edited 1 time in total.
TC#88260 -
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I haven't succeed to reproduce it, can you show me where you click ? and when ?
I think it's one of those annoying bugs that only happen on XP SP2, see for example my report here:
http://www.ghisler.ch/board/viewtopic.php?t=6812

Where: free space in scheme list
When: whenever I click

I uploaded the screenshot here, click on button "Free" at bottom of page:
http://rapidshare.de/files/1211474/WdxInfoPacker_Bug.png.html

Apropos, a clue for you regarding focus:
When I tried to prepare a screenshot for you I recognized that pressing Alt-Print doesn't put only your plugin dialog in clipboard but the whole desktop!

Icfu
This account is for sale
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

2All
Problems Fixed:
- cm_UnloadPlugin now works correctly
- Focus is no more lost

At the moment, "ini files" have to be in the plugin directory and have write permission otherwise it will lead to errors !
To be added: Automatic ini file location to fix the above problem

Download
TC#88260 -
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

Version 1.2 is available here
Added :
- More schemes examples
- "Easily" import your TC custom columns
- Choose file types to be proceed
- A small exe to copy Wdx info to the clipboard
- etc...

Bug fixes

Users feedback will be greatly appreciated to help me improving this plugin, thanks :wink:
TC#88260 -
User avatar
nevidimka
Senior Member
Senior Member
Posts: 385
Joined: 2004-06-20, 21:38 UTC

Post by *nevidimka »

2franck8244
Thank you for your efforts. :)

Question:
!!! Read Me.txt wrote:* The wcx plugin comes with some bonus : many scheme example, a higlhlighter for synplus (associate with WIP file)
What are WIP files (for)?
The doorstep to the temple of wisdom is a knowledge of our own ignorance. Benjamin Franklin
User avatar
franck8244
Power Member
Power Member
Posts: 703
Joined: 2003-03-06, 17:37 UTC
Location: Geneva...

Post by *franck8244 »

I have created an highligher for synplus but I did not want to associate it with ini file (user can have other "scheme" for that) so I associated it with the "WIP" extension (W= Wdx, I= Info, P= Packer :wink: )...
:arrow: If you have installed the highlighter in synplus and rename the scheme file to something.wip you can see highlighted value ;)
You can also associated this highlighter with another extension

That's all there is about WIP files...

The Scheme_Example.wip provide in the archive is nothing more than a renamed scheme.ini :P
TC#88260 -
User avatar
nevidimka
Senior Member
Senior Member
Posts: 385
Joined: 2004-06-20, 21:38 UTC

Post by *nevidimka »

I have created an highligher for synplus but I did not want to associate it with ini file (user can have other "scheme" for that) so I associated it with the "WIP" extension (W= Wdx, I= Info, P= Packer )...
Ahh, I see. It's a bit confusing because TC internal Lister shows this WIP files as HTML (key 5) and therefore it looks strange.
The doorstep to the temple of wisdom is a knowledge of our own ignorance. Benjamin Franklin
Post Reply