I believe so. Any AI ship in the game accepts scripted orders:
shpOrder
shpOrderAttack
shpOrderDock
shpOrderEscort
shpOrderFollow
shpOrderGate
shpOrderGoto
shpOrderGuard
shpOrderHold
shpOrderLoot
shpOrderMine
shpOrderPatrol
shpOrderWait
If a ship is docked, get it via (sysFindObject or similar, and then change it's orders with the above menu of commands.