Custom Event Action for changing columns

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
hermhart
Posts: 248
Joined: 13 Jan 2015 18:41

Custom Event Action for changing columns

Post by hermhart »

I'm hoping someone can help me figure this out. I am trying to get the Status column to only appear when I browse a directory where the <curpath> contains "OneDrive" somewhere in it. I have tried the following code in all three of the Custom Event Action - Changing Locations Events separately, but it seems that no matter what way I try, it either doesn't work at all, or the Status column shows up all the time. Any thoughts on how to only get this to show with "OneDrive" in the <curpath>?

Code: Select all

 $path = <curpath>;
 if ($path like "*OneDrive*") {
    // Adjust the comma-separated list to match your preferred columns (including Status)
    setcolumns("Name,Size,Modified,Status");
 } else {
    // Standard layout without Status
    setcolumns("Name,Size,Modified");
 }
Windows 11 Pro; 100% scaling

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

Re: Custom Event Action for changing columns

Post by highend »

if (<newpath> Like "*OneDrive*") {
One of my scripts helped you out? Please donate via Paypal

hermhart
Posts: 248
Joined: 13 Jan 2015 18:41

Re: Custom Event Action for changing columns

Post by hermhart »

Thanks highend, that worked!
Windows 11 Pro; 100% scaling

kiwichick
Posts: 713
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Custom Event Action for changing columns

Post by kiwichick »

highend wrote: 03 Sep 2026 17:37 <newpath>
So this variable doesn't appear in the help file section for native variables. I've also seen other variables referenced in scripts (eg: <cc_item>) that also don't appear there. Is there a list anywhere of these variables, and is there any particular reason they aren't in that help file section?
Windows 10 Pro 22H2

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

Re: Custom Event Action for changing columns

Post by highend »

Ofc there are lists for them. Custom event actions and custom columns sections in the help file

And they aren't in the normal list because they are scope specific
One of my scripts helped you out? Please donate via Paypal

kiwichick
Posts: 713
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: Custom Event Action for changing columns

Post by kiwichick »

highend wrote: 07 Sep 2026 09:09 Ofc there are lists for them. Custom event actions and custom columns sections in the help file

And they aren't in the normal list because they are scope specific
They may be scope specific but how would anyone know they even exist when they included aren't where the other variables are listed? Even links on the Variables page of the help file to places like CEA and custom columns would be useful.
Windows 10 Pro 22H2

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

Re: Custom Event Action for changing columns

Post by highend »

They can't be used in normal script context so listing them together with all other variables (that are used in normal script context^^) is just pointless
One of my scripts helped you out? Please donate via Paypal

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

Re: Custom Event Action for changing columns

Post by jupe »

@hermhart: FYI you don't need a script to achieve OneDrive specific columns, you can just use FVS.

https://www.xyplorer.com/tour.php?page=fvs
https://www.xyplorer.com/release_7.50.php#fvs

Post Reply