Re: Minor scripting related wishes (a generic thread)
Posted: 03 May 2016 19:17
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
Code: Select all
echo strrepeat(" ", 27);" "
" ", 27);
SammaySarkar wrote:<tab 27>
It makes me thinking. Apparently I give the impression I have nothing to do here, just sitting idly in front of my screen waiting for wishes to come in.SammaySarkar wrote:I should've said straight up that there's really no compelling reason for a <space> variable, other than the fact that <tab> and <crlf> exist already.
I was spurred on by the fact that AHK also has a %A_Space% variable...
nerdweed wrote:Could you please give a little steroid to SC moveto and copyto - allow a way to supress the rich-copy dialog.
Don, do you have some time for this now.admin wrote:The dialog asks a question. You want me decide for you?
nerdweed wrote:No, I would decide in a scripted way.
If we go in a branch view and are invoking a script, I would know what I am doing. I am always hitting a No in this case and could always use a predetermined No in such scenarios. There can be four completely independent possibilites here (3 options - yes, no, cancel or show the dialog).
On the same lines, copyto and move to can make use of the on_collision field which is available for backupto. I often goto help file to see the format and stop after seeing it is backupto only. Occasionaly, do think about (ab)using backupto + delete instead of moveto, but drop the idea as it would involve actual bit copies of large files.
P.S. - I never asked before for on_collision because of the subtle difference in parameters for these 3 ops (and wrote this out of flow today)
admin wrote:Why not simply use backupto()?
nerdweed wrote:I already answered that
BackupTo is an alternative to CopyTo. Not a very good alternative for MoveTo for moves on the same partition.
admin wrote:OK, but that wish is more complex than it might seem. Maybe next year.
Code: Select all
// operator <=>
text compare(1, 2);
text compare(4, 3);
text compare(5, 5);
function compare($a, $b) {
return ($a > $b) ? 1 : ( ($a < $b) ? -1 : 0 ) ;
}