Jump to content

Detecting a Prompt


wibs
 Share

Recommended Posts

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

Link to comment
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]
Link to comment
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
 Share

  • Recently Browsing   0 members

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