[wdx] WinScript Advanced Content Plugin (x86\x64) (new)

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

Moderators: white, Hacker, petermad, Stefan2

User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *Hacker »

Wojtek,
This plugin allows you to easily write your own content plugins using VBS, JS, Python, AHK, PHP, AutoIt or Powershell. It does not provide any file content information on its own.

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
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *Stefan2 »

Me getting an error on 32-bit Win7 and TC v9.21a:

Code: Select all

---------------------------
error
---------------------------
Crash in plugin WinScriptsAdv.wdx:

External exception EEDFADE
---------------------------
OK   Cancel
---------------------------
if I am in 'Configure custom columns' and have the selections dialog open to chose an column content.

I can just click [OK] and continue.
(happens twice for me on one column selection)
(on Windows [10.0.18363.1198] (win10-1909) and with TC v9.51 I got no crash at all)


Also possible to just type the plugin.string by hand without using the selector dialog,
like this example: [=winscriptsadv.NameOfWantedColumn]


For an picture see post by *billiebub » Tue Oct 11, 2016 19:54
When I select the plugin properties, a crash occurs. See image below
Image: https://ibin.co/2y7v9hTvnFEL.png



Hope this helps.
But:
--- Post by *Psychedelic » Thu Sep 01, 2016
--- Added WinScriptAdv source code.
and on page 1: ""Open Source (Delphi XE8) - will be opened soon,""
but he was not active here in the forum anymore since then.


 
Usul23
Junior Member
Junior Member
Posts: 3
Joined: 2014-07-07, 09:52 UTC

Return content recoginzed as date by tc ?

Post by *Usul23 »

Hello,
I have a little powershell script that reads the content from a file contained in the current folder and parses some lines to generate begin and end dates written to that file. These "values" are displayed in columns as wanted, but those aren't real values but strings and therefore sorting those date columns doesn't work.
I know I can put the data in the textfile to ISO standard (yyyy-mm-dd), but there are many files...

Is there any possibility for the plugin to return its content as suitable date-information ??

Thanx
Usul
HastaLuego
Junior Member
Junior Member
Posts: 2
Joined: 2017-05-13, 09:58 UTC

Re: Return content recoginzed as date by tc ?

Post by *HastaLuego »

Usul23 wrote: 2020-12-04, 10:47 UTC Hello,
I have a little powershell script that reads the content from a file contained in...
Actually, it's not a big deal, just use regular expression, whith which you can transform you column data in any desired form.
Just give me a form in which your data are.

Update.
Something similar might work.

$str = "22:12:1983" # your initial date
$regex = new-object Text.RegularExpressions.Regex "(\d{2,4})\D(\d{2,4})\D(\d{2,4})"
$content=$regex.replace($str, '$3-$2-$1')

your output
1983-12-22

\D - means any non-digital separators
DaZoB
Junior Member
Junior Member
Posts: 3
Joined: 2021-03-14, 19:17 UTC

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *DaZoB »

Hello,

I just found this plugin and activated the testPython.py example.
But TotalCommander just crashed when I tried to add a column with content [=winscriptsadv.Python].
I'm using TotalCommander 10.0 and Python 3.10 from python.org on Windows 10. Everything is 64 bit.
I installed the latest pywin32 with 'pip install pywin32'.
This is the normal way I work with Python all the time.

What are the prerequisites to use Python together with this plugin?
Do I have to add python.exe or something else to the PATH or how does the connection work?
How does it connect via COM to Python?
Does it only work with ActiveState Python and not with Python from python.org?
Or does it only work with Python 2? (which is deprecated and not developed anymore)
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *nsp »

To my knowledge scripting languages for this plugins, works using COM Object and ActiveX server to run script.
You should verify first if python ActiveX is well registered and if you can call it from an hta file !
see old documentation.
User avatar
Wojtek
Junior Member
Junior Member
Posts: 65
Joined: 2010-02-07, 11:58 UTC
Location: Germany

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *Wojtek »

Is it possible to use properties of other plugins?

For example, I would like to take the width and the height property to calculate the resolution.

Code: Select all

...
Dim w, h, res, str
w = [=image.Width]
h = [=image.Height]
res =  (w * h) / 1000000
str = res & " MPixels"
If this cannot be done, how do I gain the information I need?
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.02 32-bit #347308
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *nsp »

