in reply to to get the pixels positions

To partially answer what I think you're asking, from PerlFAQ 8: How do I get the screen size?. See also Term::Size::Any. Consider reading How do I post a question effectively? and use Super Search, if you haven't already done so.