combine 2 columns into one?

Discuss and share scripts and script files...
Post Reply
yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

combine 2 columns into one?

Post by yusef88 »

Hi, I want "Frame height and Frame width" columns to be in one column.
after searching in the help file I reached this script but how to put it in a custom column

Code: Select all

echo property('System.Video.FrameWidth') . 'x' . property('System.Video.FrameHeight');
To see the attached files, you need to log into the forum.

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

Re: combine 2 columns into one?

Post by highend »

long version:

Code: Select all

    $x = property('System.Video.FrameWidth', <cc_item>);
    $y = property('System.Video.FrameHeight', <cc_item>);
    if ($x && $y) { return $x . 'x' . $y };
    else { return "<not supported>" };
short one (if you have a codec for all file formats installed and hence won't get the "x" column entry):

Code: Select all

    return property('System.Video.FrameWidth', <cc_item>) . 'x' . property('System.Video.FrameHeight', <cc_item>);
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: combine 2 columns into one?

Post by yusef88 »

both scripts work well..thanks a lot.

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

Re: combine 2 columns into one?

Post by highend »

You could also use a template instead, like:

Code: Select all

<prop 'System.Video.FrameWidth'>x<prop 'System.Video.FrameHeight'>
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: combine 2 columns into one?

Post by yusef88 »

All Roads Lead to Rome :tup:

Post Reply