Skip,
I was able to fix the For, next issue, but I'm still missing something. My variables are not working, they are returning the same values, and are not capturing the values for all the pages in the statements.
I left the old code so you could see my changes and hopefully my logic with that I am trying to do. Thanks Skip!
James
I was able to fix the For, next issue, but I'm still missing something. My variables are not working, they are returning the same values, and are not capturing the values for all the pages in the statements.
Code:
Sess0.Screen.Sendkeys("<Reset>")
Sess0.Screen.Sendkeys("<Clear>")
Sess0.Save
Do Until Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
DoEvents
Loop
Sess0.Screen.Sendkeys("cis "& acnt$)
Sess0.Screen.Sendkeys("<Enter>")
Sess0.Screen.Sendkeys("css")
Sess0.Screen.Sendkeys("<Enter>")
Do Until Sess0.Screen.Getstring(02,52,02) <= Sess0.Screen.Getstring(02,60,02)
DoEvents
Loop
For i = 1 To 3
For rw = 5 To 19
Ret1$ = Sess0.Screen.Getstring(rw,04,04)
Ret1a$ = Sess0.Screen.Getstring(rw,26,05)
Ret1b$ = Sess0.Screen.Getstring(rw,72,08)
Sess0.Screen.Sendkeys("<Pf8>")
Ret2$ = Sess0.Screen.Getstring(rw,04,04)
Ret2a$ = Sess0.Screen.Getstring(rw,26,05)
Ret2b$ = Sess0.Screen.Getstring(rw,72,08)
WRITE #2,acnt$,Ret1$,Ret1a$,Ret1b$,Ret2$,Ret2a$,Ret2b$
Next
' Next
' Sess0.Screen.Sendkeys("<Pf8>")
' If Sess0.Screen.Getstring(02,52,02) <> Sess0.Screen.Getstring(02,60,02)+1 then
' Do Until Sess0.Screen.Getstring(02,52,02) <= Sess0.Screen.Getstring(02,60,02)
' DoEvents
' Loop
'
' For j = 1 To 3
' For rw = 5 To 19
' Ret2$ = Sess0.Screen.Getstring(rw,04,04)
' Ret2a$ = Sess0.Screen.Getstring(rw,26,05)
' Ret2b$ = Sess0.Screen.Getstring(rw,72,08)
'
' WRITE #2,acnt$,Ret2$,Ret2a$,Ret2b$
' Next
Sess0.Screen.Sendkeys("<Enter>")
' Do Until Sess0.Screen.WaitForCursor(01, 02) 'Kept as alernative in event 'Do Until' below doesn't work
Do Until Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
DoEvents
Loop
Sess0.Save
Next
XXX:
LOOP
CLOSE #1
msgbox "Your macro is complete, have a nice day."
End Sub
I left the old code so you could see my changes and hopefully my logic with that I am trying to do. Thanks Skip!
James