Custom Columns

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
admin
Site Admin
Posts: 49770
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Custom Columns

Post by admin » 01 Mar 2014 21:26

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 2675 times
:beer: :beer: :beer:
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

TheQwerty
Posts: 4353
Joined: 03 Aug 2007 22:30

Re: Custom Columns

Post by TheQwerty » 01 Mar 2014 23:46

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:

kunkel321
Posts: 590
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Re: Custom Columns

Post by kunkel321 » 02 Mar 2014 22:16

It was the "Dimensions" column that caught MY attention ;-)

How soon can we download?
ste(phen|ve) kunkel

admin
Site Admin
Posts: 49770
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Custom Columns

Post by admin » 03 Mar 2014 10:19

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:
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

admin
Site Admin
Posts: 49770
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Custom Columns

Post by admin » 03 Mar 2014 10:20

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:
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

PeterH
Posts: 2594
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Custom Columns

Post by PeterH » 03 Mar 2014 11:41

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:
W7(x64) SP1 German
( +WXP SP3 )

admin
Site Admin
Posts: 49770
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Custom Columns

Post by admin » 03 Mar 2014 11:48

That's the "maybe" part... :mrgreen:

Now off to the madness - D'r Zoch kütt! :beer:
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

totmad1
Posts: 131
Joined: 24 Jun 2013 12:37

Re: Custom Columns

Post by totmad1 » 03 Mar 2014 14:49

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;
          }
totmad1 (totally mad one)

TheQwerty
Posts: 4353
Joined: 03 Aug 2007 22:30

Re: Custom Columns

Post by TheQwerty » 03 Mar 2014 14:59

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:

admin
Site Admin
Posts: 49770
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Custom Columns

Post by admin » 03 Mar 2014 21:22

Here's a shot showing how easy it will be to create a column that displays the first 12 characters of each *.txt file.
Attachments
2014-03-03_112534.png
2014-03-03_112534.png (24.04 KiB) Viewed 2475 times
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

TheQwerty
Posts: 4353
Joined: 03 Aug 2007 22:30

Re: Custom Columns

Post by TheQwerty » 04 Mar 2014 22:01

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:

admin
Site Admin
Posts: 49770
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: Custom Columns

Post by admin » 04 Mar 2014 22:17

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.
FAQ | XY News RSS | XY Twitter | Stay home! 🎸 Or wear a mask! 😷

SFXAudio
Posts: 2
Joined: 05 Mar 2014 00:26

Re: Custom Columns

Post by SFXAudio » 05 Mar 2014 00:46

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

PeterH
Posts: 2594
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Custom Columns

Post by PeterH » 05 Mar 2014 00:52

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"...
W7(x64) SP1 German
( +WXP SP3 )

binocular222
Posts: 1414
Joined: 04 Nov 2008 05:35
Location: Hanoi, Vietnam

Re: Custom Columns

Post by binocular222 » 05 Mar 2014 02:20

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
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

Post Reply