You can use the "Windows - Activate Window" command. I think Scott created a plugin once that would allow you to switch to a window and then switch back to the original window. You may want to search the forums for that.
If you're just looking to send commands to the window, the best method is to use the SendMessage command, but that will require you to determine the messages being generated by the volume/songs commands. I don't use realplayer, so I can't help you out with that part.
-- Jeff