Page 1 of 16

Custom Columns

Posted: 01 Mar 2014 21:26
by admin
Let's open a new topic for one of the most revolutionary things ever added to XY!

Here is a first screenshot to water your mouth. You will note extended shell properties finally shown in columns, and you will note a column whose contents are completely controlled by a script. In this case the script refers to the item itself, just to show that it can. But absolutely everything is possible!
CustomColumns.png
CustomColumns.png (57.71 KiB) Viewed 4259 times
:beer: :beer: :beer:

Re: Custom Columns

Posted: 01 Mar 2014 23:46
by TheQwerty
Sorry, but seeing return in the script caused me to ignore everything else in your post and I'm now extremely excited about the upcoming announcement of user-functions in 14.00. :twisted: :whistle:

Re: Custom Columns

Posted: 02 Mar 2014 22:16
by kunkel321
It was the "Dimensions" column that caught MY attention ;-)

How soon can we download?

Re: Custom Columns

Posted: 03 Mar 2014 10:19
by admin
TheQwerty wrote:Sorry, but seeing return in the script caused me to ignore everything else in your post and I'm now extremely excited about the upcoming announcement of user-functions in 14.00. :twisted: :whistle:
Relax, it's just a pseudo return. :mrgreen:

Re: Custom Columns

Posted: 03 Mar 2014 10:20
by admin
kunkel321 wrote:How soon can we download?
Maybe tomorrow...

It's totally exciting. This might be the most astonishing feature I ever added in the last 17 years... :cup:

Re: Custom Columns

Posted: 03 Mar 2014 11:41
by PeterH
admin wrote:
TheQwerty wrote:Sorry, but seeing return in the script caused me to ignore everything else in your post and I'm now extremely excited about the upcoming announcement of user-functions in 14.00. :twisted: :whistle:
Relax, it's just a pseudo return. :mrgreen:
Somehow I was afraid of hearing something like that :-( :cry:
admin wrote:
kunkel321 wrote:How soon can we download?
Maybe tomorrow...

It's totally exciting. This might be the most astonishing feature I ever added in the last 17 years... :cup:
Maybe tomorrow???
What's about Kölle Alaaf? :shock: :shock: :shock:

Re: Custom Columns

Posted: 03 Mar 2014 11:48
by admin
That's the "maybe" part... :mrgreen:

Now off to the madness - D'r Zoch kütt! :beer:

Re: Custom Columns

Posted: 03 Mar 2014 14:49
by totmad1
I've written this simple script which collects the "Dimensions" and places them in an Extra Column

Code: Select all

"ImageDimension"
          selfilter "*.jpg ; *.jpeg  ; *.png ; *.tif ; *.ico ; *.bmp; *.gif";
         extratag(1, "Dimensions");
         $SelectedItems = get("SelectedItemsPathNames", "|");
   foreach($Item, $SelectedItems, "|") {
           $Dimensions = property("Dimensions", "$Item");
           tag "$Dimensions",$Item , ex1;
          }

Re: Custom Columns

Posted: 03 Mar 2014 14:59
by TheQwerty
admin wrote:
TheQwerty wrote:Sorry, but seeing return in the script caused me to ignore everything else in your post and I'm now extremely excited about the upcoming announcement of user-functions in 14.00. :twisted: :whistle:
Relax, it's just a pseudo return. :mrgreen:
Right right.. it's a "pseudo return" in 13.90, but when user-functions are fully added to 14.00 it'll be a real return. :wink:



Pretty please? :cry:

Re: Custom Columns

Posted: 03 Mar 2014 21:22
by admin
Here's a shot showing how easy it will be to create a column that displays the first 12 characters of each *.txt file.

Re: Custom Columns

Posted: 04 Mar 2014 22:01
by TheQwerty
I've only just gotten my toes wet so far but it looks pretty good! :appl:
Some useful but too slow Column Scripts...

Code: Select all

"Hash"
  $i = "<cc_item>";
  if (Exists($i) == 1) {
    return hash('md5', $i, 1);
  } else {
    return '<Skipped>';
  }

Code: Select all

"In Catalog"
  $i = "<cc_item>";
  $c = CatalogReport(,'{Location}', 0);
  if (0 == GetTokenIndex($i, $c, "<crlf>", 'i')) {
    return 'no';  
  } else {
    return 'yes';
  }
Most useful for me so far seems to be just:

Code: Select all

return filetype("<cc_item>");
Could the scripts for a list-refresh be "bundled" together as if in the same session? Then they could share global variables across the refresh and thus "cache" expensive calls (CatalogReport above). I realize permanent variables could be used but then you have the overhead in keeping it from going stale or expiring the cache.

You didn't completely throw away the idea for User-Defined Context-Sensitive Columns did you? I hope not because I thought that was a really clever way to re-use columns!

Also, snippet support would be very helpful for sharing columns! ;)

:beer: :beer:

Re: Custom Columns

Posted: 04 Mar 2014 22:17
by admin
I will add <cc_isFolder>.

>Could the scripts for a list-refresh be "bundled" together...
Well, not now. Phase 2 or 3... maybe... :)

>You didn't completely throw away the idea for User-Defined Context-Sensitive Columns did you? I hope not because I thought that was a really clever way to re-use columns!
No, it will certainly come. But probably only in phase 2.

>Also, snippet support would be very helpful for sharing columns!
Sure, it's on my list.

Re: Custom Columns

Posted: 05 Mar 2014 00:46
by SFXAudio
Hey guys, I'm new here so sorry for asking a dumb question.

Is the script a VB Script? If so, what would I use for these file properties in Win7?:

-Sample Rate (for audio files, like .wav, .mp3, .flac, etc...)
-Audio bit depth - the current bit depth in the select property screen doesn't work on audio (maybe it's for images only?)
-Audio channels - there doesn't seem to be an option for this in the select property window.

Many thanks for the help! :D


Dave

Re: Custom Columns

Posted: 05 Mar 2014 00:52
by PeterH
SFXAudio wrote:Is the script a VB Script?
Sorry: no! It's XYplorers private scripting langue - you can get info under "Help / Help on Scripting Commands"...

Re: Custom Columns

Posted: 05 Mar 2014 02:20
by binocular222
v13.80.0102
:bug: : return readfile(<cc_item> , , 12) popup an scripting error message "Access is denied" then the column not works
:bug: : View > Reset Tree will make Custom Column disappear
:idea: : There should be an option to enable Auto Size Column for startup / tab switch / view change. Can't live without it.
:idea: : Custom column should be cached for each tab. It seems whenever I revisit the Tab, that column is re-created and significantly slow-down XY (especially for large folder)
:idea: "Copy Data" feature does not work with Full Row Select => It's ok, I can turn off Full Row Select, but with FRS off, let's make "Full Name-Column Select" which means clicking on empty area within Name Column will select instead of having to click on file name