No from one plugin you do not have access to other plugin values...
Also TC do not provide any calculation scheme in user column :(
But you can access Image properties directly from VBScript :

Code: Select all

'============================================================================== 
'Script for WinScriptAdv content plugin
'
'Columns Returns the Width, Height, Resolution for Image 
'   content  - width;
'   content1 - height
'   content2 - resolution 
'============================================================================== 
Set objImage = CreateObject("WIA.ImageFile")
objImage.LoadFile filename 
content  = objImage.Width
content1 = objImage.Height 
content2 = ( objImage.Height * objImage.Width / 1000000) & " MPixels"
Set objImage = Nothing 
User avatar
Wojtek
Junior Member
Junior Member
Posts: 65
Joined: 2010-02-07, 11:58 UTC
Location: Germany

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *Wojtek »

nsp wrote: 2022-05-01, 08:25 UTC No from one plugin you do not have access to other plugin values...
Also TC do not provide any calculation scheme in user column :(
But you can access Image properties directly from VBScript :

Code: Select all

'============================================================================== 
'Script for WinScriptAdv content plugin
'
'Columns Returns the Width, Height, Resolution for Image 
'   content  - width;
'   content1 - height
'   content2 - resolution 
'============================================================================== 
Set objImage = CreateObject("WIA.ImageFile")
objImage.LoadFile filename 
content  = objImage.Width
content1 = objImage.Height 
content2 = ( objImage.Height * objImage.Width / 1000000) & " MPixels"
Set objImage = Nothing 
Many Thanks!

There is also another property which I would like to be displayed: Audio file bit depth (16/24/32 bit), but none of the plugins display this information.
I have already searched for "VBScript list audio bit depth", but couldn't find anything.

Do you know if there is such information in VBScript?
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.02 32-bit #347308
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *nsp »

I do not know if you can get it with VBSCript (give a look to getDetailsOf) but at least you can use MediaInfo.wdx you have a AUDIO_BitDepth field (need probably some tweaking), or tcmediainfo (resolution field) the one i prefer ;)
User avatar
Wojtek
Junior Member
Junior Member
Posts: 65
Joined: 2010-02-07, 11:58 UTC
Location: Germany

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *Wojtek »

I wish I could, but with TCMediaInfo I get an error and the plugin crashes.
See screenshots: https://1drv.ms/u/s!AqriqoLzwEu5rhFX4B2VU4VQUMDr?e=t9583T
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.02 32-bit #347308
User avatar
nsp
Power Member
Power Member
Posts: 1803
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *nsp »

You have in plugin folder, help file and readme.html. Read first the documentation to try troubleshouting.

Have you edited a TCMediaInfo.xml in plugin folder ?
For a first try, just copy the sample and the verify that you have mediainfo.dll in the path (plugin folder, TC Folder, ...)
You can get latest dll in official website.

Do you have write permission in plugin folder ?
User avatar
Wojtek
Junior Member
Junior Member
Posts: 65
Joined: 2010-02-07, 11:58 UTC
Location: Germany

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *Wojtek »

nsp wrote: 2022-05-02, 04:43 UTC Have you edited a TCMediaInfo.xml in plugin folder ?
No.
nsp wrote: 2022-05-02, 04:43 UTC Do you have write permission in plugin folder ?
Yes, but I use TC as regular user (Administrator) and each time an action requires admin rights, I get a popup window that asks for "confirmation" / "As Administrator".
nsp wrote: 2022-05-02, 04:43 UTC For a first try, just copy the sample and the verify that you have mediainfo.dll in the path (plugin folder, TC Folder, ...)
You can get latest dll in official website.
Wow, I downloaded the DLL (again), copied to the TCMediaInfo folder and... TADA, works!
I don't get it, I did the same thing a week ago, but still got errors. Today I did it and it worked!

Anyway, many thanks for the help!
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.02 32-bit #347308
User avatar
Rygor
Junior Member
Junior Member
Posts: 2
Joined: 2022-12-16, 06:59 UTC

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *Rygor »

Good morning,

First of all thank you for such a wonderful plugin! I use it with Python.

I have one FEATURE REQUEST. It is possible to use plugin with "Find file (Alt+F7)". Sometimes i have integer values to look for. For example, image size. But it is possible to use only text comparators (take a look at screenshot). Is it possible to add possibility to specify content type: text or numeracal. Numerical type - in order to use >, <, >=, <==, ==, != comparators in "Find file". Thank you very much in advance!

Image: https://i.ibb.co/c18MXMS/wds-variable-type.png
Last edited by Rygor on 2022-12-16, 11:48 UTC, edited 1 time in total.
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)

Post by *Fla$her »

2Rygor
Welcome.
The plugin does not have such settings. It is used only as an alternative when there are no more suitable analogues. The image size can be obtained by a number of other plugins. If you need something individual, then you can use RegEx.
Overquoting is evil! 👎
Post Reply