Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grab everything

Status
Not open for further replies.

limeg95

Programmer
Oct 22, 2009
124
0
0
CA
Skip
thanks in advance
i have code grab everything on screen till end of report
but my code grab <<<< this too
coudl you help me
thanks
her eis the code
------------------



*** END of report ****

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

here is the code

For i = 9 To 26

Print #1, MyScreen.Area(i,28,i,91).value


Next i
 


I do not know what your question is.

BTW, when I scrape a screen, I do grab everything...
Code:
dim sDetail as string

sDetail = oScrn.Area(1,1,24,80)
Then I process 80 characters at a time, which is 1 row at a time, according to my screen spec table, like this...
[tt]
ScrNam FR TR CL LN TYP FIELD
SF412431 1 1 3 8 CHAR ScrName
SF412431 1 1 11 50 CHAR ScrDesc
SF412431 1 1 61 8 CHAR SysDte
SF412431 1 1 70 8 CHAR SysTme
SF412431 2 2 75 4 NUM Page
SF412431 3 3 17 16 CHAR Part Number
SF412431 3 3 36 16 CHAR Nomen
SF412431 7 19 3 7 CHAR TRAVELER
SF412431 7 19 10 1 CHAR Status
SF412431 7 19 11 3 CHAR CNF
SF412431 7 19 15 3 CHAR WorkSeq
SF412431 7 19 20 4 NUM ActQty
SF412431 7 19 26 2 CHAR PC
SF412431 7 19 29 2 CHAR LC
SF412431 7 19 32 4 NUM SchINWK
SF412431 7 19 32 4 NUM PlnCOMP
SF412431 7 19 38 4 NUM MRP Need
SF412431 7 19 43 1 CHAR Type
SF412431 7 19 48 4 CHAR C_OP
SF412431 7 19 53 3 CHAR C_CC
SF412431 7 19 57 6 CHAR C_LC
SF412431 7 19 64 4 NUM LstMov
SF412431 7 19 69 5 CHAR HldCds
SF412431 7 19 75 1 CHAR QMS
SF412431 7 19 77 4 CHAR NetGrp
SF412431 22 22 2 78 CHAR MSG
[/tt]


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
skip thanks
in last line it shows <<<<<<<
but i dont need <<<<<<<<
 
skip
sorry to forgot to mention
the report shows 72 pages
all pages in text document except <<<<<
each page has <<<<<
i have code like this
could you please check this code.
do
do

sDetail = MyScreen.Area(4,4,24,130)
Loop Until Myscreen.GetString("<<<<<<")


MyScreen.SendKeys ("<Enter>")
Loop Until MyScreen.GetString("***", i,55,3)

 


Where do you get a STRING as a parameter in GetString???

GetString returns a string, based on the row, column & length specified. THAT return value can then be compared to a string of the same length

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
skip
thanks i got it. could you help me but small issue i am facing
here i have everyhting i want to exclude <<<<<<< this line in first page
how do exclude
here is the code
For i = 9 To 26

Print #1, MyScreen.Area(i,28,i,91).value


Next i

'Write following pages if any
While MyScreen.Search("END OF REPORT").Value = "" 'if we see request complete it'll skip this loop
MyScreen.Sendkeys("<Pf8>") 'turn the page
' MyScreen.Screen.WaitHostQuiet(g_HostSettleTime)
Print #1, MyScreen.Area10,55,22,79,,2).Value 'write the page
Wend
 


"<<<<<<<" is not a line.

It may be in a line, but it is not a line.

It is only 7 bytes long.

Where, in your code, are your testing this string against a similar string from a line?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
skip
no i have catpures all datas in the page upto end of report
what happens <<<<< also shows in the text document

**** END OF REPORT ******
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 



Why are you not using GetString at an appropriate column and length on each row to test against your 7 byte string before you print#?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
skip
i tried this ay still it is shoing <<<<<<
could you help me adn i tried instead of <<<<<<
"END OF REPORT"
SHOWS STILL. how can i get rid of <<<<<< in text document

For i = 9 To 26

MyScreen.Search("<<<<<<")
MyRw = MyScreen.Row
if Not MyScreen.GetString(MyRw,61,73) = "<<<<<" then
Print #1, MyScreen.Area(i,28,i,91).value

end if

Next i
 


Code:
      if  Not MyScreen.GetString(MyRw,61,73) = "<<<<<"  then
Look at the HELP on GetString.

You have a LENGTH of 73, yet a compare string length of only 5!!!

Of course it fails!!!!

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
SKIP
I tried if Not MyScreen.GetString(MyRw,2,5) = "<<<<<"
STILL SHOWING
For i = 9 To 26


Set MyArea = MyScreen.Search("<<<<<")
MyScreen.MoveTo MyArea.Bottom, MyArea.Left
MyRw = MyScreen.Row
if MyScreen.GetString(MyRw,2,5) = "<<<<" then
Print #1, MyScreen.Area(i,28,i,91).value

end if

Next i



 


Code:
      if   MyScreen.GetString(MyRw,2,5) = "<<<<"  then 
         Print #1, MyScreen.Area(i,28,i,91).value
      
      end if
Look at this code VERY CAREFULLY.

I see at least 3 glaring & OBVIOUS errors in LOGIC.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
i am sorry skip
it is if Not MyScreen
its type error mistake
 
skip
sorry to bug you again. could you help me
i tried if not also
still it is showing the <<<<<< in text document
 



I see 3 LOGIC errors, not syntax errors -- YOU LOGIC....

in
Code:
      if   MyScreen.GetString(MyRw,2,5) = "<<<<"  then 
         Print #1, MyScreen.Area(i,28,i,91).value
      
      end if
Common, 'programmer'!!!

To start with look very carefully at your literal.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Oh Skip
what is wrong. spinning round
if MyScreen.GetString(MyRw,2,5) = "<<<<" then
else

Print #1, MyScreen.Area(i,28,i,91).value

end if

 
i did this way
If Not MyScreen.Search("END OF REPORT") Is Nothing Then



Print #1, MyScreen.Area(i,28,i,91).value

end if
 
skip
could you please help me
i = 4
do
Set searchcomplet = Myscreen.Search("<<<<<')
if searchcomplet = "" thne

Print #1, MyScreen.Area(i,28,i,91).value

end if
Loop until >27

 



1. The length of your literal does not match the length of the string from the screen.

2. You are looking for the 5 byte string in a different row than the string that your are print# ing.

3. You are looping and not checking for the 5 byte string as your loop index changes.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top