Search found 258 matches

by T3RRY
02 Sep 2025 07:22
Forum: DOS Batch Forum
Topic: Format totals with thousands separator and convert bytes to megabytes
Replies: 4
Views: 57

Re: Format totals with thousands separator and convert bytes to megabytes

Re formatting with thousands seperator: see the :# No Prefix example @Echo off %= Examples =% :# 0 prefixed Call :FormatNum 1532151544621668007951135446231798748995413134278463598153468247 rv[1]1 -0 Call :FormatNum 4071 rv[1]2 -0 Call :FormatNum 20 rv[1]3 -0 Call :FormatNum 3 rv[1]4 -0 Set rv[1] :# ...
by T3RRY
31 Aug 2025 00:14
Forum: DOS Batch Forum
Topic: Ghost-typer effect in batch: Flickering random letters before each character
Replies: 4
Views: 514

Re: Ghost-typer effect in batch: Flickering random letters before each character

A modification of Icarus' base script to achieve the desired output style @echo off %= usage example. Outputs requirements if no args =% call :animated_string "%~1" %~2 %~3 %~4 exit /b 0 :animated_string If "%~1" == "" cls Set "fontSize=18" Set "fontType=Lucida Console" if not defined SetFont.init C...
by T3RRY
29 Aug 2025 03:58
Forum: DOS Batch Forum
Topic: Any DOS Batch game recommendations?
Replies: 10
Views: 559

Re: Any DOS Batch game recommendations?

feel free to give my stacker game a try. =================================== @REM Stacker by T3RRY. Save with utf-8 encoding. @REM Requires windows 10 v10589 or newer. Some features will not work as intended in Windows Terminal. =================================== %= Do not modify Thread Launcher =%...
by T3RRY
02 Jun 2025 02:15
Forum: DOS Batch Forum
Topic: Stack Overflow article.
Replies: 7
Views: 17040

Re: Stack Overflow article.

I don't think the idea of the article is mistaken. AI has become the goto for many people. I don't myself think GPT is a reliable stand alone tool for beginners - it has a tendency to blend syntax from adjacent languages, which makes it necessary to have at least a foundational knowledge to proof re...
by T3RRY
24 Mar 2025 01:22
Forum: DOS Batch Forum
Topic: 3D rotating donut
Replies: 5
Views: 21303

Re: 3D rotating donut

miskox wrote:
17 Mar 2025 02:38
I am very impressed! Though I don't understand the code at all (I don't even know how to do it 'by hand').

Saso
This is the reference Icarus used for the maths If you'd like to learn more.

https://youtu.be/iNA4yH7DAN8
by T3RRY
16 Dec 2024 07:25
Forum: DOS Batch Forum
Topic: Tokens do not pass after 31, is there some way that i can pass this limit?
Replies: 6
Views: 18299

Re: Tokens do not pass after 31, is there some way that i can pass this limit?

You may get better help if you elaborate more on what form of data extraction you are trying to achieve.
Example data, inputs and outputs go a long way here.
by T3RRY
02 Dec 2024 09:17
Forum: DOS Batch Forum
Topic: is there a way to implement so called "record" and "field" data structure?
Replies: 11
Views: 22877

Re: is there a way to implement so called "record" and "field" data structure?

For the sort of use cases you've exampled, the following example show how to use a string as the fieldID to extract the relevant field values. In light of the sort of examples you've included, I've incorporated my menu macro into the script to show a method of referencing the values using a related ...
by T3RRY
01 Dec 2024 10:24
Forum: DOS Batch Forum
Topic: is there a way to implement so called "record" and "field" data structure?
Replies: 11
Views: 22877

Re: is there a way to implement so called "record" and "field" data structure?

The below is my own implementation of this type of data structure, and includes a usage case example. Edit: added some more remarks, modified delimiters / field seperators to cope with records containg field values that match fieldIDs within the record. @echo off & setlocal enableExtensions enableDe...
by T3RRY
20 Nov 2024 02:42
Forum: DOS Batch Forum
Topic: The Daily Calendar Puzzle
Replies: 3
Views: 19108

Re: The Daily Calendar Puzzle

Very interesting. My first thought, just as a result if how similar the pieces are to tetriminos, is to make a tetris varient that plays out games until a solution is found. I'm sure there's probably some rules that could be applied to generating piece ordering to make solving faster. If I remember ...
by T3RRY
27 Jul 2024 08:42
Forum: DOS Batch Forum
Topic: AutoMacro - a function for Macro code generation
Replies: 0
Views: 42850

AutoMacro - a function for Macro code generation

After encountering a similar function earlier this week on SS64, and liking the apeal of improved readability without using %\n%, I decided the idea could be expanded on to provide new functionality. Ideas that got incorperated along the way: * Switches to add common use structures to macro definiti...
by T3RRY
16 Jul 2024 03:25
Forum: DOS Batch Forum
Topic: Progress bar
Replies: 6
Views: 45715

Re: Progress bar

Nice. Since your using escape sequences, there is another Sequence thats handy for filling space like this - ESC[nX ; where n is the number of spaces to be filled, IE the length of the prograss bar example (the macros are just a convenient way to animate it): @Echo off & Setlocal EnableDelayedExpans...
by T3RRY
05 Jul 2024 04:34
Forum: DOS Batch Forum
Topic: is there a way to use ECHO <esc>[32;40m without adding an extra line?
Replies: 4
Views: 37265

Re: is there a way to use ECHO <esc>[32;40m without adding an extra line?

nnnmmm wrote:
05 Jul 2024 03:04

Code: Select all

ECHO [32;40m
ECHO =================
ECHO Quake 4 - selector
ECHO =================
this is what i want but WITHOUT adding a line

Code: Select all

<nul Set /P "=[32;40m"
ECHO =================
ECHO Quake 4 - selector
ECHO =================
One simple solution
by T3RRY
05 Jul 2024 01:15
Forum: DOS Batch Forum
Topic: How to output a range of lines from a text file using findstr
Replies: 5
Views: 40328

Re: How to output a range of lines from a text file using findstr

Some interesting Approaches here, but it seems to me it would be simpler to parse the output of findstr with the /V switch and perform conditional checks on the first token token to determine if the line corresponds to the desired ranges - unless the intent is specifically to to support Regex expres...
by T3RRY
21 May 2024 11:35
Forum: DOS Batch Forum
Topic: IF Evaluation Values Are ECHO-Suppressed When Beginning With Colon ":". Why?
Replies: 7
Views: 21417

Re: IF Evaluation Values Are ECHO-Suppressed When Beginning With Colon ":". Why?

Each leading-colon-equation token is echo-suppressed in a nested IF too: C:\Test>FOR %$ in ($)do IF :0 == :0 IF :0 == false ECHO C:\Test>IF IF ECHO Reviewing the command parsing behaviour as described on this forum and Stackoverflow, I believe Jeb is bang on the money with regards to the behaviour ...
by T3RRY
18 May 2024 06:39
Forum: DOS Batch Forum
Topic: IF Evaluation Values Are ECHO-Suppressed When Beginning With Colon ":". Why?
Replies: 7
Views: 21417

Re: IF Evaluation Values Are ECHO-Suppressed When Beginning With Colon ":". Why?

Nothing to add on the why, but another finding to add

Using CMD /c to conduct the If operation will show the full command

for testing from the command line:

Code: Select all

@For %G in (":0" "0" "0:")Do cmd /c if %~G==%~G echo [%~G==%~G true]
@For %G in (":0" "0" "0:")Do if %~G==%~G echo [%~G==%~G true]