Advertisement
GlobalAccessSoftware

utility1.bat

Nov 16th, 2023
1,231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.67 KB | Software | 0 0
  1.  
  2.  
  3. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4. ::: utility1.bat Split from Silent_Mode.bat for Free Use   :::
  5. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  6. ::: Original version 8.5.6.75 20230716132435 by -JpE-
  7. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  8.  
  9.   if not defined vers set vers=v8.7.0.03 20231006232214 by -JpE-
  10.   set /a size3=0
  11.   if not defined util3 set util3="%bats%\utility3.bat"
  12.   if not exist %util3% (
  13.     echo . & echo Can't find utility3.bat! & echo . & pause & echo . & exit /b)
  14.   if not defined sizer set sizer="%bats%\string_length.bat"
  15.   if not exist %sizer% (
  16.     echo . & echo Can't find %sizer% & echo . & pause & echo . & exit /b)
  17.   set charsForPadding=*=
  18.   set txt1= Introducing:  My-ShotCaller! %vers%
  19.   if exist %sizer% call %sizer% charsLen charsForPadding
  20.   if exist %sizer% call %sizer% actualSize2 txt1
  21.   if %charsLen% gtr 0 set /a size2=((%actualSize2% + (2*%charsLen%)) / %charsLen%)
  22.   call :padme %size2%
  23.   set line1=%line1%%charsForPadding%
  24.   echo . & echo . & VER & echo .
  25.   echo . & echo %line1%
  26.   echo =%charsForPadding%%txt1%%charsForPadding%*
  27.   echo %line1% & echo .
  28.   exit /b
  29.  
  30. ::: Pads string %line1% to passed length
  31. :padme <intVar lengthOfTheStringRequired>
  32.   set line1=
  33.   for /l %%k in (1, 1, %~1) do ( call :loop3
  34.     if %errorlevel% gtr 0 goto except  
  35.   )
  36.   exit /b %errorlevel%
  37.  
  38. :loop3
  39.   set line1=%line1%%charsForPadding%
  40.   exit /b
  41.  
  42. :except
  43.   set /a code2=7 & set txt1=An Exception was caught in :padme
  44.   set sender1=utility1.bat
  45.   if exist %util3% (
  46.     call %util3% t v "%txt1%" "%sender1%" "%errorlevel%" "%code2%" )
  47.   exit
  48.  
  49.  
  50.  
  51.   :::   100% -JpE-
  52.  
  53.  
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement