'Created By: Xavier Arias
'Date Created: AUGUST 24, 2018
'Date Revised: AUGUST 28, 2018
'Title: B_IBIC_SPLIT_Loop
Sub B_IBIC_SPLIT_Loop()
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
Dim myUser2 As String
myUser = Environ("username")
Dim MyFile As String
MyFile = "C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\WorkFile.csv"
'MyFile = "C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\Batch_Manipulator_File.txt"
Open MyFile For Input As #1 ' Open file for input.
Do While Not EOF(1) ' Loop until end of file.
Dim ContractVar As String
Dim MEMO As String
Dim TRANS As String
Input #1, ContractVar, TRANS, DateRcv, Amount, MEMO ' Read data into two variables.
'Format Contract
LESSOR = Mid(ContractVar, 1, 3)
CONTRACT = Mid(ContractVar, 5, 7)
SCHEDULE = Mid(ContractVar, 13, 3)
'Format
LESSOR = Format(LESSOR, String(3, "0"))
CONTRACT = Format(CONTRACT, String(7, "0"))
SCHEDULE = Format(SCHEDULE, String(3, "0"))
TRANS_LETTER = Right(TRANS, 1)
If (Not IsNumeric(TRANS_LETTER)) Then
Select Case TRANS_LETTER
'CASE S------------------------------------------------------------------------------------------------------------
Case Is = "S"
For x = 1 To 5
osCurrentScreen.SendKeys "/"
osCurrentScreen.SendControlKey ControlKeyCode_Enter
Next x
For x = 1 To 10
osCurrentScreen.SendControlKey ControlKeyCode_Enter
Next x
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "5"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "2828"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "0"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "USD"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "5"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(LESSOR) ' Lessor
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
Call osCurrentScreen.SendKeys(CONTRACT) ' Contract
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendKeys "."
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
Call osCurrentScreen.SendKeys(SCHEDULE) ' SCHEDULE
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "6"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
TRANS_LENGHT = Len(TRANS)
TRANS_S = Left(TRANS, TRANS_LENGHT - 1)
Call osCurrentScreen.SendKeys(TRANS_S) ' TRANS NUMBER
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
'[4306] The requested information does not exist.
If Line24 Like "*4306*" Then
osCurrentScreen.SendKeys "/"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "D"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Open "C:\Users\" & myUser & "\Documents\Reports\Batch\IBIC_Batch.txt" For Append As #2 ' Open file for output.
Write #2, "Contract: " & ContractVar & " |TRANS: " & TRANS & " |Date Received: " & DateRcv & " |Amount: " & Amount & " |MEMO: " & MEMO & "[4306] The requested information does not exist." & vbLf ' "/n" ' Write comma-delimited data.
Close #2
GoTo EndOfProcess
End If
'[3789] This unapplied suspense transaction has already been reversed <return>
If Line24 Like "*3789*" Then
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "/"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "D"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Open "C:\Users\" & myUser & "\Documents\Reports\Batch\IBIC_Batch.txt" For Append As #2 ' Open file for output.
Write #2, "Contract: " & ContractVar & " |TRANS: " & TRANS & " |Date Received: " & DateRcv & " |Amount: " & Amount & " |MEMO: " & MEMO & "[3789] This unapplied suspense transaction has already been reversed." & vbLf ' "/n" ' Write comma-delimited data.
Close #2
GoTo EndOfProcess
End If
osCurrentScreen.SendKeys "Y"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
Call osCurrentScreen.SendKeys(Amount) ' Amount on WorkFile.csv
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(MEMO) ' MEMO
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
UnappliedAmt = Trim(Mid(Line7, 63, 16))
UnappliedAmt = Replace(UnappliedAmt, ",", "")
If UnappliedAmt = "0.00" Then
'For x = 1 To 3
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
GoTo EndOfProcess
Else
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "A"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(UnappliedAmt) ' UnappliedAmt
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
For x = 1 To 3
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
GoTo EndOfProcess
End If
'CASE A------------------------------------------------------------------------------------------------------------
Case Is = "A"
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(LESSOR) ' Lessor
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
Call osCurrentScreen.SendKeys(CONTRACT) ' Contract
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendKeys "."
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
Call osCurrentScreen.SendKeys(SCHEDULE) ' SCHEDULE
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
'[4306] The requested information does not exist.
If Line24 Like "*4306*" Then
osCurrentScreen.SendKeys "/"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "D"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Open "C:\Users\" & myUser & "\Documents\Reports\Batch\IBIC_Batch.txt" For Append As #2 ' Open file for output.
Write #2, "Contract: " & ContractVar & " |TRANS: " & TRANS & " |Date Received: " & DateRcv & " |Amount: " & Amount & " |MEMO: " & MEMO & "[4306] The requested information does not exist." & vbLf ' "/n" ' Write comma-delimited data.
Close #2
GoTo EndOfProcess
End If
'[3789] This unapplied suspense transaction has already been reversed <return>
If Line24 Like "*3789*" Then
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "/"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "D"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Open "C:\Users\" & myUser & "\Documents\Reports\Batch\IBIC_Batch.txt" For Append As #2 ' Open file for output.
Write #2, "Contract: " & ContractVar & " |TRANS: " & TRANS & " |Date Received: " & DateRcv & " |Amount: " & Amount & " |MEMO: " & MEMO & "[3789] This unapplied suspense transaction has already been reversed." & vbLf ' "/n" ' Write comma-delimited data.
Close #2
GoTo EndOfProcess
End If
'All Assets are disposed or inventoried. <return>
If Line24 Like "*All*Assets*are*disposed*or*inventoried*" Then
MsgBox "All Assets are disposed or Inventoried. Process will stop."
Exit Sub
End If
Call osCurrentScreen.SendKeys(Amount) ' Amount on WorkFile.csv
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
AmountReceived = Trim(Mid(Line4, 16, 17))
AmountReceived = Replace(AmountReceived, ",", "")
CustRef1 = Trim(Mid(Line8, 64, 11))
CustRef2 = Trim(Mid(Line9, 64, 11))
CustRef3 = Trim(Mid(Line10, 64, 11))
CustRef4 = Trim(Mid(Line11, 64, 11))
CustRef5 = Trim(Mid(Line12, 64, 11))
CustRef6 = Trim(Mid(Line13, 64, 11))
CustRef7 = Trim(Mid(Line14, 64, 11))
CustRef8 = Trim(Mid(Line15, 64, 11))
CustRef9 = Trim(Mid(Line16, 64, 11))
CustRef10 = Trim(Mid(Line17, 64, 11))
CustRef11 = Trim(Mid(Line18, 64, 11))
CustRef12 = Trim(Mid(Line19, 64, 11))
If CustRef2 = "________" Then
Call osCurrentScreen.SendKeys(CustRef1)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef3 = "________" Then
Call osCurrentScreen.SendKeys(CustRef2)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef4 = "________" Then
Call osCurrentScreen.SendKeys(CustRef3)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef5 = "________" Then
Call osCurrentScreen.SendKeys(CustRef4)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef6 = "________" Then
Call osCurrentScreen.SendKeys(CustRef5)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef7 = "________" Then
Call osCurrentScreen.SendKeys(CustRef6)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef8 = "________" Then
Call osCurrentScreen.SendKeys(CustRef7)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef9 = "________" Then
Call osCurrentScreen.SendKeys(CustRef8)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef10 = "________" Then
Call osCurrentScreen.SendKeys(CustRef9)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef11 = "________" Then
Call osCurrentScreen.SendKeys(CustRef10)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef12 = "________" Then
Call osCurrentScreen.SendKeys(CustRef11)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(MEMO) ' MEMO
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
UnappliedAmt = Trim(Mid(Line7, 63, 16))
UnappliedAmt = Replace(UnappliedAmt, ",", "")
If UnappliedAmt = "0.00" Then
'For x = 1 To 3
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
GoTo EndOfProcess
Else
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "A"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(UnappliedAmt) ' UnappliedAmt
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
For x = 1 To 3
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
GoTo EndOfProcess
'CASE C------------------------------------------------------------------------------------------------------------
Case Is = "C"
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(LESSOR) ' Lessor
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
Call osCurrentScreen.SendKeys(CONTRACT) ' Contract
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendKeys "."
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
Call osCurrentScreen.SendKeys(SCHEDULE) ' SCHEDULE
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
'[4306] The requested information does not exist.
If Line24 Like "*4306*" Then
osCurrentScreen.SendKeys "/"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "D"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Open "C:\Users\" & myUser & "\Documents\Reports\Batch\IBIC_Batch.txt" For Append As #2 ' Open file for output.
Write #2, "Contract: " & ContractVar & " |TRANS: " & TRANS & " |Date Received: " & DateRcv & " |Amount: " & Amount & " |MEMO: " & MEMO & "[4306] The requested information does not exist." & vbLf ' "/n" ' Write comma-delimited data.
Close #2
GoTo EndOfProcess
End If
'[3789] This unapplied suspense transaction has already been reversed <return>
If Line24 Like "*3789*" Then
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "/"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "D"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Open "C:\Users\" & myUser & "\Documents\Reports\Batch\IBIC_Batch.txt" For Append As #2 ' Open file for output.
Write #2, "Contract: " & ContractVar & " |TRANS: " & TRANS & " |Date Received: " & DateRcv & " |Amount: " & Amount & " |MEMO: " & MEMO & "[3789] This unapplied suspense transaction has already been reversed." & vbLf ' "/n" ' Write comma-delimited data.
Close #2
GoTo EndOfProcess
End If
'All Assets are disposed or inventoried. <return>
If Line24 Like "*All*Assets*are*disposed*or*inventoried*" Then
MsgBox "All Assets are disposed or Inventoried. Process will stop."
Exit Sub
End If
Call osCurrentScreen.SendKeys(Amount) ' Amount on WorkFile.csv
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
AmountReceived = Trim(Mid(Line4, 16, 17))
AmountReceived = Replace(AmountReceived, ",", "")
CustRef1 = Trim(Mid(Line8, 64, 11))
CustRef2 = Trim(Mid(Line9, 64, 11))
CustRef3 = Trim(Mid(Line10, 64, 11))
CustRef4 = Trim(Mid(Line11, 64, 11))
CustRef5 = Trim(Mid(Line12, 64, 11))
CustRef6 = Trim(Mid(Line13, 64, 11))
CustRef7 = Trim(Mid(Line14, 64, 11))
CustRef8 = Trim(Mid(Line15, 64, 11))
CustRef9 = Trim(Mid(Line16, 64, 11))
CustRef10 = Trim(Mid(Line17, 64, 11))
CustRef11 = Trim(Mid(Line18, 64, 11))
CustRef12 = Trim(Mid(Line19, 64, 11))
If CustRef2 = "________" Then
Call osCurrentScreen.SendKeys(CustRef1)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef3 = "________" Then
Call osCurrentScreen.SendKeys(CustRef2)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef4 = "________" Then
Call osCurrentScreen.SendKeys(CustRef3)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef5 = "________" Then
Call osCurrentScreen.SendKeys(CustRef4)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef6 = "________" Then
Call osCurrentScreen.SendKeys(CustRef5)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef7 = "________" Then
Call osCurrentScreen.SendKeys(CustRef6)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef8 = "________" Then
Call osCurrentScreen.SendKeys(CustRef7)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef9 = "________" Then
Call osCurrentScreen.SendKeys(CustRef8)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef10 = "________" Then
Call osCurrentScreen.SendKeys(CustRef9)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef11 = "________" Then
Call osCurrentScreen.SendKeys(CustRef10)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef12 = "________" Then
Call osCurrentScreen.SendKeys(CustRef11)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(MEMO) ' MEMO
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
UnappliedAmt = Trim(Mid(Line7, 63, 16))
UnappliedAmt = Replace(UnappliedAmt, ",", "")
If UnappliedAmt = "0.00" Then
'For x = 1 To 3
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
GoTo EndOfProcess_Case_C
Else
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "A"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(UnappliedAmt) ' UnappliedAmt
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
For x = 1 To 3
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
EndOfProcess_Case_C:
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(AmountReceived)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
BatchTotal = Trim(Mid(Line5, 21, 16))
BatchTotal = Replace(BatchTotal, ",", "")
PymtsEntered = Trim(Mid(Line6, 21, 16))
PymtsEntered = Replace(PymtsEntered, ",", "")
If BatchTotal <> PymtsEntered Then
MsgBox "The Batch Total and Pymts Entered Do not match. Stopping Process"
Exit Sub
End If
osCurrentScreen.SendKeys "13"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "H"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(100)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(60)
osCurrentScreen.SendKeys "U"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "S"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "2828"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "Y"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
GoTo EndOfProcess
'CASE U------------------------------------------------------------------------------------------------------------
Case Is = "U"
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(LESSOR) ' Lessor
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
Call osCurrentScreen.SendKeys(CONTRACT) ' Contract
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendKeys "."
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
Call osCurrentScreen.SendKeys(SCHEDULE) ' SCHEDULE
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
'[4306] The requested information does not exist.
If Line24 Like "*4306*" Then
osCurrentScreen.SendKeys "/"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "D"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Open "C:\Users\" & myUser & "\Documents\Reports\Batch\IBIC_Batch.txt" For Append As #2 ' Open file for output.
Write #2, "Contract: " & ContractVar & " |TRANS: " & TRANS & " |Date Received: " & DateRcv & " |Amount: " & Amount & " |MEMO: " & MEMO & "[4306] The requested information does not exist." & vbLf ' "/n" ' Write comma-delimited data.
Close #2
GoTo EndOfProcess
End If
'[3789] This unapplied suspense transaction has already been reversed <return>
If Line24 Like "*3789*" Then
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "/"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "D"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Open "C:\Users\" & myUser & "\Documents\Reports\Batch\IBIC_Batch.txt" For Append As #2 ' Open file for output.
Write #2, "Contract: " & ContractVar & " |TRANS: " & TRANS & " |Date Received: " & DateRcv & " |Amount: " & Amount & " |MEMO: " & MEMO & "[3789] This unapplied suspense transaction has already been reversed." & vbLf ' "/n" ' Write comma-delimited data.
Close #2
GoTo EndOfProcess
End If
'All Assets are disposed or inventoried. <return>
If Line24 Like "*All*Assets*are*disposed*or*inventoried*" Then
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
Call osCurrentScreen.SendKeys(Amount) ' Amount on WorkFile.csv
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
AmountReceived = Trim(Mid(Line4, 16, 17))
AmountReceived = Replace(AmountReceived, ",", "")
CustRef1 = Trim(Mid(Line8, 64, 11))
CustRef2 = Trim(Mid(Line9, 64, 11))
CustRef3 = Trim(Mid(Line10, 64, 11))
CustRef4 = Trim(Mid(Line11, 64, 11))
CustRef5 = Trim(Mid(Line12, 64, 11))
CustRef6 = Trim(Mid(Line13, 64, 11))
CustRef7 = Trim(Mid(Line14, 64, 11))
CustRef8 = Trim(Mid(Line15, 64, 11))
CustRef9 = Trim(Mid(Line16, 64, 11))
CustRef10 = Trim(Mid(Line17, 64, 11))
CustRef11 = Trim(Mid(Line18, 64, 11))
CustRef12 = Trim(Mid(Line19, 64, 11))
If CustRef2 = "________" Then
Call osCurrentScreen.SendKeys(CustRef1)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef3 = "________" Then
Call osCurrentScreen.SendKeys(CustRef2)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef4 = "________" Then
Call osCurrentScreen.SendKeys(CustRef3)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef5 = "________" Then
Call osCurrentScreen.SendKeys(CustRef4)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef6 = "________" Then
Call osCurrentScreen.SendKeys(CustRef5)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef7 = "________" Then
Call osCurrentScreen.SendKeys(CustRef6)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef8 = "________" Then
Call osCurrentScreen.SendKeys(CustRef7)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef9 = "________" Then
Call osCurrentScreen.SendKeys(CustRef8)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef10 = "________" Then
Call osCurrentScreen.SendKeys(CustRef9)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef11 = "________" Then
Call osCurrentScreen.SendKeys(CustRef10)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
If CustRef12 = "________" Then
Call osCurrentScreen.SendKeys(CustRef11)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
End If
osCurrentScreen.SendKeys "14"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "46" '02) Reason Code. 46 IBIC EXC PROCEED
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(MEMO) ' MEMO
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "3"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(MEMO) ' MEMO
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
For x = 1 To 3
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(AmountReceived)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
BatchTotal = Trim(Mid(Line5, 21, 16))
BatchTotal = Replace(BatchTotal, ",", "")
PymtsEntered = Trim(Mid(Line6, 21, 16))
PymtsEntered = Replace(PymtsEntered, ",", "")
If BatchTotal <> PymtsEntered Then
MsgBox "The Batch Total and Pymts Entered Do not match. Stopping Process"
Exit Sub
End If
osCurrentScreen.SendKeys "13"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "H"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(100)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(60)
osCurrentScreen.SendKeys "U"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "Y"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "S"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "2828"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "Y"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
GoTo EndOfProcess
End Select
End If
'ONE BATCH ON TRANS------------------------------------------------------------------------------------------------
'Variables*******************************************
WaitTime = 50
Description = "PERSONAL PROPE"
Description2 = "PROPERTY TAX R"
'Variables*******************************************
For x = 1 To 5
osCurrentScreen.SendKeys "/"
osCurrentScreen.SendControlKey ControlKeyCode_Enter
Next x
For x = 1 To 10
osCurrentScreen.SendControlKey ControlKeyCode_Enter
Next x
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "5"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "2828"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "0"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "USD"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "5"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(LESSOR) ' Lessor
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
Call osCurrentScreen.SendKeys(CONTRACT) ' Contract
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendKeys "."
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
Call osCurrentScreen.SendKeys(SCHEDULE) ' SCHEDULE
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "6"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(TRANS) ' TRANS NUMBER
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
'[4306] The requested information does not exist.
If Line24 Like "*4306*" Then
osCurrentScreen.SendKeys "/"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "D"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Open "C:\Users\" & myUser & "\Documents\Reports\Batch\IBIC_Batch.txt" For Append As #2 ' Open file for output.
Write #2, "Contract: " & ContractVar & " |TRANS: " & TRANS & " |Date Received: " & DateRcv & " |Amount: " & Amount & " |MEMO: " & MEMO & "[4306] The requested information does not exist." & vbLf ' "/n" ' Write comma-delimited data.
Close #2
GoTo EndOfProcess
End If
'[3789] This unapplied suspense transaction has already been reversed <return>
If Line24 Like "*3789*" Then
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "/"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "D"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Open "C:\Users\" & myUser & "\Documents\Reports\Batch\IBIC_Batch.txt" For Append As #2 ' Open file for output.
Write #2, "Contract: " & ContractVar & " |TRANS: " & TRANS & " |Date Received: " & DateRcv & " |Amount: " & Amount & " |MEMO: " & MEMO & "[3789] This unapplied suspense transaction has already been reversed." & vbLf ' "/n" ' Write comma-delimited data.
Close #2
GoTo EndOfProcess
End If
osCurrentScreen.SendKeys "Y"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
Call osCurrentScreen.SendKeys(Amount) ' Amount on WorkFile.csv
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(MEMO) ' MEMO
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call GrabScreen
returnValue = osCurrentScreen.WaitForHostSettle(300)
returnValue = osCurrentScreen.WaitForHostSettle(20)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
'Const ForReading = 1, ForWriting = 2, ForAppending = 3
'Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'Dim fs, f, ts, Line1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\Users\" & myUser & "\Documents\AHK\Batch_Manipulator\GrabScreenFile.txt")
Set ts = f.OpenAsTextStream(ForReading, TristateUseDefault)
Line1 = ts.ReadLine ' First Line on File
Line2 = ts.ReadLine ' Second Line on File
Line3 = ts.ReadLine ' Third Line on File
Line4 = ts.ReadLine ' Fourth Line on File
Line5 = ts.ReadLine ' Fifth Line on File
Line6 = ts.ReadLine ' Sixth Line on File
Line7 = ts.ReadLine ' Seventh Line on File
Line8 = ts.ReadLine ' Eight Line on File
Line9 = ts.ReadLine ' Nineth Line on File
Line10 = ts.ReadLine ' Tenth Line on File
Line11 = ts.ReadLine ' Eleventh Line on File
Line12 = ts.ReadLine ' Twelveth Line on File
Line13 = ts.ReadLine ' Thirteenth Line on File
Line14 = ts.ReadLine ' Fourteenth Line on File
Line15 = ts.ReadLine ' Fifteenth Line on File
Line16 = ts.ReadLine ' Sixteenth Line on File
Line17 = ts.ReadLine ' Seventeenth Line on File
Line18 = ts.ReadLine ' Eighteenth Line on File
Line19 = ts.ReadLine ' Nineteenth Line on File
Line20 = ts.ReadLine ' Twentyth Line on File
Line21 = ts.ReadLine ' Twenty-First Line on File
Line22 = ts.ReadLine ' Twentyth Line on File
Line23 = ts.ReadLine ' Twenty-First Line on File
Line24 = ts.ReadLine ' Twentyth Line on File
ts.Close
returnValue = osCurrentScreen.WaitForHostSettle(5)
UnappliedAmt = Trim(Mid(Line7, 63, 16))
UnappliedAmt = Replace(UnappliedAmt, ",", "")
If UnappliedAmt = "0.00" Then
GoTo ContinueProcess
Else
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "A"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(UnappliedAmt) ' UnappliedAmt
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
End If
ContinueProcess:
For x = 1 To 5
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Call osCurrentScreen.SendKeys(Amount) ' AMOUNT
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "13"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "H"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(100)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(60)
osCurrentScreen.SendKeys "U"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "2"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "S"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "1"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "2828"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
For x = 1 To 2
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Next x
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
osCurrentScreen.SendKeys "Y"
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
osCurrentScreen.SendControlKey ControlKeyCode_Enter
returnValue = osCurrentScreen.WaitForHostSettle(WaitTime)
returnValue = osCurrentScreen.WaitForHostSettle(5)
EndOfProcess:
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
returnValue = osCurrentScreen.WaitForHostSettle(5)
Loop
MsgBox "IBIC Batch Process Completed"
Close #1 ' Close file.
End Sub