lease help! I'm writing my first If/Then statement within a loop and having a little trouble. When I compile the code the dreaded red bug warning pops up on the last line and I get two errors. They are:
* "Illegal Statement" If I click where "End Sub" is located
* "Unexpected end of file" If I click on the empty line below "End Sub"
Here is the code that I wrote:
* "Illegal Statement" If I click where "End Sub" is located
* "Unexpected end of file" If I click on the empty line below "End Sub"
Here is the code that I wrote:
Code:
Do Until Sess0.Screen.GetString(20, 12, 5) = " "
DoEvents
Sess0.Screen.MoveTo 11,06
Sess0.Screen.Sendkeys("D")
Sess0.Screen.MoveTo 12,06
Sess0.Screen.Sendkeys("D")
Sess0.Screen.MoveTo 13,06
Sess0.Screen.Sendkeys("D")
Sess0.Screen.MoveTo 14,06
Sess0.Screen.Sendkeys("D")
Sess0.Screen.MoveTo 15, 06
Sess0.Screen.Sendkeys("D")
Sess0.Screen.MoveTo 16,06
Sess0.Screen.Sendkeys("D")
Sess0.Screen.MoveTo 17,06.
Sess0.Screen.Sendkeys("D")
Sess0.Screen.MoveTo 18,06
Sess0.Screen.Sendkeys("D")
Sess0.Screen.MoveTo 19,06
Sess0.Screen.Sendkeys("D")
Sess0.Screen.MoveTo 20,06
Sess0.Screen.Sendkeys("D")
Sess0.Screen.Sendkeys("<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
If (Sess0.Screen.GetString(1, 35, 6) = "DELETE") Then
Do Until Sess0.Screen.GetString(1, 35, 6) = " "
Sess0.Screen.Sendkeys("<Enter>")
Sess0.Screen.Sendkeys(" ")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys("<Enter>")
Loop
System.TimeoutValue = OldSystemTimeout
End Sub