in reply to Re: checking mouse events on desktop
in thread checking mouse events on desktop

hi thank you for the quick answer. I want to realize it with perl and not with other languages/commands so why should this help me to search for an answer in a windows forum?! I know the Win32::GuiTest module and with this module you have no problems to emulate keyboard or mouse event and control windows and so on. So i was sure there gives a module in perl to find out mouse events like Button is pressed and which one is pressed at the moment. regards, michbach

Replies are listed 'Best First'.
Re^3: checking mouse events on desktop
by Anonymous Monk on Aug 24, 2008 at 20:18 UTC
    I want to realize it with perl and not with other languages/commands so why should this help me to search for an answer in a windows forum?!

    Language makes no difference. The OS is the limiting factor. Once you find what API is required, you can search to see if they're implemented in perl.

Re^3: checking mouse events on desktop
by juster (Friar) on Aug 25, 2008 at 20:44 UTC

    Since it is windows specific you will have to research more regarding windows than perl. Lookup Hook functions in the win32 api reference at MSDN. They will allow you to snoop mouse events system-wide. You can use the Win32::API module for this direct API access.

    You may have a hard time telling which button is pressed because manipulating or querying controls inside another window (that your program does not own) is not permitted.

    You can probably get more help at a windows forum as suggested.