1. Capture mouse events outside code window
- Posted by sergelli Apr 13, 2011
- 2617 views
Good morning everyone.
How do I do to detect mouse events outside the program window? I can do this using Eu311 and win32Lib? Basically, I need a code that captures (for example) if the user pressed the middle mouse button anywhere on the monitor.
Thanks in advance
2. Re: Capture mouse events outside code window
- Posted by DanM Apr 13, 2011
- 2607 views
try something using this:
setHandler(Screen, w32HMouse, routine_id("onMouse_XXX"))
Dan
3. Re: Capture mouse events outside code window
- Posted by sergelli Apr 13, 2011
- 2585 views
try something using this:
setHandler(Screen, w32HMouse, routine_id("onMouse_XXX"))
Dan
It does not work out! "Screen"refers to the windows opened by the application that is running.
4. Re: Capture mouse events outside code window
- Posted by DanM Apr 13, 2011
- 2595 views
try something using this:
setHandler(Screen, w32HMouse, routine_id("onMouse_XXX"))
Dan
It does not work out! "Screen"refers to the windows opened by the application that is running.
Hmm, looks like you're right, but it worked, or seemed to work, with a demo for using mousewheel in win2Lib demos; I could've sworn Screen referred to anywhere on the display, something must?
Sorry 'bout that, got no better ideas right now.
Dan
5. Re: Capture mouse events outside code window
- Posted by sergelli Apr 14, 2011
- 2635 views
In December 2004 I made this same question and the sumary of answer was the same: Euphoria does not have this feature.
They also informed me that it is possible to do this function, but it is very difficult and laborious. To do this jpb I would have to use a Windows API called "hook" and the best explanation on this subject was in the following address: http://www.codeproject.com/KB/system/hooksys.aspx
O.K. this is perfectly correct. But with the knowledge I have of computer programming, I need another decade to do this function! :)
So, here is my call for our masters in Euphoria to do this function. I am aware that this feature can be used maliciously, but that would be in the digital world, where everything we do, only to be allowed to make things safe?
I'm sure that this function would give more credibility and respect to language Euphoria,and it would be a demonstration of strength and capacity.
6. Re: Capture mouse events outside code window
- Posted by andi49 May 09, 2011
- 2428 views
Hallo
I have uploaded a demonstration about using a windowshook, to realize the capturing of mouse events the program window. I did this about a week ago, but it didn't seems to appear in the 'Archive' on RapidEuphoria.com.
It seems you can download it from there http://www.rapideuphoria.com/uploads/hooktest.zip
@Sergelli, Thank you for testing this out and the motivation to release the code.
@All, Handle with care ;)
Andreas