Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use screen text capture?
#1
Hi, I'd like to know how to export the captured text if I want to copy it into an excel file?

Code:
Copy      Help
int w=win("Mozilla Firefox" "MozillaWindowClass")
RECT r; SetRect &r 24 326 184 357
WindowText wt.Init(w r)
wt.Capture


out
for _i 0 wt.n
    WTI& t=wt.a[_i]
    out t.txt
#2
Cannot get text from Firefox and other web browsers. Instead use accessible object functions.
#3
ok thank you and if I want to use it on files/programs/softwares and extract data from there? the data shows in my QM but I`d like to copy the data on a single excel or word document file for each data extracted, which code should I use for that? thank you in advance.


Code:
Copy      Help
int w=win("filenamegoeshere")
RECT r; SetRect &r 752 10 828 33
WindowText wt.Init(w r)
str s=wt.CaptureToString
out s
0.01
w=win("filenamegoeshere")
SetRect &r 113 88 544 110
wt.Init(w r)
str s1=wt.CaptureToString
out s1
#4
For example, the macro gets text from a file folder window in Details view. And then need to write it to Excel sheet in the same order, ie multiple rows?

The wt.a array has just 1 dimension, but elements have coordinates of each text item. Need to create algorithm to transform the 1-dim array into 2-dim array (table). Not an easy task for me.


Forum Jump:


Users browsing this thread: 1 Guest(s)