Toggle Special Columns

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
aegis111
Posts: 12
Joined: 13 Mar 2026 23:45

Toggle Special Columns

Post by aegis111 »

hey everyone!

I recently discovered the concept of smart columns, and decided to experiment by creating columns for audio, video and image files.
I assigned 3 commands to 3 buttons.

1/
audio files:

Code: Select all

setcolumns(":s-audio.length,:s-audio.bitdepth,:s-audio.bitrate,:s-audio.channels,:s-audio.samplerate", 24);
2/
image files:

Code: Select all

setcolumns(":s-image.dimensions,:s-aspectratio,:s-image.datetaken,:s-image.cameramodel,:s-image.isospeed,:s-image.exposuretime,:s-image.focallength", 24);
3/
video files:

Code: Select all

setcolumns(":n-324,:n-322,Custom 7,Custom 10,:s-aspectratio,:n-323", 24);
the idea is that i can toggle these columns on and off by pressing on the buttons.


The problem is that in the case of the video columns, instead of toggling they keep piling on everytime you click on the button.

What am i doing wrong?




(
for anyone who hasn't seen the special columns before:

I used this for inspiration:
https://www.xyplorer.com/release_13.90. ... bleColumns

used this function, to find the column names.
text setcolumns();
)

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Toggle Special Columns

Post by jupe »

Toggling Custom Columns can be a bit finicky, there are 2 types, soft/hard and they require different approaches, anyway if you are just after a working version of the above, it should work if you do it like below, but you also need to move your Custom Column definitions for 7 & 10 to entries 11 & 12 instead, or anything 11+, because the first 10 act differently.

Code: Select all

setcolumns(":n-324,:n-322,:d-11,:d-12,:s-aspectratio,:n-323", 24);
Surprised you are using so many props 320+

aegis111
Posts: 12
Joined: 13 Mar 2026 23:45

Re: Toggle Special Columns

Post by aegis111 »

> Toggling Custom Columns can be a bit finicky, there are 2 types ...
welp, that explains the weird behavior.


> you also need to move your Custom Column definitions for 7 & 10 to entries 11 & 12 instead, or anything 11+
this fixed the issue -- thank you!!


> Surprised you are using so many props 320+
hm, i don't have any custom columns or props that i know of ?

I went into `configuration` and `Custom Columns` and i see 16 definitions (populated values) and it goes all the way to 64 with undefined.

You are saying that i put the 16 definitions in? (I've used roughly the same config for 15 years so maybe i copy pasted them in the past and forgot about it.)

Also regarding the undefined, i see this in the XYplorer.ini (repeated for slots from 17 to 64):

Code: Select all

Caption64=
Type64=0
Definition64=""
Format64=0
Trigger64=0
ItemType64=0
ItemFilter64=""

Can I just the delete these lines?


how about the 320+ props? where do i find these?


sorry for the barrage of questions, really appreciate your help and any pointers you can give me!

jupe
Posts: 3462
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Toggle Special Columns

Post by jupe »

aegis111 wrote: 15 Mar 2026 09:26 hm, i don't have any custom columns or props that i know of ?
Well you were using Custom 7 & 10, which I assume are Bit Rate and Length, those could be changed to Property/Special Property columns instead via the column header if you wanted, but I think then the value would have a kbps suffix, which you may not prefer.
aegis111 wrote: 15 Mar 2026 09:26 I went into `configuration` and `Custom Columns` and i see 16 definitions (populated values) and it goes all the way to 64 with undefined.
You are saying that i put the 16 definitions in? (I've used roughly the same config for 15 years so maybe i copy pasted them in the past and forgot about it.)
No I wasn't saying that at all, by default there are 16 as examples.
aegis111 wrote: 15 Mar 2026 09:26 Can I just the delete these lines?
No don't delete anything related to CC's in the ini.
aegis111 wrote: 15 Mar 2026 09:26 how about the 320+ props? where do i find these?
In your originally posted script, you should be toggling 6 columns, 2 are custom columns, 1 is special property, 3 are property columns, which are numbered 322 > 324 in your case, which I found strange because usually (up to Win10 anyway) shell property numbers stopped at 320ish, although you can install 3rd party shell extensions that add more, or maybe there is some other reason you have 3 video related properties as those numbers, anyway its not important forget I mentioned it.

aegis111
Posts: 12
Joined: 13 Mar 2026 23:45

Re: Toggle Special Columns

Post by aegis111 »

got it -- thanks again for the help! much appreciated

Post Reply