I've been digging into OUTPOST.EXE this whole week, and came up with a LOT of interesting (and useful) stuff!!
So far, i've gotten the in-game options/prefs locations, and procedures, which makes it possible to toggle any of the flags (i.e. checkboxes) with your code. The only useful thing that i could find is to turn off the music and back on, to make it start playing the songlist from the first item again. In combination with a new songIds list, this action will instantly start playing a new song. This could be used for increasing song-tempo the moment a volcano erupts, or when a large group of enemy units come in, or whatever.....
The other thing is, after looking into my notes about the internal unit structure, i found another useful byte: "busy". The exported functions only return a boolean; either true or false, using IsBusy() - but i've come up with a list of actions that define "busy" in detail. Now, i know exactly what a unit is doing at all time.
Until now, i will not be releasing this code. I need to test it further, and work it out some more. As Hooman and op2hacker know, this code isn't pretty, and it is not 100% guaranteed to work.