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-08-13 15:44
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » wbat parameter usage instructions with wbat Chinese demo View 2,489 Replies 6
Original Poster Posted 2005-01-30 00:00 ·  中国 四川 自贡 电信
初级用户
Credits 187
Posts 31
Joined 2004-08-30 00:00
21-year member
UID 30979
Gender Male
Status Offline
:
:box
Command Format
Simple Format
wbat box horizontal coordinate, vertical coordinate (colors) "content" option 1, option 2 #default option, waiting time
Advanced Format
call w.bat box horizontal coordinate, vertical coordinate (colors) @menu content file: flag
:flag Here enter the title bar
Menu Content File
Here are the following are ordinary display contents
Content in square brackets is a button

A single square bracket means a single option
is no

Up to 9 radio buttons can be set
The returned variable is %WRB%
The variable value is 1 or 2 or 3... in turn according to the selected item
Example:
if %WRB%==1 goto execute command line when selected
A single exclamation mark in square brackets means multiple options
Multiple selection

Up to 9 checkboxes can be set
The returned variables are %WCB1% - %WCB9%
Variable value 0 (not selected) 1 (selected)
Example:
if %WCB1%==1 goto execute command line when selected

Represents an edit box that can enter content
The number after the comma indicates the limit of the length of the input content
Parameters include
U force upper case (uppercase?)
P password input box, displayed as ***
! Must enter unless the window is closed by ESC
The maximum waiting time is 3600 (seconds)
Set the return value according to the order of the buttons
From top to bottom and left to right, the return values are 1,2,3... in turn
The return value of ESC is 100
When making a batch processing, the return value should be judged from high to low
First judge 100, then judge...3,2,1
========================================================
:list
Command (no return value): wbat list horizontal coordinate, vertical coordinate (colors) @content file: flag
(With return value): call wbat list horizontal coordinate, vertical coordinate (colors) @content file: flag
The display content is different from box in that there are no special marks (such as checkboxes, buttons, etc.)
Can only select line by line
Features can scroll, can display files with a maximum size of 32KB
Can be used to display real-time generated directories, files, etc.
Can turn pages through up/down PageUp/PaegDown
Can quickly locate to the position starting with the corresponding letter by pressing the letter key
The returned variable is %wbat%
The variable value is the text of the selected line
Example: Display all files in the current directory
DIR *.* /b/a-d/one > %%temp%%\temp.txt
call W.BAT list 3,60 %%temp%%\temp.txt
DIR parameter description /b only display file name
/a-d do not display directory
/one sort by file name
========================================================
:text
Command: wbat text horizontal coordinate, vertical coordinate (colors) "content"
wbat text horizontal coordinate, vertical coordinate (colors) @content file: flag
Display small text, truncated if it exceeds the screen width

========================================================
:cls
Command: wbat CLS (white on blue)
Clear the screen with the specified color
~(white on blue)~ Custom color (foreground color on background color) This can be ignored
If ignored, use the settings in Wbat.ini
========================================================
:pal
Command: wbat pal
Means to call the custom color palette
The palette configuration file is set by the wbat.ini file
The default is pal.ini
========================================================
:font
Command: wbat font
Change the number of lines of the dos window, 33 lines or 25 lines
========================================================
:cursor
Command: wbat cursor line number
wbat cursor 25+scroll count
Move the cursor to the specified line

========================================================
:fill
Command: wbat FILL position (dimensions) (colors) "string" +s
~position~ Position, starting from the upper left corner, default: 1,1
~dimensions~ Size, height, width (note to enclose in parentheses)
If this parameter is ignored, the default: fill to the lower right corner
~colors~ Color matching, if this parameter is ignored, the default calls the settings in WBAT.INI
~string~ Filled content; " " fill a space to clear the content;
If this parameter is ignored, the default: only fill the color
(The original text will be retained)
You can use @file name: flag to indicate the filled content
Or :flag to call the content of the corresponding flag in the default file
~+s~ Each line moves to the left by s characters of the filled text s means how many characters to move
The main box parameter tutorial of the wbat Chinese demo has been completed
Others are not completed
Open attachment
Floor 2 Posted 2005-02-02 00:00 ·  中国 广东 东莞 电信
初级用户
Credits 178
Posts 17
Joined 2004-03-27 00:00
22-year member
UID 21269
Gender Male
Status Offline
Thanks to the LZ! Please post more tutorials for us newbies to learn. There are too few tutorials for WBAT! Can any friend translate the tutorials for DEMO.BAT in WBAT into Chinese? My English is too bad!!!
Floor 3 Posted 2005-02-03 00:00 ·  中国 四川 自贡 电信
初级用户
Credits 187
Posts 31
Joined 2004-08-30 00:00
21-year member
UID 30979
Gender Male
Status Offline
Actually, I just used Kingsoft Quick Translate plus continuous experiments to discover the use of various parameters. With the parameters I provided above, it should be able to complete the design of various dialog boxes.
Floor 4 Posted 2005-03-11 00:00 ·  中国 广东 云浮 电信
初级用户
Credits 129
Posts 7
Joined 2004-09-30 00:00
21-year member
UID 31958
Gender Male
Status Offline
Why can't I run the downloaded one??? Strongly request friends to give me another one, to study!!! Thanks! qq:383457 e-mail: win95@163.net
Floor 5 Posted 2005-03-28 00:00 ·  中国 广东 深圳 电信
中级用户
★★
Credits 271
Posts 74
Joined 2004-11-17 00:00
21-year member
UID 33721
Gender Male
Status Offline
Floor 6 Posted 2005-09-26 14:43 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
In fact, when using WBAT, you don't need to judge the returned error number, just compare the return value of %?%.
Floor 7 Posted 2006-11-18 01:22 ·  中国 湖南 衡阳 电信
初级用户
Credits 20
Posts 10
Joined 2006-10-25 02:43
19-year member
UID 68135
Gender Male
Status Offline
I can't download it... It's directly linked to the homepage.
Forum Jump: