Quick toggle custom columns

Discuss and share scripts and script files...
highend
Posts: 7217
Joined: 06 Feb 2011 00:33

Quick toggle custom columns

Postby highend » 10 Apr 2018 15:33

For me it's always a hassle to add a custom column to the current tab (too many clicks and mouse repositioning involved)
- Add Column
- Select Custom Column...
- ...

An (for me) easier way is provided by this script...

All checked custom columns are added to the current pane, all unchecked ones are removed. Easily invokable via a shortcut,
catalog entry, button, whatever...

Current version:
Toggle custom columns_v0.2.xys
(5.93 KiB) Downloaded 17 times


Old versions:
Toggle custom columns_v0.1.xys
(5.6 KiB) Downloaded 21 times
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

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

Re: Quick toggle custom columns

Postby admin » 11 Apr 2018 14:02

Not bad, might even use it. :)

PS: Great, I do use it! :appl:

klownboy
Posts: 2442
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Postby klownboy » 11 Apr 2018 16:47

Yes, that script makes it a lot easier to add and remove custom columns. :tup: It might be too much work, but an additional thought might be to indicate with a pre-checked box whether that the custom column is currently applied to that specific folder you're currently viewing in the list pane.

highend
Posts: 7217
Joined: 06 Feb 2011 00:33

Re: Quick toggle custom columns

Postby highend » 11 Apr 2018 17:22

It might be too much work, but an additional thought might be to indicate with a pre-checked box whether that the custom column is currently applied to that specific folder you're currently viewing in the list pane

If I don't get you wrong that's what it is already doing... :titter:
And if it's not, I consider it as a bug. Post the custom column definition for one that isn't checkmarked but visible in the current pane
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

klownboy
Posts: 2442
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Postby klownboy » 11 Apr 2018 20:38

Sorry highend, I didn't realize it was suppose to be reflecting existing CCs already. Originally when I ran it it reflected no checked boxes. When I just ran it again it only reflected the one box that I added on my original run (Video size) as you can see in the capture.
CC_Capture.JPG
CC_Capture.JPG (67.42 KiB) Viewed 443 times
Examples: Dimension and Aspect Ratio are simply using Special Property | Dimensions and Aspect Ratio respectively. Both are: Format:Mixed, Trigger: Click, Item type: Files, Item filter: jpg;jpeg;png;gif;psd;psb;ico

highend
Posts: 7217
Joined: 06 Feb 2011 00:33

Re: Quick toggle custom columns

Postby highend » 11 Apr 2018 20:43

Show me the snippet of both of these columns please and (for one of them) a screenshot of how it is configured
(I need to see all checkmarks inside the "Columns:" listview part in the config window for it)

Additionally please tell me if it works when you activate the cc number 12 with this script.
Is the cc checked on the next run and does it vanish when you deselect it?
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

klownboy
Posts: 2442
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Postby klownboy » 11 Apr 2018 21:38

CC_Dimension_Capture.JPG
CC_Dimension_Capture.JPG (40.93 KiB) Viewed 429 times
CC_Dimensions_Capture.JPG
CC_Dimensions_Capture.JPG (35.37 KiB) Viewed 429 times
Concerning CC#12, it did get properly added and removed via your script. I don't remember why I added that CC probably testing something especially since I have NO tags. I deleted it.
Attachments
CC_AR_Capture.JPG
CC_AR_Capture.JPG (33.49 KiB) Viewed 429 times

highend
Posts: 7217
Joined: 06 Feb 2011 00:33

Re: Quick toggle custom columns

Postby highend » 11 Apr 2018 22:04

I can't reproduce this behavior here, Ken...

Set up both columns like in your screenshots, the script perfectly shows them as active
when invoked and is able to remove / add them accordingly...

Can you step through it to see why it fails on your side?

Once we find out the culprit I release the next version. Fixed a small bug in v0.1
in the meantime, the name of a special property cc was always derived from the special
property, even if a value for the caption was used...
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

klownboy
Posts: 2442
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Postby klownboy » 12 Apr 2018 22:14

Hey highend, I stepped through the script a couple of times and wasn't able to pin point anything. A great deal of regex which I can't follow. I assume the problem would have to be in the area where the "+" is assigned to active columns. No Config settings should affect this I assume. I sent you my Custom Columns section of my ini file incase you can spot some obvious issue. Don't worry about this. I'll look some more later. Thanks.

highend
Posts: 7217
Joined: 06 Feb 2011 00:33

Re: Quick toggle custom columns

Postby highend » 12 Apr 2018 22:22

Hi Ken,

this is an animation of how the script behaves with your custom column setup
(sorry, forgot to capture the mouse cursor but I hope it's visible what I'm doing here):

anim.gif
anim.gif (353.48 KiB) Viewed 375 times


Can't see anything wrong here...
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

klownboy
Posts: 2442
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Postby klownboy » 13 Apr 2018 14:02

I don't know what caused the original problem for me even after doing a fresh, but I forgot to mention that I have a bunch of column layouts and one for the Downloads folder layout that I was using with your script. After reloading the column layout, applying some modifications to my columns, the check marks in the dialog box are all appearing as they should be reflecting all existing custom columns. I have another column layout I'll apply to my MP3 folder and report back later.

highend
Posts: 7217
Joined: 06 Feb 2011 00:33

Re: Quick toggle custom columns

Postby highend » 16 Apr 2018 23:36

v0.2 at the beginning of this thread...

Code: Select all

/*
@Changelog:
v0.2
  ! The name for a special property column was always taken from the (non-technical) part of
    the special property, even if a name for the caption is used
*/

One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

klownboy
Posts: 2442
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Postby klownboy » 17 Apr 2018 14:06

Hi highend, I've been meaning to get back to you on your script. When I checked out my detailed view for my MP3 folder, my previously saved detailed view was not showing. It had been a long time since I'd been in the folder. So I reloaded my saved column layout and saved my FVS. Once that was done, I ran your script and it worked fine.

I wanted to mention, you saved a Q & A post that I was going to make today about only wanting to see the column headers when in Details View. I noticed your post this morning over here https://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=18768#p158094 What a coincidence. No need for me to see the headers in other views. Honestly, I'm not sure why that wouldn't be the default. These settings in the ini give me exactly what I want (i.e., seeing the headers in Details View only). Thanks.

Code: Select all

SortHeadersInAllViews=0
SortHeadersOffInDetailsToo=0


Return to “Script Exchange”



Who is online

Users browsing this forum: No registered users and 1 guest