Auto-translated
Machines can be controlled, but only if they can be steered. That is, you must have the skill to manually control a specific machine; otherwise, its turn will not be detected by the script. You can definitely fire a catapult/ballista using commandShot, and you can probably heal with a tent using commandDoSpecial, but I can't say for sure which ability it is.
Of course, you can repair machines by casting a repair spell on them using a script.