Maybe you could create a global variable to hold the ordered selection list and then update it every time the selection changes.
global string $gOrderedSelection[];
scriptJob -e "SelectionChanged" "updateOrderedSelection()";
updateOrderedSelection needs to do a lot of work, because you can't know just what changed, you have to look at the whole selection list each time.
global proc updateOrderedSelection(){
string $sel[] = `ls -sl -flatten`;
// if $sel is empty clear $gOrderedSelection and return
for ($s in $sel) {
// if $s is in $gOrderedSelection then ignore it
// if $s is not in $gOrderedSelection then append it
}
for ($o in $gOrderedSelection) {
// if $o is in $sel then ignore it
// if $o is not in $sel then remove it from the $gOrderedSelection
}
}
Maybe this is overkill and slow - but it could work.
Another option would be to write a custom selection context, probably possible with python even. In that way you would have access to the components that were selected or unselected in each event.