Advertisement
IcarusLives

:print x y "TEXT" function

Mar 22nd, 2017
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.39 KB | None | 0 0
  1. :print x y
  2.     setlocal
  3.         set "str=X%~3" & set "length=0"
  4.         for /L %%a in (8,-1,0) do (
  5.             set /a "length|=1<<%%a"
  6.             for %%b in (!length!) do if "!str:~%%b,1!" equ "" set /a "length&=~1<<%%a"
  7.         )
  8.         set /a "_y=%~2", "_x=%~1", "_x2=_x + length"
  9.         (endlocal
  10.             set "_[%_y%]=!_[%_y%]:~0,%_x%!%~3!_[%_y%]:~%_x2%!"
  11.         )
  12. goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement