|
-
Jul 11th, 2012, 10:13 AM
#1
Thread Starter
Addicted Member
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
[
-
Jul 16th, 2012, 11:39 AM
#2
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?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Jul 16th, 2012, 05:36 PM
#3
Thread Starter
Addicted Member
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
-
Jul 16th, 2012, 07:47 PM
#4
Re: capture a word from the screen
Are you doing this from VBA or VB6?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Jul 16th, 2012, 09:34 PM
#5
Thread Starter
Addicted Member
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
Last edited by kamakshi; Jul 16th, 2012 at 09:39 PM.
-
Jul 16th, 2012, 09:46 PM
#6
Re: capture a word from the screen
Ah! I am sorry I am not familiar with ebm attachmate extra macro
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|