wait and send keystroke


R

radical dissident

i have an unattended server build script that gets hung on one particular
step: a place where a window pops up and waits for the user to press OK.
The script (this particular part is a batch file) won't continue until that
happens.

i cannot use WSH SendKeys since the VB script has to run & terminate before
I can start the installer routine that ends with the pop-up.

in other words, the program that sends OK to that pop-up needs to run 1st in
a batch file but allow the batch file to continue running... it sits &
watches.

anyone have an idea?

thanks
 
Ad

Advertisements

R

Ritchie

radical dissident said:
i have an unattended server build script that gets hung on one particular
step: a place where a window pops up and waits for the user to press OK.
The script (this particular part is a batch file) won't continue until that
happens.
Have you triple checked that there are no commandline options to force this
program to run silently?
i cannot use WSH SendKeys since the VB script has to run & terminate before
I can start the installer routine that ends with the pop-up.
I don't understand why you say you can't use VBScript - I'm saying that it would
work, only I that I don't understand your reason for it not being suitable.
in other words, the program that sends OK to that pop-up needs to run 1st in
a batch file but allow the batch file to continue running... it sits &
watches.
I'm sure there are many other ways, but I'd probably give cmdow a try
since I'm somewhat familiar with it. Something like:-

@echo off & setlocal ENABLEEXTENSIONS
:top
ping 127.0.0.1 -n 11 >nul
for /f "tokens=8*" %%a in ('cmdow') do (
if "%%b"=="Title of Message Box" (
cmdow "%%b" /cls & goto :EOF
)
)
goto :top

The above will loop every ten seconds until it finds a window with the
title of 'Title of Message Box'. When found, it will close it and quit.

Put the code in a separate batch file and have your main batch file
launch it like this:-

start cmd /c msgkiller.cmd

If TCP/IP is not installed then replace the delay code with something
like the Sleep util form the reskit. Let us know how you get on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top