Page 2 of 2

Re: CEA: Whitespace Double Click

Posted: 23 Sep 2020 01:32
by klownboy
eil wrote: 22 Sep 2020 23:27 wouldn't it be more useful to have separate tweaks for List and Tree?! especially as Tree already had ability to launch script on r-click.
It is relatively easy to still have separate actions for the tree and list and accomplish it in a single script. You need to establish a variable for the mouse click location (e.g., $loc = ControlatPos(); and run your different commands based on the location. You can also perform different actions depending on the modifier key held down when you double click or middle click. For middle click you can also base your actions on the selected file type (ext) as well. You can do that for the right click CEA scripts too. Double clicking on White Space you can not because you lose the selection. Just a quick cut up example...

Code: Select all

	$mod = get("shift");
	$loc = ControlatPos();
	if($loc == "T") {   //if mouse clicked in the tree WS
			if ($mod == 0) {load "<xyscripts>\your own script.xys"; end 1; }
			elseif ($mod == 1) {#574; end(1); }
			elseif ($mod == 2) {#550; end(1); }
			else {#564; end 1;}
	}
	elseif (gettokenindex($loc, "L 1|L 2", "|", "i")) {       //if mouse click in list pane 1 or 2
			load " your script.xys";
	}
Edit: Sorry, I had left out the $mod variable.

Re: CEA: Whitespace Double Click

Posted: 23 Sep 2020 07:56
by admin
eil wrote: 22 Sep 2020 23:27 wouldn't it be more useful to have separate tweaks for List and Tree?! especially as Tree already had ability to launch script on r-click.
Yes, sure! Will do.

When I added that on v14.20.0301 - 2014-06-28 17:29 it was a long day (or days) because that's when I also added Paper Folders. I did not have the power anymore for two separate CEAs. :biggrin:

Re: CEA: Whitespace Double Click

Posted: 23 Sep 2020 11:09
by eil
klownboy didn't think about "scripting switch", good hint and script-example.

admin wrote: 23 Sep 2020 07:56Yes, sure! Will do.
thank you Don.)

Re: CEA: Whitespace Double Click

Posted: 23 Sep 2020 14:42
by klownboy
eil wrote: 23 Sep 2020 11:09 klownboy didn't think about "scripting switch", good hint and script-example.
admin wrote: 23 Sep 2020 07:56Yes, sure! Will do.
thank you Don.)
Thanks and I can still use a single script for both CEAs (tree and list). I just have to list it in both places. :tup:

Re: CEA: Whitespace Double Click

Posted: 29 Sep 2020 01:53
by jupe
I wanted to thoroughly test this before replying, but haven't had any spare time and it looks like I won't get any for a while, so before too much time passes I just wanted to say thanks for implementing it.

And an especially big thanks for the paperfolder change, hopefully it doesn't inconvenience anyone else, but for me it has solved a long standing source of regular frustration.

Re: CEA: Whitespace Double Click

Posted: 29 Sep 2020 10:54
by admin
Okidoki. :tup: