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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

screen picksup both 1

Status
Not open for further replies.

mathangisankar

Technical User
Feb 17, 2008
7
could anybody help m the below code
1. the text report gives
kmc - no records found
and then whatever in6 to 21 it also displayed
even it is blank records in 6 to 21 it gives more spaces in text document
i knwo the logic has problem in teh below code
actually iam trying to do after enter if it is no recodes in 24,8,17 it prints no records founds if it is anythign there in 6 to 21 it shows only that record. could you help me
thanks in advance.

Label_kmc:
MyScreen.SENDKEYS("<Home><BackTab>kmc<Enter>")
PAUSE 2
IF InStr(1,UCASE(Myscreen.GETSTRING(24,8,17)),"NO RECORD/S FOUND") THEN
PRINT #1, "kmc"
Print #1, "NO RECORDS FOUND" +Chr$(13) + Chr$(10)+"";
END IF
MyScreen.SENDKEYS("<Enter>")
MyScreen.SENDKEYS("<Enter>")
MyScreen.SENDKEYS("<Home>GD<Tab>*<EraseEOF><Tab>ukmut<Enter>")
MyScreen.WAITFORSTRING("JOURNALS")

For i = 6 to 21
Print #1, MyScreen.Area(i,2,i,79);
PRINT #1, ""+Chr$(13) + Chr$(10)+"";
Next

if InStr(1,UCASE(Myscreen.GETSTRING(22,2,5,)),"A205W") THEN
GOTO LABEL_mtk
End If
 



Hi,

Test for the presence of text...
Code:
if trim(MyScreen.Area(i,2,i,79)) <> "" then
  Print #1, MyScreen.Area(i,2,i,79);
  PRINT #1, ""+Chr$(13) + Chr$(10)+"";
end if


Skip,

[glasses]Did you hear what happened when the OO programmer lost his library?...
He's now living in OBJECT poverty![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top