Custom Columns

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Custom Columns

Post by TheQwerty »

Trigger On Click...

1) 'Refresh Column' should only update those cells that have already been triggered.
2) Instead a new command 'Trigger Column' should trigger it for all items.
3) Might also be desirable to have 'Trigger Visible' or 'Trigger List' so that only those items currently visible are refreshed.

This would allow the user to trigger a few of the visible items and refresh them without triggering all items.

And again all of these command should be available for keyboard shortcuts.


Trigger On List...
1) Doesn't work in fresh. The following should repeat the Name column for files:

Code: Select all

Snip: CustomColumn 1
  XYplorer 13.90.0111, 4/15/2014 2:02:09 PM
Action
  ConfigureColumn
Caption
  
Type
  0
Definition
  0
Format
  0
Trigger
  1
Item Type
  0
Item Filter
  
[/size]

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

Re: Custom Columns

Post by kunkel321 »

I don't think I'd care for the "On Hover" trigger... I tend to "think with my mouse." I can't seem to look at something without my mouse finding its way there...

RE: "On Click:" I don't think you'd want all of the items to calculate on a single click; but how about all selected items? For example, I could do a rectangle selection

Image

then click one of the trigger buttons inside the selected area, and all selected items would be calculated. Doing Ctrl+A, then clicking would calculate all items... Just a thot.
ste(phen|ve) kunkel

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom Columns

Post by admin »

klownboy wrote:If you hit ESC anytime during the image display, as expected, you'll get a "Script terminated by ESC" message. However, you will get a "Skipped by Escape" message in the column replacing the "script arrow icon" on any subsequent type click presses of any other image files. As a matter of fact, if you leave the folder go back and refresh it and hit ESC even before you click on the "script arrow icon" for an image, the image does not display and you'll receive the "Skipped by Escape" message in the column where the script arrow icon was. Do the same thing again go back to the folder refresh and click on the script arrow icon for an image it works, but as soon as you hit Esc even after the image displays and disappears, the subsequent clicks on the script arrow icons will display that message "Skipped by escape". It's like the Escape is staying in memory and has a lasting after on all subsequent attempts to view the picture using the trigger "click". I put a "return" on the end of the script but obviously that has a different affect where the script icon goes away after being played once, again that's as expected.
Thanks, confirmed. Fix coming...

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

Re: Custom Columns

Post by klownboy »

Thanks for those fixes Don. :beer:
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

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

Re: Custom Columns

Post by binocular222 »

1) a tiny wish: Right click a custom column > rename column
should pre-fill the input dialog box with target column's header
(currently the box is default to blank)

2) Bug:
Hard Custom Column from 1 to 5: Trigger = "List" not work (show empty) while "List" does works with soft columns

3) Reset tree (#484) deactivate Autosize column (apply to custom soft columns only) - is this intentional?

4) On tab change and Autosize on, the soft columns are autosized to the width of their headers instead of its content - is this a bug
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Custom Columns

Post by bdeshi »

VirusTotal Reporter Custom Column Edition.
Read more at original script thread:viewtopic.php?f=7&t=11360
Xyplorer takes care of sorting! (:whistle: can't say the same about the script)
type ::snippet; in the addressbar and paste the following code:

Code: Select all

Snip: CustomColumn 1
  XYplorer 13.90.0112, 4/17/2014 9:31:22 PM
Action
  ConfigureColumn
Caption
  VTReport
Type
  3
Definition
  	$thisHash = "" ; $vtURL = "" ; $vtReturn = "" ; $vtGet = "" ;
  	// if item is not a folder
  	if (<cc_isfolder> != 1) {
  		$fsize = filesize(<cc_item>);
  		if ($fsize <= 67108864) {
  			unset $fsize;
  			$thisHash = hash("sha256", <cc_item>, 3) ;
  			$vtURL = "https://www.virustotal.com/en/file/$thisHash/analysis/", "r" ;
  			$vtGet	= readurl("$vtURL", 1, 1, 1) ;
  			$vtReturn = regexmatches($vtGet, '^[\d]+\s/\s[\d]+') ;
  			unset $vtGet ; // it's relatively large, the less used the faster ;)
  			if ($vtReturn == "") {
  				return "N/A" ;
  			} else {
  				return $vtReturn ;
  			}
  			} else {
  				return ">64mb"
  			}
  	// if item is a folder
  	} else {
  		return "---" ;
  	}
Format
  0
Trigger
  2
Item Type
  0
Item Filter
  *
A custom column VTReport will be created. Now just add that column to the list.
even though it's by default a clickable CC script, check in configurations if trigger indeed is 'click'
Don, It seems trigger type is not set correctly via snippets? it always sets trigger to 'browse'?
Each report is parsed from a webpage, so don't change the trigger type to something else, unless you want to try and suffocate XYplorer

REMEMBER, NO ANTI-MALWARE SOLUTION IS PERFECT! ALWAYS BE SUSPICIOUS OF SUSPICIOUS FILES!
Attachments
virustotal reporter - custom column edition
virustotal reporter - custom column edition
vtreportcc.png (12.32 KiB) Viewed 2316 times
Last edited by bdeshi on 17 Apr 2014 17:42, edited 3 times in total.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

LittleBiG
Posts: 1846
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Custom Columns

Post by LittleBiG »

Great, thanks!

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Custom Columns

Post by FluxTorpedoe »

Hi'
At last I could find a moment to try Custom Columns! :appl: So many possibilities that it's hard to envision its full potential! :cup:

A few questions ( :bug: ?) and suggestions:

1. With "Trigger: Browse" for scripted CCs, switching between tabs lose responsiveness while XY computes the CC values, even when those CC aren't visible — e.g. even when switching to a tab in List view!

2. With "Trigger: List" for scripted CCs, custom columns don't keep their (autocalculated) size but are shrunk when switching between tabs (on a default ::fresh) — whereas with "Trigger: Browse", their size remains correct and doesn't change on tab switching.
CC Autosize.png
CC Autosize.png (6.94 KiB) Viewed 2266 times
3. With setcolumns() and flag "3" to define columns visibility and their width, the visibility and width are correctly set for regular columns, but only the visibility is set for CCs, not the width (whether they're referenced by ":d-#" or ":d-Name").

Code: Select all

setcolumns("+Name, Ext, +Label.100", 3); // Label is shown and sized
setcolumns("+Name, Ext, +:d-1.100", 3);  // CC-#1 is shown but not sized
:idea: 4. Wish: "Trigger: Refresh" "Do not AutoUpdate CCs"
It would only compute the CC values the first time they're displayed, or on RefreshList / RefreshColumn — in any other case (e.g. tab switching), the existing values, obsolete or not, would remain displayed as is. Huge responsiveness booster!
Edit:The more I use CCs, the more I think a "Do not update" is important. Though it should be available for all Trigger modes, so it'd rather be a checkbox like "Only update cells on refresh". That way, even "Click" CCs would keep their already calculated content (e.g. on tab switching), instead of reverting to the script icon.

:idea: 5. Wish: CTRL+Click on a "Trigger: Click" icon would trigger the computation for the whole CC (same as "Refresh Column"); ALT+CTRL+Click would compute all "Trigger: Click" CCs. Alternately, it could be set by a tweak...

- - - - - - - - -

Case for #4: my first "need" for CCs was to create two columns that would display folder content (nb dirs > nb files) and folder size (cf. screenshot) — BUT without being cleared on tab switching like what happens with "Calculate Folder Sizes". This already works (it's not cleared), but it's recalculated every time...

Well, I hope I didn't throw too much at once — it's been a while, I guess I missed tinkering with XYplorer! :biggrin:

Have a nice day, 8)
Flux

PS: just in case, here are the scripts of my two columns.

Code: Select all

// Ext+
  if <cc_isfolder> {
    return foldersize(<cc_item>, "<d>")."  ›  ".foldersize(<cc_item>, "<f>");
  } else {
    return getpathcomponent(<cc_item>, "ext");
  }

// Size+
  if <cc_isfolder> {
    return formatbytes(foldersize(<cc_item>, "<r>"));
  } else {
    return report("{size FLEX}", <cc_item>);
  }
[/size]

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Custom Columns

Post by bdeshi »

Here's a supporter for point 4. Current behaviour is very nearly irritating.
FluxTorpedoe wrote:4. Wish: "Do not AutoUpdate CCs"
It would only compute the CC values the first time they're displayed, or on RefreshList / RefreshColumn — in any other case (e.g. tab switching), the existing values, obsolete or not, would remain displayed as is. Huge responsiveness booster!
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom Columns

Post by admin »

TheQwerty wrote:1) 'Refresh Column' should only update those cells that have already been triggered.
2) Instead a new command 'Trigger Column' should trigger it for all items.
Agreed, but I will leave this for a later phase.

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom Columns

Post by admin »

SammaySarkar wrote:Don, It seems trigger type is not set correctly via snippets? it always sets trigger to 'browse'?
Yes: :bug: Fix comes.

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom Columns

Post by admin »

TheQwerty wrote:Trigger On List...
1) Doesn't work in fresh. The following should repeat the Name column for files:

Code: Select all

Snip: CustomColumn 1
  XYplorer 13.90.0111, 4/15/2014 2:02:09 PM
Action
  ConfigureColumn
Caption
  
Type
  0
Definition
  0
Format
  0
Trigger
  1
Item Type
  0
Item Filter
  
[/size]
Works here. What does not work?

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom Columns

Post by admin »

kunkel321 wrote:I don't think I'd care for the "On Hover" trigger... I tend to "think with my mouse." I can't seem to look at something without my mouse finding its way there...

RE: "On Click:" I don't think you'd want all of the items to calculate on a single click; but how about all selected items? For example, I could do a rectangle selection

Image

then click one of the trigger buttons inside the selected area, and all selected items would be calculated. Doing Ctrl+A, then clicking would calculate all items... Just a thot.
Yes, maybe. But some would find it counter-intuitive probably: the "click" button clearly applies to that row only IMO.

admin
Site Admin
Posts: 60602
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Custom Columns

Post by admin »

binocular222 wrote:1) a tiny wish: Right click a custom column > rename column
should pre-fill the input dialog box with target column's header
(currently the box is default to blank)

2) Bug:
Hard Custom Column from 1 to 5: Trigger = "List" not work (show empty) while "List" does works with soft columns

3) Reset tree (#484) deactivate Autosize column (apply to custom soft columns only) - is this intentional?

4) On tab change and Autosize on, the soft columns are autosized to the width of their headers instead of its content - is this a bug
1) the box is default to blank only if the default name is used -- this is OK
2) Confirmed. Fix comes.
3) :veryconfused: Reset tree has nothing to do with Autosize column
4) "List"-triggered columns cannot be autosized correctly at the moment. I might be able to add that later.

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

Re: Custom Columns

Post by TheQwerty »

admin wrote:
TheQwerty wrote:Trigger On List...
1) Doesn't work in fresh. The following should repeat the Name column for files:
Works here. What does not work?
It was number 2 on binocular222's list.

And the snippet might have worked for you because it wouldn't have set the trigger type to 'List' as reported by SammaySarkar.

Post Reply