Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking mouse events on desktop

Status
Not open for further replies.

rommi

Technical User
Aug 24, 2008
3
DE
Hi all,
since two weeks i try to find a perl-module or perl-script to watch mouse events (left click, right click, double click and so on) on the desktop. I want when ever a mouseclick with the left, middle or right button is executed on the desktop or any windows on the desktop. The operating system is Windows. One more time, im not looking for mouseevents on tk windows or objekts. That would not be a problem for me to use the tk-funktions. I want to know if mouse event happens on the desktop (click on the desktop) or any window (not only tk created windows) that is on the desktop.

I tried to find some hints with google but could not found anything.. Can anybody help me? It would be very nice! best regards, rommi

thanks a lot
regards
rommi
 
I think you should have a look at Win32 modules at cpan...
also you might get somewhere with this X11 GUI one.

What you are trying to achieve is not so promising though...
Good Luck



``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
Hi perluserpengo, thx for your answer. Im looking since 2 weeks for a resolution for this problem. I want to realize it with perl and i have read the dokumentations from the module win32, win32::Gui, win32::GuiTest and Api. I cant find a adequate mouse-funktion or method. In the beginning i was thinking also that could not be a big problem. I wrote this problem to some perl-forums but nobody could give me a resolution and so it looks that the problem is not so easy. The GuiTest-module makes everything with your mouse and keyboard but it dont has any funktion/method to find out which mouse-button is pressed when a mouse-button is press anywhere on the desktop or a open window on the desktop. It seems that i must dispense on it. And sometimes its better to dispense :) May be i find a workarround.

Thanks for all, best regards rommi
 
aditional post to my last post. In my mind i thought it would be so easy like so:

use Win32::GUI;
$desk = Win32::GUI::GetDesktopWindow();
$mousestatus = $desk->Mouseevent(LButton_ispressd, RButton_ispressed);

:) rommi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top