Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Streaming RichEdit Control Data
#10
Hi - this is perhaps more of a Windows question than QM one.

I can run the GetRTF example without a problem but I'm having trouble running it on an accessible object. I suspect the problem is that I don't understand the runtime hierarchy of objects in Windows.

The following code works fine:
Code:
Copy      Help
int w1=win("Nuance PowerScribe 360" "WindowsForms10.Window.8.app.0.3ce0bb8_r13_ad1")
Acc a.Find(w1 "TEXT" "" "class=WindowsForms10.RICHEDIT50W.app.0.3ce0bb8_r13_ad1")
int controlID = child(a)

str report
report.getwintext(controlID)
out F"report  is {report}"

But - I want the RTF format of the text. If I try
Code:
Copy      Help
str rtfReport
GetRTF(controlID rtfReport)
the application that I'm retrieving data from crashes.

I'm assuming that it's possible to get the RTF because the class of the object is RICHEDIT50W. I tried passing
Code:
Copy      Help
id(w1 controlID)
but this returns 0 so I don't understand what the scope of the id is. Any suggestions welcomed (including RTFM - but it would be helpful if you pointed me at the URL or give me a phrase I can google so that I can solve this). I believe that my basic problem is that I'm not getting the appropriate window handle from the ID returned by the child() function but even that could be wrong Big Grin

Thanks!


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)