Here's some old code (~2014) for Transaction Entry (you'd need to fill the batch # into strTEBatch and accounting date into strAcctDate)
Set oTransRegister = oScript.NewObject(""IM_TransactionRegister_upd"", oSession)
''Check for Batch Enabled
If CBool(oTransRegister.nBatchEnabled) Then
r = oTransRegister.nSelectBatch(strTEBatch)
If r = 0 Then ErrorHandling(""Selecting Batch "" & strTEBatch)
End If
r = oTransRegister.nSetPostingDate(strAcctDate) ' to post to correct GL period - may want to check LastErrorMsg if retVal
r = oTransRegister.nProcessReport(""DEFERRED"") ' could be ""PREVIEW"" or ""PRINT"" for hard copy, use .SelectPrinter(strPrinter)
r = oTransRegister.nUpdateInit()
r = oTransRegister.nUpdateMain()
oTransRegister.DropObject()
Set oTransRegister = Nothing