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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call Wait(Sess)

Status
Not open for further replies.

vzachin

Technical User
Feb 10, 2006
305
US
hi,
i sent this earlier but i don't see the post. i apologize if this becomes a duplicate post

here's my problem. i saw this coding from WinBlowsME here: but i can't get it to compile. i get an "Unknown function:Wait"
what do i need to do to correct this?
here's my code
Code:
Sub Main
Dim Sessions As Object
Dim System As Object
Set System = CreateObject("EXTRA.System")   ' Gets the system object
Set Sessions = System.Sessions
Dim Sess0 As Object
Set Sess0 = System.ActiveSession

Sess0.Screen.SendKeys("<right><enter>")
Call Wait (Sess)    'this is where it's highlighted

Private Sub Wait(Sess As Object)
   Do While Sess.Screen.OIA.Xstatus <> 0
      DoEvents
   Loop

End Sub

thanks
zach
 
With EXTRA you have to declare explicitly declare additional subs at the start of your code. I fixed a couple of other errors too.

Code:
Option Explicit

Declare Sub Wait(Sess As Object)

Sub Main
    Dim Sessions As Object
    Dim System As Object
    Dim Sess0 As Object
    
    Set System = CreateObject("EXTRA.System")   ' Gets the system object
    Set Sessions = System.Sessions
    Set Sess0 = System.ActiveSession

    Sess0.Screen.SendKeys("<right><enter>")
    Call Wait (Sess0)    'this is where it's highlighted
    'Or you can just type
    Wait Sess0

End Sub

Private Sub Wait(Sess As Object)
   Do While Sess.Screen.OIA.Xstatus <> 0
      DoEvents
   Loop

End Sub
 
hi streetprog,


thanks for the help & cleaning up my code.


zach
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top