Minor scripting related wishes (a generic thread)
Re: Minor scripting related wishes (a generic thread)
Can we get a <space> variable?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- 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)
Space? You mean " "?
FAQ | XY News RSS | XY Twitter
Re: Minor scripting related wishes (a generic thread)
yep.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- 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)
And what would be the advantage over " "?
FAQ | XY News RSS | XY Twitter
Re: Minor scripting related wishes (a generic thread)
Maybe <space 27>
(Just an idea )
(Just an idea )
Win11 Pro 223H2 Gerrman
-
- 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)
Code: Select all
echo strrepeat(" ", 27);
FAQ | XY News RSS | XY Twitter
Re: Minor scripting related wishes (a generic thread)
same advantage that <tab> has over
and <tab 27> over strrepeat(
" "
and <tab 27> over strrepeat(
" ", 27);
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- 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)
It's a bit harder to type a TAB than a " "...
FAQ | XY News RSS | XY Twitter
Re: Minor scripting related wishes (a generic thread)
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...
I was spurred on by the fact that AHK also has a %A_Space% variable...
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Minor scripting related wishes (a generic thread)
SammaySarkar wrote:<tab 27>
Win11 Pro 223H2 Gerrman
-
- 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)
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. Er, no, wrong.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...
FAQ | XY News RSS | XY Twitter
Re: Minor scripting related wishes (a generic thread)
No big deal.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: Minor scripting related wishes (a generic thread)
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.
-
- 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)
Nope, sorry. Too complex for now.
FAQ | XY News RSS | XY Twitter
Re: Minor scripting related wishes (a generic thread)
Hiiiy, it's me with another wish!
PHP7's new combined comparison operator <=> can be pretty nice!
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 ]
[ this user is asleep ]