Custom Column script no longer working.

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom Column script no longer working.

Post by highend »

Change the line to: return <cc_item>;
C:\Test_Video.mp4 is shown for that test video file in the cc?
One of my scripts helped you out? Please donate via Paypal

Max_T
Posts: 19
Joined: 17 Sep 2019 15:15
Location: Windows 11 24H2 100%

Re: Custom Column script no longer working.

Post by Max_T »

Yep, that works.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom Column script no longer working.

Post by highend »

Then I have no clue why you don't see anything in the cc...
My suggestion would be: Write a script that uses the mediainfo output to write that info into the XY tag database and retrieve the cc values from it.
This will work (as the text ... script already showed) and it would make info retrieval 10.000% faster...
One of my scripts helped you out? Please donate via Paypal

Max_T
Posts: 19
Joined: 17 Sep 2019 15:15
Location: Windows 11 24H2 100%

Re: Custom Column script no longer working.

Post by Max_T »

Thank you for the suggestion and your time.

Unfortunately I don't know how to write a script like that. I don't really know much about scripting and particularly not XY's scripting format.
The code I had I copied from another script that was trying to get video length. I played around with a few things to get to the code that I had.

What's the most interesting thing about this entire situation, is that it did work at one point, when I created the column. Sadly I don't know at what point it stopped working or why, what caused it or what I did that caused it to stop working.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom Column script no longer working.

Post by highend »

Go into your main video folder

Run this script:

Code: Select all

    $mediainfo  = "C:\Users\DVoid\Documents\MediaInfo\MediaInfo.exe";
    $videoFiles = quicksearch("/n /types={:Video}", 3:="s");
    end (!$videoFiles), "No video file(s) found, aborted!";

    $log = "";
    foreach($file, $videoFiles, <crlf>, "e") {
        status "Processing: " . gpc($file, "file"), , "progress";
        $log .= regexreplace(runret("""$mediainfo"" --Inform=Video;%Encoded_Library% ""$file"""), "\r?\n") . <crlf>;
        wait 1;
    }
    text formatlist($log, "sed", <crlf>);
Post the output and additionally, compile a list of terms you want to keep in it.

E.g.:

Code: Select all

Lavc58.17.100 libx264
x264 - core 133 r2339 585324f
x264 - core 155 r2901 7d0ff22
And _my_ compiled list would only be:

Code: Select all

libx264
x264
One of my scripts helped you out? Please donate via Paypal

Max_T
Posts: 19
Joined: 17 Sep 2019 15:15
Location: Windows 11 24H2 100%

Re: Custom Column script no longer working.

Post by Max_T »

I'm getting an error running that script.
EDIT: Tried it in a couple different folders, they all give the same error. I thought maybe there was an issue with reading the codecs on some of the videos, because the %Encoded_Library% returns nothing for some videos.

But, the example output you gave is ideally how I'd want it.

Image
Last edited by Max_T on 12 Sep 2025 19:50, edited 1 time in total.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom Column script no longer working.

Post by highend »

Let me guess, executing this:

Code: Select all

text regexreplace(runret("""C:\Users\DVoid\Documents\MediaInfo\MediaInfo.exe"" --Inform=Video;%Encoded_Library% ""<cc_item>"""), "\r?\n");
will lead to the same error?
One of my scripts helped you out? Please donate via Paypal

Max_T
Posts: 19
Joined: 17 Sep 2019 15:15
Location: Windows 11 24H2 100%

Re: Custom Column script no longer working.

Post by Max_T »

highend wrote: 12 Sep 2025 19:48 Let me guess, executing this:

Code: Select all

text regexreplace(runret("""C:\Users\DVoid\Documents\MediaInfo\MediaInfo.exe"" --Inform=Video;%Encoded_Library% ""<cc_item>"""), "\r?\n");
will lead to the same error?
Yeah, getting the same error.
I'm seeing what is the potential issue.
Last edited by Max_T on 12 Sep 2025 19:54, edited 1 time in total.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom Column script no longer working.

Post by highend »

There's the reason your cc column doesn't work anymore...

Open a command prompt with admin privileges, execute this line:

Code: Select all

regsvr32 "C:\Windows\SysWOW64\vbscript.dll"
Do you get a blablabla succeeded.
message window?

If yes, try the script line from the last post again.
Still the same error?
One of my scripts helped you out? Please donate via Paypal

Max_T
Posts: 19
Joined: 17 Sep 2019 15:15
Location: Windows 11 24H2 100%

Re: Custom Column script no longer working.

Post by Max_T »

highend wrote: 12 Sep 2025 19:53 There's the reason your cc column doesn't work anymore...

Open a command prompt with admin privileges, execute this line:

Code: Select all

regsvr32 "C:\Windows\SysWOW64\vbscript.dll"
Do you get a blablabla succeeded.
message window?

If yes, try the script line from the last post again.
Still the same error?
Weird thing; that file is missing. I got an error trying to reregister it and it appears the file is gone.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom Column script no longer working.

Post by highend »

Settings > Apps > Optional Features > Add a feature
Look for "VBScript"
One of my scripts helped you out? Please donate via Paypal

Max_T
Posts: 19
Joined: 17 Sep 2019 15:15
Location: Windows 11 24H2 100%

Re: Custom Column script no longer working.

Post by Max_T »

These are the codecs it returns for this one particular folder. If it just reports the first part, like the example you gave, then that'll be good enough.

Code: Select all

AVC Coding
'avc1'
bvc0ot v2.2.1.2-20240711
dailymotion/hls.js
Elemental H.264
encoded by TMPGEnc (ver. 2.524.63.181)
H.264
h264
HEVC
Lavc56.60.100
Vimeo Encoder
Vision-264-core V1.1.0.0-2-g8240368
VPC Coding
x264 - core 115
XviD0050

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom Column script no longer working.

Post by highend »

Code: Select all

$data = regexreplace(runret("""C:\Users\DVoid\Documents\MediaInfo\MediaInfo.exe"" --Inform=Video;%Encoded_Library% ""<cc_item>"""), "\r?\n");
    return regexreplace($data, "[ ]+.*");
One of my scripts helped you out? Please donate via Paypal

Max_T
Posts: 19
Joined: 17 Sep 2019 15:15
Location: Windows 11 24H2 100%

Re: Custom Column script no longer working.

Post by Max_T »

Thank you very much for all your time and effort. I appreciate all your effort very much. The script is perfect. Thank you again.

highend
Posts: 14991
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Custom Column script no longer working.

Post by highend »

@Don

Is there already a faq entry for this: viewtopic.php?p=232292#p232292
?
One of my scripts helped you out? Please donate via Paypal

Post Reply