I believe there's an eselect command which you may be able to utilize. I'm not entirely certain whether it can apply to the AI or not though.
edit: right
e_select_character
You'd probably need to either use that in a script but it may work in console. You need to select the character, so you might need to click on the ai character for example. Though I'm not entirely sure whether that will register as a 'selection'.
Come to think of it, that is likely how the current next (forget the exact word) faction heir script works.
Bookmarks