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!

Trying to understand Hotspot and Search

Status
Not open for further replies.

ResumeContact

Programmer
Feb 1, 2008
2
US
Here is what I'm trying to do... from a mainframe Extra window

(I have created a hotspot to execute a macro.)
1.) on(doubleclick of hotspot) I would like to capture the next(right) eight characters after the Hotspot excluding spaces, Then copy those characters to the clipboard.
(I don't have code for the HotSpot click, is this even possible ?)

2.) use the sendkeys command to envoke the <View> panel then search for the string "Data Set name . . . " . When found delete everything on that row from the end of the string.
(after SendKey(<View>) and the screen changes do I need to get the screen again before the Search?)

3.) Use the putstring to place a string begining in the same position where the data was deleted.

4.) use the MyArea.paste to place the value of the clipboard(8 bytes) on the same row begining in column 54.



 
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 = 1000 ' milliseconds


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

' Get the necessary Session Object
Dim Sess0 As Object
Dim MyArea 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 Should contain the on click Hotspot to get the next(Right) 8 characters excluding spaces.

'This is where I begin the "view" panel and start the search for the value "Data Set Name . . . "
Sess0.Screen.Sendkeys("view <Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

Set MyArea = Sess0.Screen.Search("Data Set Name . . . ")
Sess0.Screen.MoveTo MyArea.Bottom, MyArea.Right + 1
Set MyArea = Sess0.Screen.Area(Sess0.Screen.Row,Sess0.Screen.Col,,)
MyArea.Select
MyArea.Delete
Sess0.Screen.PutString "'This.Filname( )'",Sess0.Screen.Row,Sess0.Screen.Col
Set MyArea = Sess0.Screen.Area(Sess0.Screen.Row,47,Sess0.Screen.Row,54,,8)
MyArea.Paste
Sess0.Screen.Sendkeys("<Enter>")
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

System.TimeoutValue = OldSystemTimeout
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top