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-01 16:50
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] How to open multiple programs that require a carriage return confirmation dialog in batch processing View 1,892 Replies 11
Original Poster Posted 2006-05-12 15:14 ·  中国 云南 昆明 电信
初级用户
★★
Credits 182
Posts 88
Joined 2005-11-29 05:52
20-year member
UID 46146
Status Offline
I need to open more than 10 identical programs. Such a program is like this: you click an executable file (look.txt), and then a dialog box pops up and you need to click OK (or space) to open the related executable file (get.txt). If you run look.txt directly with a batch script, there will be a pause and you need to manually confirm. I wonder if I can open them all at once without pausing.
Floor 2 Posted 2006-05-12 16:28 ·  中国 广东 广州 白云区 电信
金牌会员
★★★★
D◎$ Fαп
Credits 4,562
Posts 1,883
Joined 2004-01-19 00:00
22-year member
UID 15812
Gender Male
From 广东广州
Status Offline
The description is not clear enough. How can a.txt be an executable file?!
----====≡≡≡≡ 我的至爱,永远是MSDOS!≡≡≡≡====----
Floor 3 Posted 2006-05-12 17:03 ·  中国 四川 成都 联通
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
A rather strange question, and a rather strange thread starter
Floor 4 Posted 2006-05-12 20:29 ·  中国 广东 广州 白云区 电信
荣誉版主
★★★
Credits 718
Posts 313
Joined 2005-09-26 00:00
20-year member
UID 42844
Gender Male
Status Offline
My understanding is:
I need to open more than 10 programs at the same time. Such a program, when you click a batch file, a dialog box will pop up and you need to click OK (or select the "OK" button with a space), and then the relevant executable file will be opened.
If you run it directly with a batch file, there will be a pause and you need to manually confirm.
I wonder if I can open all of them at once without any pauses?
Floor 5 Posted 2006-05-14 18:00 ·  中国 云南 昆明 联通
初级用户
★★
Credits 182
Posts 88
Joined 2005-11-29 05:52
20-year member
UID 46146
Status Offline
I need to open more than 10 identical programs. Such a program is like this: after you click an executable file (look.txt), a dialog box will pop up and you need to click OK (or space), and then the relevant executable file (get.txt) will be opened. If you directly run look.txt with a batch script, there will be a pause and you need to manually confirm. I wonder if I can open all of them at once without pausing?

[ Last edited by willsort on 2006-5-24 at 01:03 ]
Floor 6 Posted 2006-05-14 18:09 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
look.txt is not an executable file but a text file.
It seems that your description implies that the file association might have been changed or notepad.exe might have been modified. Can you post your batch script so that everyone can help you take a look?
Or you can directly specify the executable file used to open look.txt in the batch script, for example:
c:\windows\notepad.exe look.txt
type look.txt
Floor 7 Posted 2006-05-14 19:35 ·  中国 四川 成都 联通
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
The Chinese in the original text "楼主的语文啊~~~~~~~" is not a standard sentence with a specific technical or translatable content in the context of retro-computing, DOS, etc. But following the requirements, if it's not translatable in a way related to the specified topics, we return the original text. So the translated result is: The LZ's Chinese language啊~~~~~~~
Floor 8 Posted 2006-05-14 22:22 ·  中国 湖南 常德 电信
银牌会员
★★★
Credits 1,384
Posts 709
Joined 2005-10-29 22:22
20-year member
UID 44271
Status Offline
After looking at it for a long time, I still don't know what's going on exactly
Floor 9 Posted 2006-05-14 22:34 ·  中国 云南 昆明 联通
初级用户
★★
Credits 182
Posts 88
Joined 2005-11-29 05:52
20-year member
UID 46146
Status Offline
It means this:

When you run: D:\one.exe, a dialog box will appear asking whether to "log in to the system" (there are two buttons: OK and Cancel. By default, just "press Enter or space" to open the program)

Because I need to open eight such programs at once. If I use a batch file, only the first one runs and the dialog box pops up. Only after pressing Enter or space can I continue running the second command. This is almost as efficient as doing it manually.

[*I just want to ask if a batch file can be used to achieve opening the program directly without the dialog box popping up*]
Attachments
this.BMP
Floor 10 Posted 2006-05-14 22:57 ·  中国 湖北 荆门 电信
荣誉版主
★★★
Credits 2,013
Posts 718
Joined 2006-02-18 07:07
20-year member
UID 50550
Status Offline
Oh, LZ, the expression in your first two posts is really...

This issue shouldn't be posted in this section; it can be posted in the section in my signature.

Using a VBS script to send an enter key should be able to solve the problem.

strExeFile = "D:\one.exe"
With CreateObject("Wscript.Shell")

for i = 1 to 8
.Run strExeFile 'Run the program
Wscript.Sleep 500 'Wait for half a second, assuming your program takes half a second to start
.SendKeys "~" 'Send an enter key
next

end With
Floor 11 Posted 2006-05-14 23:28 ·  中国 山西 临汾 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline

───────────────── Moderation Record ─────────────────
Executor: Will Sort
Operation: Merge the following threads
+ {20601->1}This problem is also quite strange!
+ {20650->5}My strange idea means this.
> {20646->9}The strange problem mentioned before means this!
Explanation: The operated threads have direct context connections
Punishment: Deduct 8 points, including 6 points rewarded for posting the thread and 2 points deducted for repeated thread penalty
Tip: Please visit {7326}Forum Newcomer Must-Read, Basic Code of Conduct for Everyone
───────────────── Moderation Record ─────────────────



───────────────── Moderator Prompt ─────────────────
To facilitate forum users' browsing and moderator management, please modify the title of this thread to briefly describe the content or intention of the thread.
If you confirm that the title does not need to be modified, please continue to reply to this thread to appeal. If the appeal reason is sufficient, this notification will be canceled.
If you confirm that the title needs to be modified, please click the "Edit" button below the first post of this thread and modify the title field in the editing page.
If you still do not appeal or modify within three days after this notification is issued, the moderator will modify it and impose corresponding punishment on the author.
The punishment is to deduct 8 points, including recovering 6 points rewarded for posting the thread and 2 points deducted for title violation.
After knowing that you have made a positive and appropriate response, the moderator will delete this prompt within three working days to eliminate the adverse impact on you.
───────────────── Moderator Prompt ─────────────────

Recommended title: How to open multiple programs with confirmation dialogs that require pressing Enter at one time

[ Last edited by willsort on 2006-5-24 at 01:14 ]
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 12 Posted 2006-05-24 01:02 ·  中国 山西 太原 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
23-year member
UID 19
Gender Male
Status Offline

───────────────── Moderation Record ─────────────────
Executor: Will Sort
Operation: Modify Title - 20642 - The strange problem mentioned before is this meaning!
Description: The original topic author did not appeal or modify within three days after the notification was issued, so the moderator modified and imposed a penalty
Punishment: Deduct 6 points of points awarded for publishing this topic, deduct 2 points of points for title violation penalty
───────────────── Moderation Record ─────────────────



───────────────── Moderation Record ─────────────────
Executor: Will Sort
Operation: Move Topic: From "DOS Difficulties & Problem Discussion (Answer Room)"
Description: No reply in the original forum area within three days, move to this forum area for an attempt
Tip: The original area transfer link will be deleted after three days
───────────────── Moderation Record ─────────────────


[ Last edited by willsort on 2006-5-24 at 01:04 ]
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Forum Jump: