Jump to content
Sign in to follow this  
cbarber54

decision based on message returned

Recommended Posts

cbarber54

I am using autoitscript to enter data into input screen. If I enter an account number the program will return one of several messages. I need to examine the message and respond appropriately.

An example:

Category Order No P Med Rec N

1 Dict Dr N

2 Ord Dr N

3 Other Drs N

4 Ins Comps N

5

"V000000180 TEST,A ADM IN OK? "

"V0000000180 test,a adm in ok" - is the message displayed by the program for this account. It is prompting for a yes or no.

The next account entered may send a different message that may require an additional response.

This is just one example of a message - there are other messages.

Is it possible to do this?

Thanks for your help .

Share this post


Link to post
Share on other sites
Blue_Drache

I am using autoitscript to enter data into input screen.  If I enter an account number the program will return one of several  messages.  I need to examine the message and respond appropriately.

An example:

Category    Order No  P                  Med Rec   N
  1                                                    Dict Dr   N
  2                                                    Ord Dr   N
  3                                                    Other Drs N
  4                                                    Ins Comps N
  5                                                  
   "V000000180  TEST,A  ADM IN  OK?  "

"V0000000180 test,a adm in ok" - is the message displayed by the program for this account.  It is prompting for a yes or no.

The next account entered may send a different message that may require an additional response.

This is just one example of a message - there are other messages.

Is it possible to do this?

Thanks for your help .

<{POST_SNAPBACK}>

Select/Case structure is what you're looking for.

While 1; primary data loop start
   $msg = ControlGetText("window","text","ControlID")
      If @error then ExitLoop
   Select
      Case $msg = "V000000180  TEST,A  ADM IN  OK?  "
        ; do functions for this message
      Case $msg = ""V000000180  PROD,B  ADM IN  OK?  "
        ; do functions for this message
      Case Else
        ; do functions related to anything else
   EndSelect
WEnd; primary data loop end

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites
cbarber54

Thanks Blue_Drache,

This helped a lot - but I could not use ControlGetText because this is running under OSAL and not true Microsoft window. Could not get ControlID.

I had to use CursorMove to outline message (program restraing) and copy to clipboard.

Then clipget to identify message.

Not very neat - but it works.

Thanks for your help.

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  

×