Thats not the optimal way of doing it Coragin.
The best way is to know the size of the container, then offset the clicks according to the containers size.
If you set the container to 0,0 and click a position on the screen, you'll eventually have a container move late, and you'll click the wrong spot. If you use the offsets, you just wait for the container to open, then without moving it you can click on the correct position.
I once had an excellent tutorial on this very subject. I'll see if I still have the pics saved.