int w=win("POS Settlement File""#32770") Acc a.Find(w "STATICTEXT"""""0x1000) str s sn
s=a.Name if(findrx(s "\d+"00 sn)<0)end"no numbers" int n=val(sn) out n
That code was for a standard Windows message box. If does not work, use dialog 'Find accessible object' to capture the object (message text) and create code. Replace the first 2 lines with the new code created by the dialog.
I too have the same issue.Message shown in our message box is dynamic..for eg:-
Day1:- 500 data uploaded..
Day2:- 1245 data uploaded..
day3:- 10 data uploaded...
Cay you suggest a solution to capture dynamic values with respect to a static values...i.e keyword "data uploaded" is common in all the messages and I am concerned of dynamic values before that keyword.
Cannot give sample code because message boxes of various applications often are different. To create QM code to get text from a message box or other window that does not support Ctrl+C to copy to the clipboard, use one of dialogs from the floating toolbar menu 'Windows, controls'.
When you already have text, the best way to extract numbers etc is regular expressions. QM uses similar regular expressions like most other languages. Google...
Thanks Gintras for your support.. ..like to highlight few things so that you can understand my requirement..
Day1:- "500 data uploaded.." ---------> This message actually appears in my message box (After I upload a file to my application) and this message changes on daily basis (As per the data in file). I am looking for a solution where in I can capture this message from message box and then split the contents of message as per my requirement.