Jump to content

Recommended Posts

Posted

Hello all, I came across AutoIt through a google search, trying to find a solution to a problem I'm having with a batch file. I have a batch file I'm running to stop and then start a program. When the program starts it gives a dialogue box prompting yes or no, with yes already highlighted, so that pressing enter will continue. I want to use autoit to send an ENTER after the program is started.

My batch file looks like this:

@echo off

taskkill /f /im Program.exe

start "" "C:\Folder\Program.exe"

CODE TO SEND AN ENTER HERE

I've been searching for solutions, I haven't had much luck finding an example and thought I'd pass it by you all, in the hopes of some guidance. Thanks in advance for any help.

Posted

If you need help on the AutoIt to write, look at Send() in the help file.

If you're talking about implementing it into the batch, you could write your one line AutoIt script, compile it to an executable, then just have the batch file run that when it needs to.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Posted (edited)

If you need help on the AutoIt to write, look at Send() in the help file.

If you're talking about implementing it into the batch, you could write your one line AutoIt script, compile it to an executable, then just have the batch file run that when it needs to.

Thanks Minikori, that was all I needed! You put me in the right place, I appreciate it. That was the easiest thing I did all day, thankfully.

Send("{ENTER}")

Edited by zargon33

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...