Hi, yes exactly - use codeunit 5763 instead, if you want to bypass the manual input. Also notice that on record 7321 there is a function that looks like it turns off Dialogs. So you can try with something like this (not tested here):
OnRun()
WarehouseShipmentLine.SetHideValidationDialog(TRUE);
WhsePostShipment.SetPostingSettings(TRUE);
WhsePostShipment.RUN(WarehouseShipmentLine);
variables:
Name DataType Subtype Length
WarehouseShipmentLine Record Warehouse Shipment Line
WhsePostShipment Codeunit Whse.-Post Shipment
this kind of simulates the code from codeunit 5764, but instead of asking user if they want to Invoice, you make that choice in your own code. I hope this gets you one step further,