@jip Maybe your reply is to cunnismeta, but, for what it is worth, I found out how to do the thing I was looking for.
Try the following, in the game console (with engineer or commander selected):
ui_lua import('/lua/ui/game/commandmode.lua').StartCommandMode("order", {name="RULEUCC_Script", AbilityName='AttackMove', TaskName='AttackMove', Cursor = 'ATTACK_MOVE'})
Interestingly, this works better than clicking the attack move button, because you actually get the correct cursor shown while in the relevant command mode, whereas there is a problem with not seeing a change of cursor when clicking the attack move button.
The lua script I am copying this from is as follows:
local function AttackMoveBehavior(self, modifiers)
if self:IsChecked() then
CommandMode.EndCommandMode(true)
else
local modeData = {
name="RULEUCC_Script",
AbilityName='AttackMove',
TaskName='AttackMove',
cursor = 'ATTACK_MOVE',
}
CommandMode.StartCommandMode("order", modeData)
end
end
Note the small case 'c' in cursor, which is what makes the difference. I guess this is probably a bug..