China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 14:18
中国DOS联盟论坛 » 网络日志(Blog) » C language (four characters) http://www.shucunwang.com/RunCode/c/ View 23,748 Replies 75
Floor 61 Posted 2016-06-26 19:55 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
C++
the powder toy : jacob1
https://github.com/ThePowderToy/The-Powder-Toy

http://www.dooccn.com/cpp/

Game construction understands the connection with knowledge, mathematical knowledge?
Consideration of the construction of Chinese characters
Extension of the game copy of the concept environment of extended beings
For example, the visualization of the evolution of things, the human-machine expression as a reference for historical prediction, and it is similar to the double and single of the辦leaf flower
Input elements for Chinese character and English recognition, options for mouse and keyboard clicks, and experimental unit modules of others' elements downloaded by software robots.

[ Last edited by zzz19760225 on 2017-12-1 at 08:49 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 62 Posted 2016-06-26 19:56 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Using awk, sed, grep, gnuplot under Windows

http://blog.sciencenet.cn/home.php?mod=space&uid=858128&do=blog&quickforward=1&id=994394

[ Last edited by zzz19760225 on 2017-12-7 at 02:02 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 63 Posted 2016-06-26 19:56 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
WIN environment,
1 Chinese character batch processing bat calculator.
calc.bat
----------------------------------------
:calculator
pause
set /a var=1+1
pause
set /a var=2-1
pause
set /a var=2*2
pause
set /a var=9/3
pause
goto calculator (There is a small problem, why doesn't it perform the calculation?)
---------------------------------------

---------------------------------
:1
set a=12
set b=12
pause
set /a c=a+b
pause
set /a d=a-b
pause
set /a e=a*b
pause
set /a f=a/b
pause
goto 1
---------------------------------

Provide information on the sequential command execution in the same file, search for files that provide information other than themselves

2 Use batch processing to make chess and other rule-based board games, games with user-defined rules.
The rules of wargame推演 are carried out step by step or completely self-logically under user control, and users supplement and input the content of transaction changes.
Life chess game (corresponding to life information).
File names and contents of different chess pieces in chess, the file content contains specific mathematical formulas, that is, the moving rules. Limited definition range, and the chess game extended by the combination of unit ranges, 1~10 and 1~9, the chessboard should be in the range of 1~10, 0~9.
1 chess piece, name and definition of steps calculation, whether there are extendable positions around it, such as inside and outside the chess game rounds and boundaries, whether there are its own chess pieces or opponent's chess pieces, and feasible positions without restrictions.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
In the assumed 30 character positions, the character position with the median of 1 is a variable, and the others are all constants and unchanged, and the variable is the moving position of the chess piece.
The total amount of existing chess pieces = the total amount of chess pieces in the previous round - the number of chess pieces increased or decreased according to the rules in the selection plan (regret chess and positive and negative sequence review)

3 *-/\--progress bar clock. There is a time series in the character command mode, as well as the memory text of days in succession, and day process.
100 years, 10 years, 1 year, 1 decade, 1 day;
24 hours, 15 minutes, 1 minute, second, microsecond. Dynamic model consideration.

4 Search web translation information, sort the information content into text, and make a batch foreign language translation database for the text content.


5 Standard installation folder, files, information in files, restore initial state, set a plan for compiling folder file information, restore to the plan; automatically classify and categorize files, here is what you are looking for, one usage habit or several habits can be selected.

6 Gambling game, mode and score saving.
Divination game.
Set up win-win and double-loss settings for dilemmas, enrich the degree of double win and loss, extend to daily life, weaken the impact of win and loss, weaken the cycle habit of all results, increase the origin and origin, the process is real and free, and add choices such as selfish and private and selfless and public for the results.
Button production,
Button selection system time, send to a text; time > t.txt
Perform single and double processing on the system time, select the last digit to set conditions, odd and even.
Obtain TIME, delete non-numeric characters, intercept the last digit, convert the number into logic 01, and output the win-loss character corresponding to 01.

Make rewards and punishments choices for single and double results,
Output the results of rewards and punishments choices,
Display the points corresponding to the rewards and punishments results,
Single machine multi-account points accumulation.

7 The plan group cycle of annual plan, quarterly plan, monthly plan, decadal plan, weekly plan, daily plan, computerization of success studies. Acquisition or interest comparison to make plan templates, game competition popularization templates, and reminders for good templates. Mainly to realize the connection and accumulation of people's daily information and reduce information loss.

8 The possibility of two batch processing dialogues, assuming that one side is the user's demand range, mainly novice小白, and the other batch processing comprehensive program analyzes and selects responses to the problem. The correct and wrong information of the computer is similar, command help comments, dictionary display.

9 CHM dictionary and archive file library of batch processing, life information (mainly general parts, how most people may choose, and possible reference role for individuals)

Linux, Chinese character text, etc.
10 Realize at the software level of other operating systems

Computer platform, people, things, mind and body, groups, etc.
11 Realize at the hardware level !!!

12 The combination matrix of 27-letter pinyin Chinese characters is spread out and listed
The spread list of unit dot matrices

13 Pinyin and Chinese character translator, display the translated content list, and find the possibility of pinyin accuracy.

14 Morse code beep regulation
Morse 1 and 0 to GB18030 Chinese
Continuous cycle sound
Define two characters as the specified sound generation rule, find the sound emitted by the two characters in the digital information structure, you can write a combination of two characters, or write for the dictionary.
Define 01 two characters (usually with 01 as the content)
Write character text (generally composed of 01)
Read
Listen to the effect
Record and play
Reverse the sound into a rough character text
1 beep and 2 beeps correspond to 01

Manually select 01 input corresponding sound at any time

Make bat for 26 letters, the 27th total selection input, listen to the sound of pinyin Morse code.
Use the hexadecimal number of GB18030 Chinese characters to make beeping sounds, input Chinese characters, and then emit the corresponding note string.

24-hour beep time announcement
Report a sound ^g every 15 minutes, listen to and display the 24 hours from the first quarter to the fourth quarter, or 12 hours and 8 quarters.

15 Explore the display and application of single character dot matrix characters stored and taken out by inputting binary hexadecimal in memory and hard disk storage, etc., and need to use dot matrix font library.
Storage and access realization; a command line displays a single character or multiple characters, or a sentence; defines the fixed character of the character and the accumulated dot matrix font.

16 Can build a batch processing command line text editing tool under CMD.

17 Use batch processing to make a computer work alarm clock with screen prompt text.

18 Dictionary article corresponding serial number question and answer device.



Function state realization:

1 Input state
Wait for input, perform the content of calculation, guided by the defined addition, subtraction + -, etc. inside.
1 plus 1, automatically perform + processing on the numbers before and after the plus character, sort the addition, subtraction, multiplication and division of the whole line in sequence, then add parentheses, equations, subscripts, square roots, powers, etc., very infinite and decimal points and other floating-point calculations (limit digital range).

2 Waiting state pause
3 Loop state :1 goto 1
4 Or choose
5 Information storage help > 5.txt help >> 5.txt
6 Information reading type 5.txt (?)
7 Choose to exit, continue
8 Form the variable form of position A=X

[ Last edited by zzz19760225 on 2018-1-4 at 19:05 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 64 Posted 2016-06-26 19:57 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Repeatedly execute the loop
:loop
go to loop
is goto
:loop
goto loop

1.bat
--------------------
:1
dir
pause
help
pause
2.bat
goto 1
--------------------

2.bat
--------------------
:2
dir
pause
help
pause
1.bat
goto 2
--------------------
Closing of the loop execution?

10.bat
-------------------
1.bat
2.bat
3.bat
4.bat
5.bat
6.bat
7.bat
8.bat
9.bat
0.bat
---------------------

@echo off
pause
set /a var=1+1
echo 1+1=
echo %var%
pause
set /a var=2-1
echo 2-1=
echo %var%
pause
set /a var=2*2
echo 2*2=
echo %var%
pause
set /a var=9/3
echo 9/3=
echo %var%
pause
goto 计算器

How to execute common rule files one by one in sequence and output the result as interaction. 1 is the user input interface, 2 is the operation process, 3 is the text information storage library.

Command files for cyclic rules within 120 years under certain time and conditions.
Remind of holidays

do %0

Loop to output time to s.txt
----------------------------------
:s
time >>s.txt <nul
pause
goto s
----------------------------------
!:1 goto 1 When opening between loops, it is better to add a pause to pause, otherwise it is easy to crash the machine. Even if the process window is called up, it will be blocked by the opened file, which is not easy to operate. Commonly used pause, prevent trouble and work. Except in the virtual machine.

[ Last edited by zzz19760225 on 2017-12-17 at 14:49 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 65 Posted 2016-06-26 19:58 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Always use pause to separate commands, there is a round.
pause
dir
pause
help
pause
dir > x.txt
pause
help > y.txt
pause


-----------------------------------------------------------
@echo off
:1
set /p Code=Please scan Code:
set /p output=%code%>>my.txt<nul
goto 1
----------------------------------------------------------


set /p has 2 extra characters, please solve :Lying
http://www.cn-dos.net/forum/viewthread.php?tid=52524&sid=USPLKx

[ Last edited by zzz19760225 on 2017-12-9 at 11:12 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 66 Posted 2016-06-26 19:59 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
set /a var=x+y
set /a var=x-y
set /a var=x*y
set /a var=x/y

x plus y
x minus y
x multiplied by y
x divided by y

x + y =
x - y =
x * y =
x / y =

calc.bat As a computing center, copy the content of other calculation files (other files don't need to be bat, as bat can consider parallel computing)
plus.bat
minus.bat
multiply.bat
divide.bat

User selection ---> User input ---> x=? y=? ---> x + y = z ---> z=?

Input content, collected into a text as an information repository, waiting to be accessed.
--------------------------------------------
:1
@echo off
set /p Code=Write:
echo %code% >>my.txt
goto 1
--------------------------------------------

[ Last edited by zzz19760225 on 2017-12-11 at 17:47 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 67 Posted 2016-06-26 20:00 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Morse Code Sound Control in Batch Processing
----------------------------
:1
^g
pause
goto 1
---------------------------

---------------------------
:1
^g
pause
echo g
goto 2
:2
^g^g
pause
goto 3
:3
echo g
echo g
goto 4
:4
^g^g^g
pause
goto 1
-----------------------------
Input waiting:
z
if z=1 >>z.txt do %x
if z=0 >>z.txt do %y
x=^6
y=none

Or input selection
Choose 1, choose 0

1.bat
----------------------------
:1
pause
start 2.bat
pause
start 2.bat
start 2.bat
pause
pause
goto 1
---------------------------

2.bat
------------------
^g & exit
------------------

-------------------------------------------v
:1
for /l %%i in (1 1 2) do (
ping -n 2 localhost >nul
call echo %%time%%
)
^g
for /l %%i in (1 1 2) do (
ping -n 2 localhost >nul
call echo %%time%%
)
^g^g
for /l %%i in (1 1 2) do (
ping -n 2 localhost >nul
call echo %%time%%
)
^g^g^g
goto 1

-------------------------------------------^
type 1.txt (1.txt is ^g)
1111 ^g^g ^g^g ^g^g ^g^g
0000 ^g ^g ^g ^g

The parts other than two dots are punctuation separation sounds.
0=* 1=. Separation=, 3 Article period=. 4 (To prevent digital conflict, space separation, paragraph separation, article end period)
* * * * / . . . . / * . * . / . * . * / * * . . / . . * * / * * * . / . . . * / * . * * / * . . . / 。
Conventional and invariable mathematical matrix spacing, verse punctuation of 1~10, four characters, five characters, blank of insufficient digits, replaced by three dots.

Can batch processing do Morse code conversion? :DOS2BAT
http://www.cn-dos.net/forum/viewthread.php?tid=52224&fpage=1&highlight=%E6%91%A9%E6%96%AF
【Challenge】Batch processing to realize Morse code encryption and decryption :batman
http://bbs.bathome.net/thread-6467-1-2.html

(^g needs to be entered as ctrl+g in the command line, which is replaced by a small dot in text. A text 1.txt, enter echo ^g > 1.txt in the command line, then open 1.txt, copy that dot, change the interval to 2, and it sounds effective)

0000 0111 7 07 BEL ␇ Ring

523066680 Batch processing about clock

See a file named ^g.bat. (! No,?)

One sound, adjust the number after -n to change the time interval.
3.bat
--------
^g
-----------------------------------
:1
type 3.bat
ping -n 2 localhost >nul
goto 1
-----------------------------------

Two keys, one is to execute once, one is to execute twice, each followed by a time interval adjustment.
Throw sound with start

Enter 1 for one unit, enter 2 for 2 units, no need to add enter key
-----------------------------------
:x
set /p a=
if %a%==1 goto 1
if %a%==2 goto 2
goto end
:1
echo 1
^g
goto end
:2
echo 2
^g^g
:end
goto x
------------------------------------

Add @echo off, then it changes from two sounds to one sound.
Directly
--------
^g
exit
-------
No matter how many sounds are placed, there is only one.

-----------------------------------
@echo off
:1
^g
ping -n 2 localhost >nul
goto 1
-----------------------------------

[ Last edited by zzz19760225 on 2017-12-26 at 22:31 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 68 Posted 2016-06-26 20:00 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1 hour one prompt pop-up and display the hour
Display, directly display the system time, or use a special text display
If the system time is equal to 8:00, a prompt window will pop up.
if time =x8 start & echo x8 & pause
x=x1;x2;x3;x4;x5;x6;x7;x8;x9;x10;x11;x12
x1=1:00
x2=2:00
------------------------------------------------------------------------------------------
15 minutes
Half an hour 30 minutes
1 hour 60 minutes
1 watch 120 minutes

Read system time
Rule schedule
The variable text units in the rule schedule, the rest schedule, and the schedule need to display the content of the prompt
The cycle rhythm range of the plan, century, decade, year, season, month, week, day, watch, hour, half, quarter, minute


-------------------------------------------------------------------------------------------

huahua0919:

@echo off
for /l %%i in (1 1 20) do (
ping -n 2 localhost >nul
call echo %%time%%
)

sea1112:

@echo off
:s
title %date:~0,10% %time%&goto s

How to dynamically display the system time during the execution of the bat : rs369007
http://www.cn-dos.net/forum/viewthread.php?tid=44741&fpage=1&highlight=%E6%98%BE%E7%A4%BA%E7%B3%BB%E7%BB%9F%E6%97%B6%E9%97%B4


-------------------------------------------------------------------------------------------------------
@echo off
title Dynamic Clock
mode con cols=20 lines=8 & color 1f
echo.
echo Cherish Time
echo.
echo %date%
echo %time:~0,-3%
ping -n 2 127.0.0.1 > nul
cls
%0

Baidu Experience: Batch Command How to Use Batch Command to Make a Dynamic Clock : princerat
https://jingyan.baidu.com/article/73c3ce28edf592e50343d9e4.html
-------------------------------------------------------------------------------------------------------
453625978:

hello
start "" "c:\client.exe"
connect
ping 127.0 /n 60>nul
goto hello
rem /n can set the time, save the above as bat

ffihy:

Your question is not clear, it is not easy to make it for you, then tell you the method and make it yourself.
1 There is a command in win7 called timeout
TIMEOUT timeout
Description:
This tool accepts the timeout parameter and waits for a specified period of time (seconds) or waits for any key. It also accepts
A parameter that ignores the key.
Parameter list:
/T timeout specifies the number of seconds to wait. The valid range is from -1 to 99999 seconds.
/NOBREAK ignores the key and waits for the specified time.
/? Display this help message.
Note: A timeout value of -1 means waiting indefinitely for a key.
Example:
TIMEOUT /?
TIMEOUT /T 10
TIMEOUT /T 300 /NOBREAK
TIMEOUT /T -1
2 The universal one is the ping command
ping 127.1 -n 60 >nul
The above sentence is to ping yourself 60 times. One ping yourself is one second, and 60 times is one minute.
When writing p, as long as this sentence is added to the code that runs in a loop, there will be a delay effect

Baidu Know: How to write a batch file that can automatically run the same command every certain time : new12345671
https://zhidao.baidu.com/question/206203396.html?fr=exp_relate
---------------------------------------------------------------------------------------------------------

@echo off
for /l %%i in (1 1 1) do (
ping -n 2 localhost >nul
call echo %%time%% >> 1.txt
)

[ Last edited by zzz19760225 on 2017-12-17 at 15:09 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 69 Posted 2016-06-26 20:01 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Article dictionary Q&A displays batch processing

1 Article dictionary text
Thousand-Character Essay and Xinhua Dictionary, or Great Encyclopedia

Thousand-Character Essay.txt
qianziwen.txt
qzw.txt

2 Text of the question range

3 Types of batch processing questions

Automatic reply email rules represent
A dictionary text search?

[ Last edited by zzz19760225 on 2018-1-4 at 20:04 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 70 Posted 2016-06-26 20:06 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
How to exit a looping bat batch file under dosemu? Ctrl+c (enter the yes or no query, press y to be okay)
What will happen if new windows keep popping up with start under dosemu?

[ Last edited by zzz19760225 on 2018-1-18 at 20:31 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 71 Posted 2016-06-26 20:07 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1<词>,2,3/段\,4{节},5(章)。
Floor 72 Posted 2016-06-26 20:08 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1<词>,2,3/段\,4{节},5(章)。
Floor 73 Posted 2016-06-26 20:09 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
523066680:
『Post 27』: A self-written notepad tool

CODE:
@echo off
::::::::::::::::::::::::::::::::::::::::::::::::::
:: Temporary notepad, code by 523066680@cn-dos.net
::
:: Parameter: add Note content Add note content to the note list
:: Parameter: del Number 1 Number 2 .... Delete the notes with the specified number
:: Parameter is empty Directly read the note text
::::::::::::::::::::::::::::::::::::::::::::::::::
setlocal enabledelayedexpansion
set notebook=notebook.x
set arg_del=del
set arg_add=add
set arg_=type

if not exist "%notebook%" (
echo %notebook% does not exist, will be created
type nul>>notebook.x
exit /b
)

if not defined arg_%1 (
echo The command %1 does not exist
exit /b
) else (
if "%1"=="" (goto :func_)
)

:read_it
::If the parameter is not empty, come here. Adding project numbers and deleting projects both need to read text information first
::text format: $number $date $note , range of number :
set /a note_n=0
for /f "tokens=1,2,*" %%a in ('type %notebook%') do (
set note_info_#%%a=%%b %%c
set /a note_n+=1
)
::Then jump to the function block
goto :func_%1


:func_
type %notebook%
exit /b

:func_del
set /a x=-1
if "%2"=="" (echo arg2 = NULL &exit /b)
if not defined note_info_#%2 (echo no this item. &exit /b)
::Assuming that more than one item is deleted, parameters are separated by spaces, and the total parameter is used as a string for judgment
for /f "tokens=1,*" %%a in ("%*") do (set note_items=%%b)
::For example, 10, deleting 0 will change later. The subsequent judgment will delete, so it is dangerous. Add judgment factors
set note_items=#%note_items: =#%#
echo,>%notebook%
for /f "tokens=2,* delims==#" %%a in ('set note_info_#') do (
if "!note_items:#%%a#=!"=="!note_items!" (
set /a x+=1
set xnum= !x!
set xnum=!xnum:~-2!
echo !xnum! %%b>>%notebook%
) else (
echo Deleted item - %%a %%b
)
)
echo %notebook% rearranged, current status :
type %notebook%
exit /b
:func_add
if "%2"=="" (echo Additional information is empty &exit /b)
set xnum= %note_n%
set xnum=!xnum:~-2!
set strnow=%*
::::cut string - "add "
set strnow=%strnow:~4%
(echo %xnum% %date:~0,10% %strnow%)>>%notebook%
echo %notebook% current status :
type %notebook%
exit /b
Test:

Quote:
c:\test>note add This is a test item
notebook.x current status :

0 2010-06-08 Express delivery collection of goods on delivery not arrived
1 2010-06-08 Material not counted
2 2010-06-09 Make a supplier address and phone information table
3 2010-06-09 This is a test item

c:\test>note del 1 2
Deleted item - 1 2010-06-08 Material not counted
Deleted item - 2 2010-06-09 Make a supplier address and phone information table
notebook.x rearranged, current status :

0 2010-06-08 Express delivery collection of goods on delivery not arrived
1 2010-06-09 This is a test item

c:\test>

http://www.cn-dos.net/forum/viewthread.php?tid=46146&fpage=0&highlight=&page=2

[ Last edited by zzz19760225 on 2017-12-26 at 13:38 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 74 Posted 2016-06-26 20:10 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
26933062:

@echo off&mode con: cols=100 lines=30
echo.&color 1f&title 天佑中华
set var=abcdef
set /p= <nul>●
setlocal enabledelayedexpansion
for /f "skip=22 delims=" %%a in ('type "%~0"') do (
set /a m+=1
call :loop %%a
echo.
if !m! equ 11 echo.&echo.&echo.
)
pause>nul&exit
:loop
if "%1"=="" goto :eof
set /a w=%random%%%5+1
set h=!var:~%w%,1!
for /f "tokens=1,2 delims=-" %%a in ("%~1") do (
for /l %%l in (1 1 %%a) do set /p= <nul
for /l %%l in (1 1 %%b) do findstr /a:%h% . ●*
)
shift
goto loop
7-1 4-1 14-1 6-4 6-9 12-1 4-1
7-1 4-1 2-1 6-5 2-1 4-1 14-1 12-11
5-1 6-1 4-1 6-1 8-4 14-1 18-1 6-1
5-9 4-1 8-1 4-1 14-1 16-1 2-1 2-1 4-1
3-2 6-1 12-4 2-1 2-2 4-11 4-3 4-3
1-1 2-1 6-1 20-1 21-1 16-1 2-1 4-1 2-1
5-1 6-2 10-9 12-1 2-1 12-4 2-5
5-1 4-1 4-1 16-1 20-1 2-1
5-1 4-1 4-1 10-7 12-1 6-1 10-1 2-1 2-1 4-2
5-1 2-1 8-1 14-1 16-1 10-1 8-1 2-1 4-1 2-1 2-1
5-2 12-1 2-11 2-2 14-2 2-1 4-6 2-1
5-1 6-1 18-1 2-1 2-1 16-1 18-1 4-1
5-1 6-1 10-4 4-1 4-1 14-1 16-1 6-1 4-1
5-9 8-1 4-1 12-9 6-2 6-1 2-1
3-2 6-1 10-11 4-1 6-1 6-1 4-1 2-1 4-3 4-1
3-2 4-1 18-1 4-1 12-1 6-1 6-1 8-3 2-1 6-1
1-1 2-1 4-5 10-1 2-2 4-1 6-1 6-1 6-1 8-1 6-1 0-4
5-1 2-2 6-1 8-3 2-1 2-1 8-9 14-1
5-2 2-1 6-1 4-2 2-1 6-1 18-1 12-11
5-1 4-1 6-1 10-1 4-2 4-1 12-1 22-1
5-1 4-1 6-1 10-3 4-1 2-1 12-1 22-1
5-1 4-5 6-3 10-2 12-1 22-1

--------------------------------------------------------------------------------------------------------
eddf:
How to display the current system time using a dot matrix digital sample, please ask experts for solutions, implemented with batch processing. The following is the batch processing text of the dot matrix digital sample.

@echo off
cls
echo.
rem According to the golden ratio, the width multiplied by height of each number in this program is a 10×16 dot matrix.
color 0E
echo.
echo.
echo.
echo.
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo. ██████████
echo.
echo.
echo.
echo.
echo. ██████████
echo. ██████████
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██████████
echo. ██████████
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██████████
echo. ██████████
echo.
echo.
echo.
echo.
echo. ████
echo. ████
echo. ████
echo. ████
echo.
echo.
echo.
echo. ████
echo. ████
echo. ████
echo. ████
echo.
echo.
echo.
echo.
echo. ██████████
echo. ██████████
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██████████
echo. ██████████
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██████████
echo. ██████████
echo.
echo.
echo.
echo.
echo. ██████████
echo. ██████████
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo. ██████████
echo. ██████████
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██████████
echo. ██████████
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██████████
echo. ██████████
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo. ██████████
echo. ██████████
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██████████
echo. ██████████
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██████████
echo. ██████████
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██████████
echo. ██████████
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo. ██████████
echo. ██████████
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██████████
echo. ██████████
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██████████
echo. ██████████
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo. ██████████
echo. ██████████
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██████████
echo. ██████████
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██████████
echo. ██████████
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo. ██
echo. ███
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ██
echo. ████
echo. ████
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo. ██████████
echo. ██████████
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██ ██
echo. ██████████
echo. ██████████
echo.
echo.
echo.
echo.
pause

Batch Calendar, Clock Version 3.0 (updated on 2010-05-02) :zcydez
http://www.bathome.net/thread-7077-1-1.html

[ Last edited by zzz19760225 on 2017-12-17 at 14:18 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 75 Posted 2016-06-26 20:12 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
http://www.cn-dos.net/forum/search.php?searchid=382218&orderby=lastpost&ascdesc=desc&searchsubmit=yes&sid=1zvpF9


bat-zw:

@echo off&color 9f&mode con cols=90 lines=15&setlocal EnableDelayedExpansion
:begin
set tu=★★★★★★★★★★★★★★★■■■■■■■■■■■■■■■
for /l %%a in (1,1,30) do (
call :delay %%a
)
cls&echo.&echo Original pattern is: %tu%
echo.&echo Note there are 15 five-pointed stars in front and 15 squares behind, remember to count later!
echo.&echo For the convenience of repeated practice, no exit is set. To exit, just close the window.&ping -n 4 127.1 >nul
:choice
cls&echo.&set /p select=Please choose (default press Enter for 1)? (1. Intercept from front to back 2. Intercept from back to front)
if "%select%"=="" goto choice1
if "%select%"=="1" goto choice1
if "%select%"=="2" goto choice3
if not "%select%"=="1" goto p
if not "%select%"=="2" goto p
:choice1
cls&echo.&set /p var1=Please enter the starting position from the front (please enter a number between 0~29, default press Enter for 1):
if "%var1%"=="" set var1=1
if %var1% gtr 29 goto p1
:choice2
cls&echo.&set /p var2=Please enter the number of bits to intercept backward (please enter a number between 1~30, default press Enter for 1):
if "%var2%"=="" set var2=1
if %var2% gtr 30 goto p2
if %var2% lss 1 goto p2
cls&echo.&echo The character interception command generated by your input is: %%tu:~%var1%,%var2%%%
echo.&echo The pattern after intercepting %var2% bits from the %var1%th bit backward is:
echo.&echo !tu:~%var1%,%var2%!&pause
goto begin
:choice3
cls&echo.&set /p var1=Please enter the number of bits to intercept from back to front (please enter a number between 1~30, default press Enter for 30):
if "%var1%"=="" set var1=30
if %var1% gtr 30 goto p3
if %var1% lss 1 goto p3
:choice4
cls&echo.&set /p var2=Please enter the number of bits to discard at the back (please enter a number between 0~29 and less than the number entered earlier, default press Enter for 1):
if "%var2%"=="" set var2=1
if %var2% gtr %var1% goto p4
if %var2% gtr 29 goto p4
cls&echo.&echo The character interception command generated by your input is: %%tu:~-%var1%,-%var2%%%
echo.&echo The pattern after intercepting %var1% bits from back to front and discarding %var2% bits at the back is:
echo.&echo !tu:~-%var1%,-%var2%!&pause
goto begin
:p
cls&echo.&echo Invalid number input, please re-enter!&ping -n 2 127.1 >nul&cls&goto choice
:p1
cls&echo.&echo Invalid number input, please re-enter!&ping -n 2 127.1 >nul&cls&goto choice1
:p2
cls&echo.&echo Invalid number input, please re-enter!&ping -n 2 127.1 >nul&cls&goto choice2
:p3
cls&echo.&echo Invalid number input, please re-enter!&ping -n 2 127.1 >nul&cls&goto choice3
:p4
cls&echo.&echo Invalid number input, please re-enter!&ping -n 2 127.1 >nul&cls&goto choice4
:delay
cls&echo.&echo Original pattern is: !tu:~0,%1!&ping -n 1 127.1 >nul&cls
goto :eof

[ Last edited by zzz19760225 on 2017-12-6 at 02:45 ]
1<词>,2,3/段\,4{节},5(章)。
Forum Jump: