Hello, I have a little function that will clean up code moving forward.
Code:
Function SendEnterWait(Sendkey As String)
With Session
.TransmitANSI Sendkey
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcNewHostScreen, "10", "", 1, 1
End With
End Function
Now this works just fine. Its firing keys into a reflections system, hitting enter. and then waiting up to 10 seconds to confirm the new screen is loaded.
I'm wanting to expand on this, to make it look like.
Code:
Function SendEnterWait(Sendkey, SendKey2 As String)
If IsMissing(SendKey2) = True Then
Sendkey = SendKey2
End If
With Session
.TransmitANSI Sendkey
.TransmitANSI SendKey2
.TransmitTerminalKey rcIBMEnterKey
.WaitForEvent rcNewHostScreen, "10", "", 1, 1
End With
End Function
But when I try to enter the function in a module I keep getting syntax errors.
SendEnterWait("Hi","Hi2")
I'm fresh out of the box with building functions, and there might be more than one issue with my formatting. Any tips would be amazing.