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!

CaptureSetup in MyExtra 7.11

Status
Not open for further replies.

KingKea

Programmer
Dec 29, 2004
11
US
Does the CaptureSetup work in EB 7.11? The file remains locked by myextra and capture does not disable. This works like as charm in KEA!420.

I have toyed with GetString but some of the data scrolls for several screens and I am having no luck with looping and sending to a file.

This is the guts of what I am working with ...

' This section of code contains the recorded events

Sess0.Screen.Sendkeys("23<Ctrl+M>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys(".<Ctrl+M>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("4<Ctrl+M>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("111 2342<Ctrl+M>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("111 2342<Ctrl+M>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys(".<Ctrl+M>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("gov")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.CaptureSetup "H:\111 2342.txt",0,1,1
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Ctrl+M>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.WaitForString("CONTINUE ")
Sess0.CaptureSetup "H:\111 2342x.txt",0,0,1
Sess0.Screen.Sendkeys("<Ctrl+M>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
System.TimeoutValue = OldSystemTimeout
Any Ideas?
 
I'm not sure what the captureSetup function does. You may just need to upgrade your code manually. There is also usually a Capture macro installed when Extra is installed. Try looking at it for ideas.

Also, check the FAQ:
I'm ready for Extra Basic... now what? faq99-4087

calculus

(other post referenced to this thread)
 
The CaptureSetup basically does the history capture but to a text file. It appears to be documented in MyExtra 7.11 but doesn't end capture even if the macro is written from scratch. The standard Capture Macro included with MyExtra uses the GetString() however since some of these scrolling reports may run for several pages I was having difficulty getting a loop to work while the screen was scrolling.
 
For screen scraping, I usually use a for loop, looping through the number of lines on the screen, using the getstring() to get each line, and write that to the file one at a time (or to an access database memo field.)

here is a bit of code that I used to scrape to a file:

Code:
  do 
    FOR y = 6 to 21 step 1
      sess0.screen.moveto y,2
      cltr = trim(sess0.screen.getstring(y, 6, 6))
      cltrDesc = trim(sess0.screen.getstring(y, 15, 25))
      if len(cltr) >0 then
        write #2, BANKNBR, CLTR, CLTRDESC
      else
        exit for
      end if
      Sess0.Screen.WaitHostQuiet(10)
    next y
    sess0.screen.sendkeys("<pf6>")
    Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
    screenname = trim(sess0.screen.getstring(23, 7, 12))
  loop until screenname = "END OF FILE."

The initial loop (the do loop) keeps looping until it reaches the last screen. the END OF FILE. shows up when you hit the f6 (which is next screen on my system) and there are no more screens.

Hope This Helps!

gcomyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top