Added waitForIn/Visible command

I had to implement this functionality for me (via addCommand). i saw other people requested that feature, recently, so i wrote a patch, maybe you want to accept it.

regards,

magnus