09-03-2013, 02:49 PM
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:
But - I want the RTF format of the text. If I try
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
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 Big Grin](https://www.libreautomate.com/forum/images/smilies/biggrin.png)
Thanks!
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:
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
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
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 Big Grin](https://www.libreautomate.com/forum/images/smilies/biggrin.png)
Thanks!