[wdx] WinScript Advanced Content Plugin (x86\x64) (new)
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 20
- Joined: 2011-10-30, 15:35 UTC
Updated
v1.6 10 June, 2016
***
Added PowerShell scripting language support
____________________________________________
PowerShell.exe needs some time to start before first use, usually near 3-6 seconds. So in the first 3-6 seconds (after starting Totalcmd) columns will be empty.
PowerShell.exe is starting only once and remains running until you close WinScriptAdv.
You can speed up powershell startup (in general, not only in WinScriptAdv) if you run script below in PowerScript console once.
Before : powershell.exe is starting near 5 seconds
After : powershell.exe is starting near 1.5 seconds
PS script:Source
v1.6 10 June, 2016
***
Added PowerShell scripting language support
____________________________________________
PowerShell.exe needs some time to start before first use, usually near 3-6 seconds. So in the first 3-6 seconds (after starting Totalcmd) columns will be empty.
PowerShell.exe is starting only once and remains running until you close WinScriptAdv.
You can speed up powershell startup (in general, not only in WinScriptAdv) if you run script below in PowerScript console once.
Before : powershell.exe is starting near 5 seconds
After : powershell.exe is starting near 1.5 seconds
PS script:
Code: Select all
$env:path = [Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()
[AppDomain]::CurrentDomain.GetAssemblies() | % {
if (! $_.location) {continue}
$Name = Split-Path $_.location -leaf
Write-Host -ForegroundColor Yellow "NGENing : $Name"
ngen install $_.location | % {"`t$_"}
}
-
- Junior Member
- Posts: 20
- Joined: 2011-10-30, 15:35 UTC
Updated
v.1.7
***
Script unification, for scripts that work directly with an exe interpreter - AHK, PHP, Autoit:
Now you do not need to print values of "content" variables to the console stdOut from your script code. (Plugin will generate and add these strings).
So delete this strings from the end of your scripts (btw plugin also will work correctly if you do not delete that code).
***
Added 2 new params for ExeScriptParsers section:
StdOutFormat and CmdArgs
E.g.:
au3=c:\Program Files (x86)\AutoIt3\AutoIt3.exe
au3CmdArgs=ExeArgs
au3StdOutFormat=ConsoleWrite ($%s & @CRLF)
Read info in options.ini
Now you can use VBS in portable versions of Total Commander:
options.ini:
v.1.7
***
Script unification, for scripts that work directly with an exe interpreter - AHK, PHP, Autoit:
Now you do not need to print values of "content" variables to the console stdOut from your script code. (Plugin will generate and add these strings).
So delete this strings from the end of your scripts (btw plugin also will work correctly if you do not delete that code).
***
Added 2 new params for ExeScriptParsers section:
StdOutFormat and CmdArgs
E.g.:
au3=c:\Program Files (x86)\AutoIt3\AutoIt3.exe
au3CmdArgs=ExeArgs
au3StdOutFormat=ConsoleWrite ($%s & @CRLF)
Read info in options.ini
Now you can use VBS in portable versions of Total Commander:
options.ini:
Code: Select all
; This VBS interpreter is only for example, WinScriptadv uses vbs\js\python engines via COM that is much faster than this.
; You can use it in portable versions of Total commander or if WSH is broken in Windows.
;vbs=%WINDIR%\system32\cscript.exe
;vbsCmdArgs=//nologo
;vbsVarFormat=filename="%s"
;vbsDoubleSlashPath=0
;vbsStdOutFormat=Wscript.echo %s
-
- Junior Member
- Posts: 20
- Joined: 2011-10-30, 15:35 UTC
I've read your source code comments about the problem of redirecting StdIn to PowerShell.
To avoid all the redirecting and sending keystrokes you can call PowerShell with a small .Net host application that uses the PowerShell .Net class.
See Writing a Windows PowerShell Host Application and also here and here for example.
This allows you to reuse the PowerShell instance and even asynchronous execution (don't know if that is feasible).
To avoid all the redirecting and sending keystrokes you can call PowerShell with a small .Net host application that uses the PowerShell .Net class.
See Writing a Windows PowerShell Host Application and also here and here for example.
This allows you to reuse the PowerShell instance and even asynchronous execution (don't know if that is feasible).
plugin crashes when selecting plugin properties
When I select the plugin properties, a crash occurs. See image below
Image: https://ibin.co/2y7v9hTvnFEL.png
Edit by moderator, me getting the same error on 32-bit Win7 and TC_9.21a:
I can just click [OK] and continue.
(happens twice for me on one column selction)
Also possible to type the plugin.string by hand without using the selector dialog,
like this example: [=winscriptsadv.NameOfWantedColumn]
Image: https://ibin.co/2y7v9hTvnFEL.png
Edit by moderator, me getting the same error on 32-bit Win7 and TC_9.21a:
Code: Select all
---------------------------
error
---------------------------
Crash in plugin WinScriptsAdv.wdx:
External exception EEDFADE
---------------------------
OK Cancel
---------------------------
I can just click [OK] and continue.
(happens twice for me on one column selction)
Also possible to type the plugin.string by hand without using the selector dialog,
like this example: [=winscriptsadv.NameOfWantedColumn]
-
- Junior Member
- Posts: 18
- Joined: 2015-12-04, 15:05 UTC
Hi, thats a nice Plugin.
I have a question:
How does that work with the Python scripts? How does the plugin read the contents of the content variables? (And how does it send the filename variable?) The script contains no COM related stuff. Does the plugin preparse the files for lines starting with contentx ???
I know nothing about COM, so maybe my question is stupid, sorry in that case.
I have a question:
How does that work with the Python scripts? How does the plugin read the contents of the content variables? (And how does it send the filename variable?) The script contains no COM related stuff. Does the plugin preparse the files for lines starting with contentx ???
I know nothing about COM, so maybe my question is stupid, sorry in that case.
Hi and thank you for this cool plugin.
I tried that PHP script.
It is not working for me. The column shows only "echo $content" it is not being parsed.
I tried with different php versions. PHP 5.4, 5.6 and 7.
php 5.6 and 7 is not showing anything, the column is empty.
Do I have to enable something in php.ini?
Thanks.
I tried that PHP script.
It is not working for me. The column shows only "echo $content" it is not being parsed.
I tried with different php versions. PHP 5.4, 5.6 and 7.
php 5.6 and 7 is not showing anything, the column is empty.
Do I have to enable something in php.ini?
Thanks.
-
- Junior Member
- Posts: 18
- Joined: 2015-12-04, 15:05 UTC
Have you changed that script? i ran into problems (under python) when i added spaces in front of the contentx variables.qxxx wrote:The column shows only "echo $content" it is not being parsed.
I tried with different php versions. PHP 5.4, 5.6 and 7.
php 5.6 and 7 is not showing anything, the column is empty.
eg
Code: Select all
f = open(filename, 'r', encoding="utf-8")
content = f.readline()
f.close()
Code: Select all
with open('testPython.py', 'r', encoding="utf-8") as f:
content = f.readline()
i dont have PHP installed, so i can not test it.
Re: plugin crashes when selecting plugin properties
The same here. Both version of TC 9.0a are affected.billiebub wrote:When I select the plugin properties, a crash occurs.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
#259941, TC 11.01 x64, Windows 7 SP1 x64
-
- Junior Member
- Posts: 2
- Joined: 2017-05-13, 09:58 UTC
A terrible mishap is with POWERSHELL encoding. Tried everything possble. It has the habit of giving output in unicode, so then when I appoint a output variable a string
$content="Ян Синклер. Введение в цифровую звукотехнику. 1990.djvu"
And that's what I got in column output.
СџВ вЂ˜РЃВЄ«Ґа. ‚ўҐ¤ҐВРЃТђ Сћ жЁда®ўго §ўгЄ®вҐеВЁЄг. 1990.djvu
$content="Ян Синклер. Введение в цифровую звукотехнику. 1990.djvu"
And that's what I got in column output.
СџВ вЂ˜РЃВЄ«Ґа. ‚ўҐ¤ҐВРЃТђ Сћ жЁда®ўго §ўгЄ®вҐеВЁЄг. 1990.djvu
- thomasmolover
- Member
- Posts: 173
- Joined: 2016-12-12, 01:32 UTC
i like this plugins and try to translate it to CHN langrage with content in file options.ini & readme to ReadMe_CN.txt
I upload the file into GDrive
here
https://drive.google.com/file/d/1tlLW8cEpgd-o2-Q4QbeTl9mBgkwaw1ie/view?usp=sharing
I upload the file into GDrive
here
https://drive.google.com/file/d/1tlLW8cEpgd-o2-Q4QbeTl9mBgkwaw1ie/view?usp=sharing
Re: [wdx] WinScript Advanced Content Plugin (x86\x64) (new)
Hi,
first of all I want to thank the author for this great plugin, it seems very promising.
I would like to create my own scripts. I'm mostly familiar with JS and just a little bit VBS (actually I know only VBA, but they are similar).
The problem is that I don't understand the concept of this plugin and the options.ini file is a bit confusing.
Is it possible to get any other information than a files properties? For example the width (in pixels) of an image file or the duration (in seconds) of an audio file?
first of all I want to thank the author for this great plugin, it seems very promising.
I would like to create my own scripts. I'm mostly familiar with JS and just a little bit VBS (actually I know only VBA, but they are similar).
The problem is that I don't understand the concept of this plugin and the options.ini file is a bit confusing.
Is it possible to get any other information than a files properties? For example the width (in pixels) of an image file or the duration (in seconds) of an audio file?
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