Sign in to follow this  
Followers 0
wibs

Detecting a Prompt

3 posts in this topic

Hi,

I have embedded 5 console applications into a form (not cmd.exe, but console applications that do have a UI and hence message loops), and I have to start them in a fixed order. When the first console application starts it displays some status messages and info (it is talking to a MySQL database, reading config files etc), then produces a prompt (at which commands can be typed). When I see the prompt I know it is then safe to start the second console application, and so on until they are all running.

My question is, in order to automate this, is there any way of detecting that the first console is now displaying its prompt? Does the appearance of a prompt generate any event, or message, that I can detect? Or am I forced to parse the text from the console window, and look for the prompt string?

Wibs

Share this post


Link to post
Share on other sites



You could use WinExists if you know the name of the prompt.

Hi,

I have embedded 5 console applications into a form (not cmd.exe, but console applications that do have a UI and hence message loops), and I have to start them in a fixed order. When the first console application starts it displays some status messages and info (it is talking to a MySQL database, reading config files etc), then produces a prompt (at which commands can be typed). When I see the prompt I know it is then safe to start the second console application, and so on until they are all running.

My question is, in order to automate this, is there any way of detecting that the first console is now displaying its prompt? Does the appearance of a prompt generate any event, or message, that I can detect? Or am I forced to parse the text from the console window, and look for the prompt string?

Wibs


Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic]

Share this post


Link to post
Share on other sites

You could use WinExists if you know the name of the prompt.

I didn't know that prompts had names. How would I find the name of a prompt?

Wibs

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0