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!

How to change Macro 1

Status
Not open for further replies.

nodiva

MIS
Mar 26, 2004
1
US
I'm new to the attachmate macro eviroment, and would like to learn how to modify a session. I have the following macro to copy a line from my billing system, but I would like to modify it to delete that line. How would I do this?

This macro was created by the Macro Recorder.
' Date: Wednesday, December 24, 2003 09:48:46
' User: sthompson3
'--------------------------------------------------------------------------------

' Global variable declarations
Global g_HostSettleTime%
Global g_szPassword$

Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
Dim Sessions As Object
Dim System As Object
Set System = CreateObject("EXTRA.System") ' Gets the system object
If (System is Nothing) Then
Msgbox "Could not create the EXTRA System object. Stopping macro playback."
STOP
End If
Set Sessions = System.Sessions

If (Sessions is Nothing) Then
Msgbox "Could not create the Sessions collection object. Stopping macro playback."
STOP
End If
'--------------------------------------------------------------------------------
' Set the default wait timeout value
g_HostSettleTime = 3000 ' milliseconds

OldSystemTimeout& = System.TimeoutValue
If (g_HostSettleTime > OldSystemTimeout) Then
System.TimeoutValue = g_HostSettleTime
End If

' Get the necessary Session Object
Dim Sess0 As Object
Set Sess0 = System.ActiveSession
If (Sess0 is Nothing) Then
Msgbox "Could not create the Session object. Stopping macro playback."
STOP
End If
If Not Sess0.Visible Then Sess0.Visible = TRUE
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

' This section of code contains the recorded events

System.TimeoutValue = OldSystemTimeout
End Sub
 
Your question is a little unclear. The code you've posted is the default code in all recorded macros. If you'd be a little more specific it might help. You might also check my FAQ here:

I'm ready for Extra Basic... now what? faq99-4087

calculus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top