标题: [游戏娱乐] 批处理反向滚动字符串 [打印本页]
作者: 悬崖之树 时间: 2013-6-6 21:53 标题: 批处理反向滚动字符串
- @echo off&setlocal enabledelayedexpansion
- mode con cols=45 lines=1
- color F4 & title 菜鸟作品@悬崖之树
- set str=欢迎来到批处理之家!!
- set n=-1
- :loop
- set /a n+=1
- set ostr=
- set ostr=!str:~%n%,1!
- if defined ostr (
- for /l %%j in (40 -1 0) do (
- for /l %%i in (1 1 %%j) do (
- set "space=!space! "
- )
- set /p=!space!%ostr%<nul
- for /l %%k in (1 1 45) do (ver>nul)
- rem 下面一句里的退格符无法显示,但是是存在的,复制到记事本里就看见了。
- set /p=<nul
- set /p= <nul
- set /p=<nul
- set space=
- )
- ) else exit
- goto loop
复制代码
作者: tiandyoin 时间: 2023-2-24 18:18
回复 1# 悬崖之树
@echo off&setlocal enabledelayedexpansion
mode con cols=45 lines=1
color F4 & title 菜鸟作品@悬崖之树
set str=欢迎来到批处理之家!!
set n=-1
:loop
set /a n+=1
set ostr=
set ostr=!str:~%n%,1!
if defined ostr (
for /l %%j in (4000 -1 0) do (
for /l %%i in (1 1 %%j) do (
set "space=!space! "
)
set /p=!space!%ostr%<nul
for /l %%k in (1 1 4500) do (ver>nul)
rem 下面一句里的退格符无法显示,但是是存在的,复制到记事本里就看见了。
set /p=------------------------------------------------<nul
set /p= <nul
set /p=------------------------------------------------<nul
set space=
)
) else exit
goto loop
帮你改下一下,但还是有问题,只看到"欢"字
欢迎光临 批处理之家 (http://bathome.net./) |
Powered by Discuz! 7.2 |