×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Scrape multiple lines in one go

Scrape multiple lines in one go

Scrape multiple lines in one go

(OP)
hi all,

i have a quick question which i can't find the answer to. i use excel often to scrape info from extra and its either a few strings or a single line of info.

Recently i've had to scrape multiple lines (10-15 per page) on multiple pages (up to 300). my question is, is there a way of capturing multiple lines of a page.

thanks,

something like:

Print #1, MyScreen.area(8, 1, 22, 80)' get multiple rows


this is the kind of loop i use now.

 Do
                                                                        Do Until Z > 22
                                                                  If Trim(MyScreen.area(Z, 1, Z, 80)) <> vbNullString Then Print #1, MyScreen.area(Z, 1, Z, 80)
                                                                        Z = Z + 1
                                                                        Loop
 Z = 10

                                                        KeyW "<PF2>"' next screen
                                                       
Loop Until MyScreen.area(24, 42, 24, 57) = "INQUIRY COMPLETE"


i'm hoping to speed up the capture of data, any help/advice would be great.

jazznaura

RE: Scrape multiple lines in one go



hi,

It is my preference.  I scrape the entire screen, in my case a 3270 emulation of 24 x 80.

CODE

sDate = oScrn.Area(1,1,24,80).Value
then parse each row, using the MID() function.

Furthermore, I have built a screen map table that discribes the data on each row, like

ScrNam   FIELD       FR TR CL LN TYP
AP412431 ScrName      1  1  3  8 CHAR
AP412431 ScrDesc      1  1 11 50 CHAR
AP412431 SysDte       1  1 61  8 CHAR
AP412431 SysTme       1  1 70  8 CHAR
AP412431 Page         2  2 75  4 NUM
AP412431 Part Number  3  3 17 16 CHAR
AP412431 Nomen        3  3 36 16 CHAR
AP412431 TRAVELER     7 19  3  7 CHAR
AP412431 Status       7 19 10  1 CHAR
AP412431 CNF          7 19 11  3 CHAR
AP412431 ActQty       7 19 15  5 NUM
AP412431 PC           7 19 21  2 CHAR
AP412431 LC           7 19 24  2 CHAR
AP412431 PlnINWK      7 19 27  4 NUM
AP412431 PlnCOMP      7 19 32  4 NUM
AP412431 MRP Need     7 19 37  4 NUM
AP412431 Type         7 19 43  1 CHAR
AP412431 C_OP         7 19 47  4 CHAR
AP412431 C_CC         7 19 52  3 CHAR
AP412431 C_LC         7 19 56  6 CHAR
AP412431 LstMov       7 19 63  4 NUM
AP412431 HldCds       7 19 68  5 CHAR
AP412431 QMS          7 19 74  1 CHAR
AP412431 NetGrp       7 19 76  4 CHAR
AP412431 MSG         22 22  2 78 CHAR

This table descrie everything I need to properly parse my sData string and assign the value to the proper data type.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Scrape multiple lines in one go

(OP)
thanks skip for the reply,
i'll give this a go tomorrow, can I ask do you use this method because you found it to be the most efficient ? speed wise.
I also like the idea of the screen map, would be useful when coming back to a project to build  addons.
 

RE: Scrape multiple lines in one go




I have ONE routine for scraping any screen, not one routine for each screen.

I can set up the data in a matter of a few minutes and be ready to roll.  THAT is what is fast.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Scrape multiple lines in one go

(OP)
ok thanks again for your advice.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close