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-11 06:21
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Posting a program that can press Enter automatically View 7,642 Replies 32
Original Poster Posted 2007-01-09 00:01 ·  中国 北京 中国科学院研究生院
银牌会员
★★★
Credits 1,187
Posts 555
Joined 2006-12-21 07:35
19-year member
UID 74129
Gender Male
Status Offline


This was written with dubug
Not a virus.

It's a COM file that presses Enter automatically

Hope everyone likes it



──────────────── Moderator record ────────────────
Executed by: namejm
Original title: Posting a file
Modified title: Posting a program that can press Enter automatically
Explanation: Because the title was too vague, making forum searching and management inconvenient, and three days after this notice was posted, the OP still had not
  modified the title, 2 credits were deducted, and I forcibly changed the title myself.
──────────────── Moderator record ────────────────


[ Last edited by namejm on 2007-2-3 at 11:03 AM ]
Recent Ratings for This Post ( 4 in total) Click for details
RaterScoreTime
redtek +5 2007-01-09 07:28
namejm -2 2007-02-04 00:04
huzixuan +2 2007-06-06 15:19
+1 2009-04-21 09:26
Attachments
ENTER.rar (87 bytes, Credits to download 1 pts, Downloads: 234)
Floor 2 Posted 2007-01-09 00:09 ·  中国 北京 中国科学院研究生院
银牌会员
★★★
Credits 1,187
Posts 555
Joined 2006-12-21 07:35
19-year member
UID 74129
Gender Male
Status Offline
It's used to automatically respond to your bat commands

For example, suppose a bat is like this:

@echo off
echo do you want ?
echo haha
pause

Then it will display:
"Press any key to continue......" or "Press any key to continue......"

But if you add
@echo off
echo do you want ?

echo haha
enter.com
:other program
...
...
...

then it will automatically judge your commands and stop at the proper time.
Floor 3 Posted 2007-01-09 00:43 ·  中国 北京 联通
初级用户
Credits 47
Posts 24
Joined 2007-01-09 00:03
19-year member
UID 75873
Gender Male
Status Offline
I didn't quite understand. What is the relation between the 2 examples you gave? In the 2nd example there is one more line, enter.com, and one less line, pause, so what exactly did you mean by specially pointing out in your 1st example
Then it will display:
"Press any key to continue......" or "Press any key to continue......"
?
Floor 4 Posted 2007-01-09 01:13 ·  中国 北京 中国科学院研究生院
银牌会员
★★★
Credits 1,187
Posts 555
Joined 2006-12-21 07:35
19-year member
UID 74129
Gender Male
Status Offline
What I mean is, if you understand the bat or other program you made very well,
and know at what point you want the program to continue running by itself,
without showing prompts like "Press any key to continue......" or "Press any key to continue......"
and so on, then you can add this
enter.com

to your bat

and let the program judge for itself and continue running.

The second example is not simply about removing pause, it was just to make the explanation easier.
Floor 5 Posted 2007-01-09 01:15 ·  中国 广东 湛江 电信
高级用户
★★★
Credits 959
Posts 311
Joined 2006-04-11 14:08
20-year member
UID 53665
Gender Male
From 广东-LianJiang
Status Offline
Post #3
The pause in his first example is the pause command, which displays "Press any key to continue......" on the screen.
And the second example uses the enter.com program in place of pause.
Floor 6 Posted 2007-01-09 02:35 ·  中国 甘肃 甘南藏族自治州 合作市 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
I can't think of where this would be used
Floor 7 Posted 2007-01-09 03:56 ·  中国 广东 深圳 电信
初级用户
Credits 32
Posts 16
Joined 2006-10-19 21:11
19-year member
UID 66985
Gender Male
Status Offline
It has some use, but really, it's also used rather rarely.
Floor 8 Posted 2007-01-09 04:14 ·  中国 广东 广州 电信
初级用户
Credits 20
Posts 8
Joined 2007-01-08 22:25
19-year member
UID 75862
Gender Male
Status Offline
Yeah, everybody knows the first command, but basically not many people know the later one. Hehe~
Floor 9 Posted 2007-01-09 04:18 ·  中国 山东 济南 电信
社区乞丐
★★
此图片另存后死机
Credits -49
Posts 90
Joined 2006-12-02 13:00
19-year member
UID 72412
Gender Male
Status Offline
If your command must have Enter pressed before it can continue, you can use a pipe symbol to pass Enter to it.

ECHO.|需要按回车的命令
我的网络笔记本.非联系本人请勿访问!http://w.vicp.net
Floor 10 Posted 2007-01-09 07:06 ·  中国 北京 中国科学院研究生院
银牌会员
★★★
Credits 1,187
Posts 555
Joined 2006-12-21 07:35
19-year member
UID 74129
Gender Male
Status Offline
Oh, that's not bad either
Floor 11 Posted 2007-01-09 07:28 ·  中国 北京 联通
金牌会员
★★★★
Credits 2,902
Posts 1,147
Joined 2006-09-21 12:00
19-year member
UID 63324
Gender Male
Status Offline
The important thing is that every tool you write brings continuous innovation and new thinking~ :)
Giving this post extra points as encouragement~ :)
Hope to see more fun ideas and creations from brother scriptor~ :)
    Redtek,一个永远在网上流浪的人……

_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._
Floor 12 Posted 2007-01-09 07:43 ·  中国 北京 中国科学院研究生院
银牌会员
★★★
Credits 1,187
Posts 555
Joined 2006-12-21 07:35
19-year member
UID 74129
Gender Male
Status Offline
Many thanks, brother redtek

Hope there will be
Recently I'm designing an alarm

Because of exams, I don't have much time to think about it
Hope someone can think of it before I do.

Hehe。。。。。
Floor 13 Posted 2007-01-09 14:34 ·  美国 弗吉尼亚州 华盛顿县 Microsoft
高级用户
★★
Credits 783
Posts 268
Joined 2006-12-26 17:18
19-year member
UID 74627
Gender Male
Status Offline
Many thanks. I also hope you can provide the code for DEBUG as well
Floor 14 Posted 2007-01-14 00:23 ·  中国 江苏 苏州 电信
新手上路
Credits 13
Posts 6
Joined 2005-07-25 13:39
21-year member
UID 41038
Status Offline
Not very useful
Floor 15 Posted 2007-06-06 13:05 ·  中国 山东 菏泽 电信
新手上路
Credits 2
Posts 1
Joined 2007-06-06 12:33
19-year member
UID 90427
Gender Male
Status Offline
Sometimes it really is needed
Forum Jump: