Bored: Some Batch Splashscreen (with ASCII)

Discussion in 'Scripting' started by KNARZ, Jul 15, 2016.

  1. KNARZ

    KNARZ MDL Addicted

    Oct 9, 2012
    872
    457
    30
    #1 KNARZ, Jul 15, 2016
    Last edited by a moderator: Apr 20, 2017
    Haha...
    I was just little overworked and needed some variety.
    So I came up with some kind of "please wait" aka splashscreen Batch.

    In the very uncommon case you think you could use this, feel free to do so.

    nifty random color gen comes from: https://www.reddit.com/r/commandline/comments/lgf3t/how_to_generate_a_random_color_combination_for/

    set BG=000... can be deleted. I got little dizzy while testing this useless but funny thing.

    works even better with nircmdc on your system (in system32).
    than it will center and removes borders, looks more like a splashscreen than real batch.

    "have fun?"


    Code:
    @echo off & cls & mode 90,40 & title %~n0
    if exist "%SystemRoot%\System32\nircmdc.exe" (call :NirStuff)
    
    set Rounds=10
    set Align=12
    set BG=0123456709BCDEF
    set BG=000000000000000
    set FG=EF012345A79ABCD
    
    for /l %%i in (1 1 %Rounds%) do (
    call :Generate
    call :Align %Align%
    call :PWText
    timeout.exe /t 1 >nul
    )
    exit
    
    :: -------------------------------------------------------------
    :NirStuff
    nircmdc.exe win -style ititle "%~n0" 0x00400000
    nircmdc.exe win -style ititle "%~n0" 0x00040000
    nircmdc.exe win +style ititle "%~n0" 0x00040000
    nircmdc.exe win center ititle "%~n0"
    goto :EOF
    
    
    :Generate
    cls
    set /a CNT+=1
    set /a Rand=%Random% %% 15
    call set RndColor=%%BG:~%Rand%,1%%%%FG:~%Rand%,1%%
    color %RndColor%
    goto :EOF
    
    :Align
    for /l %%c in (1 1 %1) do (echo.)
    goto :EOF
    
    :PWText
    set /a Result = %CNT%%%2
    if %Result% EQU 0 (call :PW0)
    if %Result% EQU 1 (call :PW1)
    goto :EOF
    
    :PW0
    echo                 :::::::::  :::        ::::::::::     :::      ::::::::  ::::::::::
    echo                :+:    :+: :+:        :+:          :+: :+:   :+:    :+: :+:
    echo               +:+    +:+ +:+        +:+         +:+   +:+  +:+        +:+
    echo              +#++:++#+  +#+        +#++:++#   +#++:++#++: +#++:++#++ +#++:++#
    echo             +#+        +#+        +#+        +#+     +#+        +#+ +#+
    echo            #+#        #+#        #+#        #+#     #+# #+#    #+# #+#
    echo           ###        ########## ########## ###     ###  ########  ##########
    echo.
    echo.
    echo                    :::       :::     :::     ::::::::::: :::::::::::
    echo                   :+:       :+:   :+: :+:       :+:         :+:
    echo                  +:+       +:+  +:+   +:+      +:+         +:+
    echo                 +#+  +:+  +#+ +#++:++#++:     +#+         +#+
    echo                +#+ +#+#+ +#+ +#+     +#+     +#+         +#+
    echo                #+#+# #+#+#  #+#     #+#     #+#         #+#
    echo                ###   ###   ###     ### ###########     ###
    goto :EOF
    
    :PW1
    echo           :::::::::  :::        ::::::::::     :::      ::::::::  ::::::::::
    echo            :+:    :+: :+:        :+:          :+: :+:   :+:    :+: :+:
    echo             +:+    +:+ +:+        +:+         +:+   +:+  +:+        +:+
    echo              +#++:++#+  +#+        +#++:++#   +#++:++#++: +#++:++#++ +#++:++#
    echo               +#+        +#+        +#+        +#+     +#+        +#+ +#+
    echo                #+#        #+#        #+#        #+#     #+# #+#    #+# #+#
    echo                 ###        ########## ########## ###     ###  ########  ##########
    echo.
    echo.
    echo                    :::       :::     :::     ::::::::::: :::::::::::
    echo                     :+:       :+:   :+: :+:       :+:         :+:
    echo                      +:+       +:+  +:+   +:+      +:+         +:+
    echo                       +#+  +:+  +#+  +#++:++#++:     +#+         +#+
    echo                        +#+ +#+#+ +#+  +#+     +#+     +#+         +#+
    echo                          #+#+# #+#+#    #+#     #+#     #+#         #+#
    echo                           ###   ###      ###     ### ###########     ###
    goto :EOF
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. KNARZ

    KNARZ MDL Addicted

    Oct 9, 2012
    872
    457
    30
    How it looks like (with nircmdc)
    [​IMG]
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sir2u

    sir2u MDL Novice

    Jul 23, 2016
    1
    0
    0
    I love bat files.

    This one is pretty cool, I might just incorporate it into one I have for user login on the school network.

    Thanks:biggrin: