Originally posted by willsort at 2005-9-25 11:20:
Re dosfroum:
我个人不曾使用过 wbat ,不过如果它确有此限制,可以考虑不使用 checkbox,而使用 Input field ;或者将 checkbox 分组显示也是可以考虑皠...
對不請 我沒有聽過input field 可以概略訴說一下嗎
以下是 wbat中的checkbox的範例語法
# Checkboxes in box layout ^
A checkbox is used to toggle an option on/off. To offer checkboxes in
a dialog box, put an exclamation mark in square brackets.
Example: ~ include subdirectories~
In this example only the checkbox itself can be clicked on to toggle the
status. To include the associated text in the sensitive area, include it
in the square brackets.
Example: ~~
Note:
On the keyboard toggle with space bar.
The symbol marking ~on~ is defined
in WBAT.INI (default: "x").
:
:checkbox-example "Checkbox"
include subdirectories
all upper case
:
:checkbox-var
# Checkbox variable ^
You can have up to 9 checkboxes in a dialog box. The status of each
checkbox is returned by the value ~0~ (off) or ~1~ (on), assigned to
the variable WCB~1~ for the first one, WCB~2~ for the second, etc.
This is an example of handling the returned variable:
~
set option=
if %%WCB1%%==1 set option=/S
~
Note that the initial/default status can be assigned to these variables
before the box is displayed. An empty variable or any invalid value is
taken as ~0~ (~OFF~).
::