Draw a box

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

Assaultz

Member
Dec 11, 2016
431
256
73
m0X6gQC.png




CODE :

[HIDE]@echo off&& setlocal&& cls
REM Draws a rectangle with X1, Y1, Width and Height specified by inputs
set "x=%1"&& set "y=%2"&& set "w=%3"&& set "h=%4"

REM Place blank lines above
set /a yBefore=%y% - 1
for /l %%a in (1,1,%yBefore%) do (echo.)

REM Create rectangle components
set /a xRemaining=%x%-1
set wRemaining=%w%
:topLineGen
if NOT %xRemaining% == 0 set /a xRemaining-=1&& set "topLine=%topLine% "&& goto :topLineGen
set "topLine=%topLine%#"&& set /a wRemaining-=1
if NOT %wRemaining% == 0 goto :topLineGen

REM Render top line
echo %topLine%

REM Create middle line
set xRemaining=%x%
set /a wRemaining=%w%-2
:midLinePreGen
if %xRemaining% GTR 1 set /a xRemaining-=1&& set "midLine=%midLine% "&& goto :midLinePreGen
set "midLine=%midLine%#"
:midLineGen
if %wRemaining% GTR 0 set /a wRemaining-=1&& set "midLine=%midLine% "&& goto :midLineGen
if %w% GTR 1 set "midLine=%midLine%#"

REM Render middle lines
set /a midLinesRemaining=%h%-2
:renderMidLines
if %midLinesRemaining% GTR 0 echo %midLine%&& set /a midLinesRemaining-=1&& goto :renderMidLines

REM If the height is greater than 1, render a bottom line (we can re-use %topLine% variable)
if %h% GTR 1 echo %topLine%
endlocal
exit /b
[/HIDE]

Enjoy :p
 
General chit-chat
Help Users
  • @ QM|T_JinX:
    the best thing to do is message younis for things like that we super mod cant do that
  • @ danielpadilla1999:
    Alright. Could you let him know to do it, please?
  • @ danielpadilla1999:
    You do not have permission to view this page or perform this action.
  • @ QM|T_JinX:
    ok i will send younis message in your name not sure if he will do things like that just letting you know
  • @ danielpadilla1999:
    Thank you very much mate
  • @ QM|T_JinX:
    np
  • @ QM|T_JinX:
    can i ask you why you want the account deleted or rest ? you can just not log in anymore and be done with it right ?
  • Chat Bot:
    Lindows has joined the room.
  • Chat Bot:
    HalfDeafGuy is our newest member. Welcome!
  • Chat Bot:
    XKuro_Buuny589 is our newest member. Welcome!
  • Chat Bot:
    webvedha is our newest member. Welcome!
  • @ lurch6661:
    zap zap ill smoke to that
  • @ QM|T_JinX:
    1+ hour the new reveal trailer assassins creed shadows
  • @ lurch6661:
    cool
  • Chat Bot:
    Lindows has joined the room.
  • Chat Bot:
    lechon201 is our newest member. Welcome!
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    Lindows has joined the room.
  • Chat Bot:
    KTLOG is our newest member. Welcome!
  • @ KTLOG:
    yo ***** @Memo
  • @ KTLOG:
    remember me
  • Chat Bot:
    Christo has joined the room.
    Chat Bot: Christo has joined the room.