Page 12 of 16

Re: Custom Columns

Posted: 15 Apr 2014 20:05
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]

Re: Custom Columns

Posted: 15 Apr 2014 20:47
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.

Re: Custom Columns

Posted: 15 Apr 2014 21:17
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...

Re: Custom Columns

Posted: 15 Apr 2014 23:51
by klownboy
Thanks for those fixes Don. :beer:

Re: Custom Columns

Posted: 16 Apr 2014 16:45
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

Re: Custom Columns

Posted: 16 Apr 2014 20:45
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!

Re: Custom Columns

Posted: 16 Apr 2014 21:46
by LittleBiG
Great, thanks!

Re: Custom Columns

Posted: 18 Apr 2014 10:22
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 2874 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]

Re: Custom Columns

Posted: 23 Apr 2014 18:11
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!

Re: Custom Columns

Posted: 25 Apr 2014 13:49
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.

Re: Custom Columns

Posted: 25 Apr 2014 13:54
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.

Re: Custom Columns

Posted: 25 Apr 2014 13:55
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?

Re: Custom Columns

Posted: 25 Apr 2014 14:21
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.

Re: Custom Columns

Posted: 25 Apr 2014 14:40
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.

Re: Custom Columns

Posted: 25 Apr 2014 18:08
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.