Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Batch Script

Featured Replies

I have a batch script that calls a program and runs it. The exe wants the user to hit the enter key before quitting and then letting the batch go on. I do not have a pause in the script it the prompt is hard coded into the program. How do I get the script to enter a literal enter key so that it can complete the program and go on with the script?


here's an old dos trick, don't know if it will work for you or not. use at your own risk.

create a text file with a single carriage return and save it as cr.txt.

change your cmd line to the following:

mycommand.exe <<cr.txt

the program will run and the redirection will take the contents of the file and load it into the input buffer, when the window comes up the button would take the carraige return and then close. Might work might not.

Otherwise create an autoit script and run the program from it and have autoit watch for the window and then press the button automatically.

  • Author

are you saying put a single enter into the text file? A blank line?

  • Author

Neither of those tricks worked. Any other ideas?

  • Author

I have a program that parses a csv into other csv files so that they can be imported into sql. The executable prompts when it is complete to hit any key which actually is the enter key that it really wants. I am trying to get around having to change the source code of the program and recompile because of internal costs of doing so.

Will it take any other key but enter?

Or did you try writing an autoit script that watches for the window to appear and then sends it the enter key.

if you want to post (or PM) the exe i can probably remove the "press any key" thing for you.

The program is not taking input from STDIO, so redirection and pipes are not going to work.

You need to use some sort of keystack program, such as 4nt, or quercus rexx etc, which can send keys to a different window. I can't think of any free ones off hand.

The other alternative is to look for some sort of switch in the program, such as -quiet or -q or -s or -silent, where the program does not provide any user interaction.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.