中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-06-28 16:29
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » 各位高手请进来帮小弟解决个问题!!! 查看 778 回复 4
楼 主 各位高手请进来帮小弟解决个问题!!! 发表于 2005-01-01 00:00 ·  中国 浙江 杭州 华数宽带
高级用户
★★
积分 772
发帖 273
注册 2004-10-23 00:00
21年会员
UID 32861
性别 男
状态 离线
能在WINDOWS下或者在DOS下能把输入的数据SET给指定的变量
举个例子假如我写了个批处理如下
@echo off
set w=
::在这能有个工具能截取从键盘输入的数据把这个数据SET给变量W 或者是DOS命令建个菜单样式的更好最好是能在WINDOWS和DOS下都能用的
http://www.msfans.net/bbs/
2 发表于 2005-01-03 00:00 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
积分 6,962
发帖 2,753
注册 2003-04-16 00:00
23年会员
UID 1565
性别 男
来自 河北保定
状态 离线
在Windows 2000/xp/2003的DOS方式下,可以使用set /p w=命令。而在其它环境下,你恐怕需要使用一些第三方工具了。
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
3 发表于 2005-01-04 00:00 ·  中国 浙江 杭州 电信
高级用户
★★
积分 772
发帖 273
注册 2004-10-23 00:00
21年会员
UID 32861
性别 男
状态 离线
谢谢Climbing兄set /p我是知道的但是能在DOS下也支持的不知道你知道那个工具是什么吗
http://www.msfans.net/bbs/
4 发表于 2005-01-04 00:00 ·  中国 河北 石家庄 联通
铂金会员
★★★★
网络独行侠
积分 6,962
发帖 2,753
注册 2003-04-16 00:00
23年会员
UID 1565
性别 男
来自 河北保定
状态 离线
有很多这种工具吧。例如Horst的input或者wbat。Horst Schaeffer的主页:http://home.nikocity.de/horst.muc/int/或者
GET Version 2.8 - Bob Stephan's BATch Enhancer - Copyright 1999 Bob Stephan
Syntax: GET command argument(s) /switches More Instructions: GET.DOC
Purpose Command Argument(s) Switches Environment ErrorLevel Extended
--------- ------- ----------- ----- --(GET=)--- --(Exit)-- -----
--------- String Handling and Screen I/O Commands --------
Echo EC "prompt" ANS -- -- --
Get character C All ASCII Char ASCII code No Echo
aNswer yes or no N All ASCII Char ASCII code No Echo
Get string S All String Length Echo .
Put string (Zap) Z AWX String Length --
Standard Input ZE AWX String Length --
In String # "string" WX Position in string Extract
Moving Text T "filespec" EX ASCII Char ASCII code No Echo
Key waiting I AEX --Character Waiting-- Get Char
Keyboard bUffer UW Locks Length Caps/Num
For UE:=test, =set:16=Scroll Lock, 32=Num Lock, 64=Caps Lock
'Rithmetic R num AW Result Result
Blank Screen B AWX --Old attribute-- HexAttr
Video mode/bordr V --Old mode/color-- Border
Video Cursor VC X --Old type/posit-- --
Date and Time H code ACSWX Value Value Strng/Ctry
Code:1=DoW 2=DoM 4=Mon 8=Yr 16=Hr 32=Min 64=Sec 128=odd/even 256=100ths 512=yy
--------- Disk and File Commands --------
File size F filespec AEWX Bytes/Hex KB/Wdiv Kb/10
File date F filespec /E/Wcode ACES Value Value Strng/Ctry
/E required, /W codes: 2, 4, 8, 16, 32, 64, 512 as for GET H
Full Path FP filespec Fullpath Length --
Disk free space K AWX Kilobytes KB/10/Wdiv Kb/100
Disk capacity Q AWX Kilobytes KB/10/Wdiv Kb/100
Volume label L AXH Label 1=yes,0=no Match
EXEC X "d:\path\program.ext" 'args' Exit Exit Path
Current dir Y Directory Level:Root=0
Current drive YE (boot drive /X) Drive Drive:A=0
--------- Memory and System Commands --------
Environment left E (full size /X) Bytes Bytes Bytes/10
Memory free/Ext M (full size /X) EWdiv Kilobytes KB/MB/Wdiv Exit/10
Break Flag BR Old flag --
Printer(PRN) P X 1=yes,0=no 1=yes,0=no Init
DOS Version D Major Vers MajorMinor MinorEnv
DESQview Version DV Major Vers MajorMinor --
4DOS Version 4 Major Vers MajorMinor --
Windows 4E 1=yes,0=no 1=yes,0=no --
Coprocessor/CPU 7 1=yes,0=no 1=yes,0=no CPU Type
ANSI.SYS/Model A 1=yes,0=no 1=yes,0=no PC Model
Warm/Cold Boot W If arg:1=warm, 0=cold ColdBoot
Surrogates: }=Carriage Return, ~=Escape, Alt-255=Space/Blank.
GLOBAL SWITCHES: (apply to most commands if appropriate)
/H Hex output, /M Master Env, /R Return Code in Environment, /U /L case
/B flush key Buffer, /TL/TR/T Trim Left/Right/Both, /Vvar=, /V- No var
WINDOWS NT solutions: (see GET28NEW.DOC) /O for redirected output with >>
/V@filespec append the environment variable to the specified file
LOCAL SWITCHES: (action depends on the command)
/A Attribute , All bytes , ASCII /N No CR
/K 10 second timeout Kountdown, /S Sound control/Date format
/C suppress Ctrl-Break during input , Compressed date
/E /X EXtended keys or EXtra feature, /W Wait or numerical value
See GET.DOC for additional features and BATch programming instructions.
See GET28NEW.DOC for new and changed features in Version 2.8.
GET is a shareware product. Registration is required for continued use.
偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
5 发表于 2005-01-05 00:00 ·  中国 浙江 杭州 电信
高级用户
★★
积分 772
发帖 273
注册 2004-10-23 00:00
21年会员
UID 32861
性别 男
状态 离线
谢谢Climbing兄已经完成!!!
http://www.msfans.net/bbs/
论坛跳转: