That shouldn't be too difficult. First spawn the army, then move it, then besiege. And then use the 'auto_win' command when attacking the settlement. Note that the 'label' entry is crucial here. And the spawn should not be more then 5 tiles away from the target. Example is from 1648.
Code:
monitor_event FactionTurnEnd FactionType hre
spawn_army
faction hre
character random_name, named character, label stral_attack1, age 38, x 268, y 353
unit 1648 Bodyguard exp 1 armour 0 weapon_lvl 0
unit Grenadiere exp 1 armour 0 weapon_lvl 0
unit Pikeniere exp 1 armour 0 weapon_lvl 0
unit Pikeniere exp 1 armour 0 weapon_lvl 0
unit Pikeniere exp 1 armour 0 weapon_lvl 0
unit Buergerwehr exp 1 armour 0 weapon_lvl 0
unit Buergerwehr exp 1 armour 0 weapon_lvl 0
unit Buergerwehr exp 1 armour 0 weapon_lvl 0
unit Buergerwehr exp 1 armour 0 weapon_lvl 0
end
reveal_tile 268, 353 ; lifting fog of war on that tile
add_events
event historic heathen_army ; requires supporting entry in text\historic_events
date 0
position 268, 353 ; enables location button in message window
end_add_events
terminate_monitor
end_monitor
monitor_event FactionTurnEnd FactionType hre ; next turn
if not I_CharacterExists stral_attack1 ; making sure the army still exists
terminate_monitor ; else disable monitor
end_if
move stral_attack1 270, 355 ; moving next to the settlement
console_command auto_win attacker
siege_settlement stral_attack1, Rostock, attack
hide_all_revealed_tiles ; hiding the revealed tile again
terminate_monitor
end_monitor