Minor scripting related wishes (a generic thread)

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

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

:ghost: :ghost: Can we get a <space> variable?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Minor scripting related wishes (a generic thread)

Post by admin »

Space? You mean " "?

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

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

yep.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Minor scripting related wishes (a generic thread)

Post by admin »

And what would be the advantage over " "?

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Minor scripting related wishes (a generic thread)

Post by PeterH »

Maybe <space 27> :?:

(Just an idea :whistle: )
Win11 Pro 223H2 Gerrman

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

Re: Minor scripting related wishes (a generic thread)

Post by admin »

Code: Select all

echo strrepeat(" ", 27);

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

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

same advantage that <tab> has over
"	"

and <tab 27> over strrepeat(
"	"
, 27);
:ugeek:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

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

Re: Minor scripting related wishes (a generic thread)

Post by admin »

It's a bit harder to type a TAB than a " "...

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

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

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... 8)
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Minor scripting related wishes (a generic thread)

Post by PeterH »

SammaySarkar wrote:<tab 27>
:shock:
Win11 Pro 223H2 Gerrman

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

Re: Minor scripting related wishes (a generic thread)

Post by admin »

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... 8)
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. :biggrin: Er, no, wrong. :mrgreen:

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

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

No big deal. :(
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: Minor scripting related wishes (a generic thread)

Post by nerdweed »

nerdweed wrote:Could you please give a little steroid to SC moveto and copyto - allow a way to supress the rich-copy dialog.
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 :ninja:

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.
Don, do you have some time for this now.

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

Re: Minor scripting related wishes (a generic thread)

Post by admin »

Nope, sorry. Too complex for now.

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

Re: Minor scripting related wishes (a generic thread)

Post by bdeshi »

Hiiiy, it's me with another wish!
PHP7's new combined comparison operator <=> can be pretty nice!

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 ) ;
}
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply