Jump to content
Macro Express Forums
jso

How to Capture Messages from the pop up Windows Application Message Boxes?

Recommended Posts

I am trying to do the steps with the Macro tool that will depend on the messages that I am getting from the windows app.

Share this post


Link to post
Share on other sites

Well, if you do have a question we’re going to need more information than that if you want help.

 

Do you mean that you want to capture a particular type of message that does not allow copying to the clipboard?

 

If so, describe an example in detail or tell us exactly how we can reproduce  it. Show us some screenshots. Also, what script have you tried so far and what is the result? You can show your script commands and the resulting code using the Code tool, <>.

 

Terry

Share this post


Link to post
Share on other sites

I created macro that closing the claims. 10 % of all claims can't be closed because some additional steps have to be completed prior to closing. Pop up box let me know what has to be done for these 10% of all claims. How i can capture this situation? Planning to use MEP logic for the resolution. But I need to know how to capture the popup box and the message.

Share this post


Link to post
Share on other sites

During the early 2000s, Microsoft introduced a way to copy information from a message box to the clipboard.  For this method to work, the message box must have focus. But nothing needs to be selected.

 

In many (although not all) message boxes, pressing Ctrl + C copies its content to the clipboard as plain text. So the script might look like this.

 

Text Type (Simulate Keystrokes): <CONTROL>c
Variable Set String %x% from the clipboard contents
If Variable %x% Contains "Hello"
  MessageBox: Result True
Else
  MessageBox: Result False
End If

<TEXT TYPE Action="0" Text="<CONTROL>c"/>
<VARIABLE SET STRING Option="\x02" Destination="%x%" NoEmbeddedVars="FALSE"/>
<IF VARIABLE Variable="%x%" Condition="\x06" Value="Hello" IgnoreCase="FALSE"/>
<MESSAGEBOX Caption="Result True" Message="Contains \"Hello\"" Icon="0"/>
<ELSE/>
<MESSAGEBOX Caption="Result False" Message="Does not contain \"Hello\"" Icon="0"/>
<END IF/>
	

 

Share this post


Link to post
Share on other sites
14 hours ago, jso said:

I created macro that closing the claims. 10 % of all claims can't be closed because some additional steps have to be completed prior to closing. Pop up box let me know what has to be done for these 10% of all claims. How i can capture this situation? Planning to use MEP logic for the resolution. But I need to know how to capture the popup box and the message.

 

No screenshot or link as requested so I'll assume that you want to capture the text in pop-up boxes that do not allow the usual 'select then copy' approach.

 

If the text needs to be pasted elsewhere but does not necessarily have to be 100% accurate, investigate OCR using a third party tool.

 

If the text is brief and for your personal guidance after closing the message,  consider capturing its image and displaying it conveniently, or saving it in a reference folder.

Share this post


Link to post
Share on other sites

I use controls commands in MEP. The Wait For Control is also valuable. Then one an get the text form the message box using that same control if necessary. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...