中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-26 23:34
47,812 topics / 349,912 posts / today 2 new / 48,264 members
其它操作系统综合讨论区 » How to automatically send an Enter key in DOS?
Printable Version  1,672 / 11
Floor1 ednykissyou Posted 2006-06-05 13:46
初级用户 Posts 88 Credits 182
How to send a carriage return in DOS? I use: start d:\the.exe to open the the.exe file and then need to press a carriage return or space. I want DOS to send a carriage return for me.
Floor2 lhkyzh Posted 2006-06-05 14:29
初级用户 Posts 12 Credits 34
This depends on whether you need to press OK when directly running the.exe.
If the.exe has command-line parameters, then take a look at its help.
Batch processing itself does not have such a command.
AU3 can do it
Floor3 DOSforever Posted 2006-06-05 18:36
金牌会员 Posts 2,239 Credits 4,639
The keystack command of 4DOS.COM and kstack.com can be used to perform keyboard pre-input.
Floor4 tsenix Posted 2006-06-06 00:47
初级用户 Posts 61 Credits 121 From HK
How about making a batch file?
echo. > CR
start d:\the.exe < CR 或 type CR|start d:\the.exe
del CR
Floor5 不得不爱 Posted 2006-06-06 13:09
超级版主 Posts 2,044 Credits 5,310 From 四川南充
echo y|start d:\the.exe
Floor6 bagpipe Posted 2006-06-06 14:22
银牌会员 Posts 425 Credits 1,144 From 北京
Hey, what people are talking about is pressing Enter. Moderator QUE1234567 pass a Y, heh echo enter>cc start d:\the.exe <cc Try this, if it doesn't work, only use VBS's SENDKEYS to pass it
Floor7 willsort Posted 2006-06-06 19:37
元老会员 Posts 1,512 Credits 4,432
关于bagpipe:

输入似乎也不只是回车。可以使用echo.向标准字符流发送一个回车符和一个换行符。但通常GUI程序会使用另一套键盘识别机制,而不会接受标准字符流的I/O,所以echo的方法应该无效。所以需要知道the.exe的程序类型。

Regarding bagpipe:

Enter doesn't seem to be just a carriage return. You can use echo. to send a carriage return and a line feed to the standard character stream. But usually GUI programs use another set of keyboard recognition mechanisms and won't accept I/O of the standard character stream, so the echo method should be ineffective. So we need to know the program type of the.exe.
Floor8 ednykissyou Posted 2006-06-06 23:00
初级用户 Posts 88 Credits 182
Can you give an example of the two you mentioned? I haven't used these two things and don't know how to start.
Floor9 ednykissyou Posted 2006-06-06 23:02
初级用户 Posts 88 Credits 182
Can you give an example? Thanks a lot!
Floor10 ednykissyou Posted 2006-06-06 23:09
初级用户 Posts 88 Credits 182
Use VBS's SENDKEYS to pass?
How to use it, sending Enter is very important to me. If using other software to do it is a bit not worth it, batch processing is the best here, but there has never been such a thing, please help me, great experts
Floor11 scriptor Posted 2007-01-31 03:42
银牌会员 Posts 555 Credits 1,187
I made an enter.com file. Just added it to your file. Not sure if it meets your meaning!?

http://www.cn-dos.net/forum/viewthread.php?tid=26456&fpage=1&highlight=enter.com


[ Last edited by scriptor on 2007-1-30 at 02:43 PM ]
Floor12 zybird Posted 2007-02-01 02:17
中级用户 Posts 53 Credits 240
Pressing Enter can transmit like this

echo.|start d:\the.exe
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023