Hrm, okay so their is an /in command and it actually allows you to do a lot of things. it also looks like it's part of an older addon but I'll have to test it myself tonight to see if it works at all. I wouldn't mind just abstracting this element into it's own private package. Call me picky but I like to be very selective about my addons.

What it appears to do is queue the command, throwing it into some kind of stack. Looks like you can use it for an array of commands instead of just chat ones. I"m not sure about casting though. I'll have to research it further but I don't know a lick of Lua yet. So scanning the code has me making some wild ass guesses at the moment.