capture a word from the screen
Hi
using select case capturing a word from the screen
even i find a word in the screen it goes next screen thans for helping
Code:
Select Case Search
Case Is <> "CIND/CURCODE"
MyScreen.Sendkeys("<PF8>") ' next screen
MyScreen.Moveto 2, 40
MyScreen.WaitHostQuiet (g_hostsettletime)
for i = 10 to 27
Set MyArea = MyScreen.Search("CURCODE")
MyScreen.WaitHostQuiet (g_hostsettletime)
MyScreen.Moveto MyArea.Bottom, MyArea.Left
MyRw = MyScreen.Row
MyCol = MyScreen.Col
[
Re: capture a word from the screen
kamakshi, Sendkeys reliability depends on how and where you use it. I would recommend using APIs for this. Can you give us more details on what you are trying to achieve?
Re: capture a word from the screen
HI
thanks! I am capturing the lines from the screen Attachmate
each report has 14 pages
last page shows *** END OF REPORT***
Each page if it is blank it will go next screen
keep on going to till last page
and if the page find a word "curr ind"
then check master amout and transaction amount not equlal
caputre whole thing
here is the code
Code:
MyScreen.Moveto 2, 40
NotLastPage = true
If Not MyScreen.Search("END OF REPORT") Is Nothing Then _
NotLastPage = False
Do While MyScreen.Search("END OF REPORT").Value = ""
If Not MyScreen.Search("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<") Is Nothing Then _
NotLastPage = True
If Not MyScreen.Search("END OF REPORT") Is Nothing Then _
NotLastPage = False
NotFirstPage = true
if MyScreen.Search("CIND/CURCODE NOT MATCHED") Is Nothing Then _
FirstPage = False
MyScreen.Sendkeys("<PF8>")
MyScreen.Moveto 2, 40
MyScreen.WaitHostQuiet (g_hostsettletime)
MyScreen.Putstring ("11" + " ")
MyScreen.SendKeys ("<Pf11>")
MyScreen.WaitHostQuiet (g_hostsettletime)
for i = 6 to 27
'if MyScreen.getString(i,059,082) <> "CIND/CURCODE NOT MATCHED" then
'exit for
Amtcheck1 = Trim(MyScreen.GetString(i, 102, 13))
Amtcheck = Trim(MyScreen.GetString(i, 120, 13))
if Amtcheck1 <> Amtcheck or Amtcheck <> "" and Amtcheck1 = "" then
Print #1, MyScreen.Area(06,34,06,72)
Check1 = MyScreen.GetString(08,08,08,5)
Print #1, MyScreen.Area(i, 2, i, 122)
PRINT #1, ""+Chr$(13) + Chr$(10)+"";
PRINT #1, ""+Chr$(13) + Chr$(10)+"";
pause 1
end if
next i
MyScreen.SendKeys ("<Pf8>")
NotLastPage = true
MyScreen.WaitHostQuiet (g_HostSettleTime)
Loop
Re: capture a word from the screen
Are you doing this from VBA or VB6?
Re: capture a word from the screen
Kool
thanks but i am doing in ebm attachmate extra macro! it should not capture when the page is empty with the header. and capture the page with compare one colum does not equal to another column .
but amtcheck1 and amtcheck 2 are shows .00 and .15 or .00 and .00
it does not capture the row and column
Re: capture a word from the screen
Ah! I am sorry I am not familiar with ebm attachmate extra macro :(