Your approach does likely not work because PostMessage() is not documented to use SendKeys() as an argument. Where is the documentation where your approach is documented?
Comment on Re: Why are background windows are not responding for PostMessage method, Where the foreground windows are working fine?