Is it possible to do some calculations in custom columns?
Or is there any other way or plugin to achieve the following:
File => image.jpg => width = 4000, height = 3000 [pixels]
Custom Column => Aspect Ratio => ratio = width/height = 1.333
Custom Column => Megapixels => mp = (width*height)/1000000 = 12 => mp + " MP" = 12 MP
File => audio.mp3 => length = 225 [seconds]
Custom Column => Duration => min = (length/60) - (length/60) MOD 1 = 3; sec = length MOD 60 = 45 => duration = min + " min " + sec + " sec" = 3 min 45 sec
Is it possible to do some calculations in custom columns?
Moderators: Hacker, petermad, Stefan2, white
Is it possible to do some calculations in custom columns?
Asus Maximus VIII Hero · Win10 Pro x64
Crucial MX500 1TB SSD · 64GB Corsair Vengeance LPX · nVidia GeForce RTX 3060 · Intel i7 7700K
Lenovo ThinkPad X1 Yoga 2.Gen · Win10 Pro x64
512GB SSD · 16GB RAM · intel HD620 · i7-7600U
TC 11.03 32-bit #347308
Crucial MX500 1TB SSD · 64GB Corsair Vengeance LPX · nVidia GeForce RTX 3060 · Intel i7 7700K
Lenovo ThinkPad X1 Yoga 2.Gen · Win10 Pro x64
512GB SSD · 16GB RAM · intel HD620 · i7-7600U
TC 11.03 32-bit #347308
Re: calculations in custom columns
Wojtek,
Nope. You'd have to find a plugin that does provide these values directly.
Roman
Nope. You'd have to find a plugin that does provide these values directly.
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.
Re: calculations in custom columns
D'Oh!Hacker wrote: 2020-03-29, 12:21 UTC Wojtek,
Nope. You'd have to find a plugin that does provide these values directly.
Roman

I already searched all content plugins on totalcmd.net, but didn't find anything that suits my needs.
Is it difficult to build own plugins? I have some basic knowledge of JS, PHP, VBA, VBS, and JAVA, but I have absolutely no experience in developing.
Can I use any of these* plugins (listed below) to get the job done (the calculations I mentioned above)?
*)
Asus Maximus VIII Hero · Win10 Pro x64
Crucial MX500 1TB SSD · 64GB Corsair Vengeance LPX · nVidia GeForce RTX 3060 · Intel i7 7700K
Lenovo ThinkPad X1 Yoga 2.Gen · Win10 Pro x64
512GB SSD · 16GB RAM · intel HD620 · i7-7600U
TC 11.03 32-bit #347308
Crucial MX500 1TB SSD · 64GB Corsair Vengeance LPX · nVidia GeForce RTX 3060 · Intel i7 7700K
Lenovo ThinkPad X1 Yoga 2.Gen · Win10 Pro x64
512GB SSD · 16GB RAM · intel HD620 · i7-7600U
TC 11.03 32-bit #347308
Re: calculations in custom columns
Wojtek,
Yup, at least with AutoHotkey it was quite easy.
Roman
Yup, at least with AutoHotkey it was quite easy.
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.
Re: calculations in custom columns
WinScript Advanced 1.7
Here is a solution how to integrate an AHK script via a plugin into a 'custom columns view'.
But I'm not a developer, so I may not be able to answer questions about this topic.
Here is a solution how to integrate an AHK script via a plugin into a 'custom columns view'.
But I'm not a developer, so I may not be able to answer questions about this topic.
Re: Is it possible to do some calculations in custom columns?
Sorry to kick an old topic, but I was wondering if this has been implemented by now, now that it's 3.5 years later.
It seems like basic calculations should probably be available...
Or if not, should find their way onto ghisler's todo list :)
It seems like basic calculations should probably be available...
Or if not, should find their way onto ghisler's todo list :)
Total Commander 11 on Windows 10
Re: Is it possible to do some calculations in custom columns?
2Thany
No. There is no math in the columns, and in general, given that simpler things are not realized, this one has even less chance.
As for the starting query, there are such options
No. There is no math in the columns, and in general, given that simpler things are not realized, this one has even less chance.
As for the starting query, there are such options
- for the aspect ratio: [=imgsize.Aspect Ratio], [=wdx4i.aspect], [=wdx4i.fdocasp]
- for megapixels, only a script on WSAP.
- for mp3 duration: [=mp3info.Length.s], [=anytag.Length.s], [=tcmediainfo.Duration.s], [=tcmediainfo.Duration.Custom]
Overquoting is evil! 👎