标题: 問WBaT中checkbox超過九個選項要如何修改
[打印本页]
作者: dosfroum
时间: 2005-9-25 01:56
标题: 問WBaT中checkbox超過九個選項要如何修改
問 wbat 中使用 checkbox 最多只能有九項選擇
要是我的選項 有20幾個要怎麻半 因為我要把選單寫成 可同時選擇多台電腦
謝謝
作者: willsort
时间: 2005-9-25 11:20
Re dosfroum:
我个人不曾使用过 wbat ,不过如果它确有此限制,可以考虑不使用 checkbox,而使用 Input field ;或者将 checkbox 分组显示也是可以考虑的折中方案。
作者: dosfroum
时间: 2005-9-25 17:08
Quote: |
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: ~[! include subdirectories]~
Note:
On the keyboard toggle with space bar.
The symbol marking ~on~ is defined
in WBAT.INI (default: "x").
:
:checkbox-example "Checkbox" [x]
[!] include subdirectories
[!] all upper case
[ ok ] [ cancel ]
:
: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~).
::
作者: willsort
时间: 2005-9-26 01:33
Re dosfroum:
对不起,也许是我说得过于含糊,因为我实在对 wbat 很陌生,下面是我从 wbat.txt 中截出来的文字:
Quote: |
:input
# Input field in box layout ^
An input field is denoted by a ~$~-sign followed by the name of the
variable that will return the input string.
Example: ~[$ city ]~
The input length is determined by the space including the brackets.
A different length (longer or shorter) may be specified, as well as
additional options:
~U~ force upper case
~P~ password entry mode
~!~ input required (unless box is closed by ESC)
Example: ~[$ name,40,U! ]~
If the input length exceeds the visible field size,
the string will be shifted, if necessary.
Note that it is possible to make a box with
an input field only (without buttons).
In this case ENTER will close the box.
::
:input-var
# Input variable ^
To handle input, you must tell WBAT to return variables, using the
construct:
~CALL W.BAT box ....~
For details see ~Control~ section in main menu.
You may assign an initial/default string to the variable, before the
box is displayed. ~Be sure to clear the variable, if you want an empty
input field.~
Note: WBAT will remove trailing spaces from the input string.
:: |
|
作者: dosfroum
时间: 2005-9-26 22:37
Quote: |
Originally posted by willsort at 2005-9-26 01:33:
Re dosfroum:
对不起,也许是我说得过于含糊,因为我实在对 wbat 很陌生,下面是我从 wbat.txt 中截出来的文字:
|
|
謝謝 我有試出來了 但是必須以打字的方測偵測 且語法會變得很長
資料沒帶回來 明天在貼出我的做法 請您幫忙修正
不然真的太長了 謝謝您耐心的回覆