JamesDSM50328
Technical User
I am having an issue that is effecting other HLLAPI functions. After the macro below runs the objects do not release from memory and is causing a conflict with the HLLAPI macros. I cannot figure out why the objects are not releasing. Any help on this would be geatly appreciated.
Code:
'**************************************
'------ Function declaration ------
Declare function Sleep(scrn as ExtraScreen)
'----------------------------------
Sub Main()
'******* objects ******
Dim System As ExtraSystem
Dim Sessions As ExtraSessions
Dim Sess0 As ExtraSession
Dim Scr as ExtraScreen
Set System = CreateObject("EXTRA.System") ' Gets the system object
Set Sessions = System.Sessions
Set Sess0 = System.ActiveWindow
'changed this from ActiveSession
'to ActiveWindow this will allow
'macro toexecute in the attachmate
'window that it orginated from.
Set Scr=sess0.screen
If (System is Nothing) or (sessions is nothing) or (sess0 is nothing) Then
Msgbox "Could not create the EXTRA objects. Stopping macro playback."
STOP
End If
'.... DO stuff
'get items from various screens
'
'-------------------------------------------
'unbind the objects frees them from memory
set scr=nothing
set sess0=nothing
set sessions=nothing
set system=nothing
'-------------------------------------------
Exit sub
End Sub
Function sleep(scrn as ExtraScreen)
Do While scrn.OIA.XStatus <> 0
DoEvents
Loop
End function