REFLECTION® STANDARD SUITE 2011 R2
Sub BATCH_BUILDER_NETGL4886()
'No Button in Ribbon
Dim hostSettleTimeout As Integer
Dim hostSettleTime As Integer
Dim osCurrentScreen As Screen
Dim osCurrentTerminal As Terminal
Dim returnValue As Integer
Dim hiddenTextEntry As String
hostSettleTimeout = 5000
hostSettleTime = 300
Set osCurrentTerminal = ThisFrame.SelectedView.control
Set osCurrentScreen = osCurrentTerminal.Screen
' ******** This is for NETGL4886. Starts at Batch Payment Entry to input contract #.*************************
' Reading File from C:\Users\MyName\Documents\AHK\Batch_Manipulator\Batch_Manipulator_File.txt
Dim MyString1, MyString2, MyString3, MyString4, MyString5, MyString6, MyString7, MyString8, MyString9, MyString10, MyString11
Dim MyFile As String
MyFile = "C:\Users\MyName\Documents\AHK\Batch_Manipulator\Batch_Manipulator_File.txt"
Open MyFile For Input As #1 ' Open file for input.
Input #1, MyString1, MyString2, MyString3, MyString4, MyString5, MyString6, MyString7, MyString8, MyString9, MyString10, MyString11 ' Read data into two variables.
osCurrentScreen.SendKeys "5"
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
osCurrentScreen.SendKeys "0"
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString10) ' String 1 **********
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendKeys "."
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString5) ' String 2 ********
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendKeys ".0"
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString6) ' String 3 ********
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendKeys ".0000"
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString7) ' String 4 ********
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendKeys ".0"
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString8) ' String 5 ********
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendKeys ".00"
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString9) ' String 6 ********
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendKeys "2"
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString11) ' Amount
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString4) ' Asset Number ******
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString1) ' Contract Number
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendKeys "-"
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString2) ' Contract Number
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendKeys "-"
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Call osCurrentScreen.SendKeys(MyString3) ' Contract Number
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
osCurrentScreen.SendControlKey ControlKeyCode_Enter 'Stop Point
'Wait for host to 'be quiet' before continuing
returnValue = osCurrentScreen.WaitForHostSettle(50)
Close #1 ' Close file.
'***********Deletes 1st Line of Text File*************************
Dim iFile As Integer
Dim sData As String
iFile = FreeFile
Open "C:\Users\MyName\Documents\AHK\Batch_Manipulator\Batch_Manipulator_File.txt" For Binary Access Read As iFile
sData = Space(LOF(iFile))
Get #iFile, , sData
Close iFile
sData = Mid(sData, InStr(sData, vbCrLf) + 2)
Kill "C:\Users\MyName\Documents\AHK\Batch_Manipulator\Batch_Manipulator_File.txt"
iFile = FreeFile
Open "C:\Users\MyName\Documents\AHK\Batch_Manipulator\Batch_Manipulator_File.txt" For Binary Access Write As iFile
Put #iFile, , sData
Close iFile
End Sub