Mouse tracker
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 7
- Joined: Tue Jun 03, 2008 1:35 pm
Mouse tracker
I wanted to create a program that reacts on mouse moverments who can help me out???
1)I need to know when the mouse turns into an other direction
2)How to watch events when the window in not focused, visible or minimized
3)How to use the systemtray
1)I need to know when the mouse turns into an other direction
2)How to watch events when the window in not focused, visible or minimized
3)How to use the systemtray
Hoi Nr 13,
It would be useful if you could provide more information. What is your criterion for changes in the direction of mouse movements? Would it be sufficient to check in which area the mouse is?
What kind of events do you want to monitor?
With regard to the system tray, you might want to check the information in the read me files. There is some unsupported icon property. Also have a look here: http://article.gmane.org/gmane.comp.ide ... ystem+tray
Groeten,
Mark
It would be useful if you could provide more information. What is your criterion for changes in the direction of mouse movements? Would it be sufficient to check in which area the mouse is?
What kind of events do you want to monitor?
With regard to the system tray, you might want to check the information in the read me files. There is some unsupported icon property. Also have a look here: http://article.gmane.org/gmane.comp.ide ... ystem+tray
Groeten,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 7
- Joined: Tue Jun 03, 2008 1:35 pm
I want to create a program which catches the mousemovements and if it recognises one i want it to execute a program related to it. The mousemovement should be watched in all the parts of the screen.
1) I want to watch the mousemove, the mouseUp, the MouseDown and the keybord(Keyup, ...) events to provide shortcuts and track the mouse.
2) I want to view my own icon into the system tray with a menu to show the options window and to quit the application.
3) I want to know how i could register the mouse direction change so that I can recognise certain form like a "W" to start up word. So i need to know when i have to check the mouseposition next time.
4) and i want to know how to put programs into the startup of windows(or even mac) so that you don't have to launch the program manually each time you start up.
1) I want to watch the mousemove, the mouseUp, the MouseDown and the keybord(Keyup, ...) events to provide shortcuts and track the mouse.
2) I want to view my own icon into the system tray with a menu to show the options window and to quit the application.
3) I want to know how i could register the mouse direction change so that I can recognise certain form like a "W" to start up word. So i need to know when i have to check the mouseposition next time.
4) and i want to know how to put programs into the startup of windows(or even mac) so that you don't have to launch the program manually each time you start up.
Hallo 13,
I think you need to tackle this from a different angle. If I understand you correctly, you want to be able to recognise what has become known as "gestures".
You could create a handler, which continuously records the mouseLoc and checks whether the last 6 or 8 or 12(?) locations are in particular areas. Later on, your might refine this and check whether the previous locations are in particular areas relative to the current location.
To create a list, you might do this:
and then you'll have to come up with a smart algorithm to discover a pattern in the recorded locations.
I hope this helps. For info about an icon in the system tray, have a look at the link and the Read Me files. To make your standalone start automatically, just put an alias into the startup items folder (both on Mac and Windows).
Best,
Mark
I think you need to tackle this from a different angle. If I understand you correctly, you want to be able to recognise what has become known as "gestures".
You could create a handler, which continuously records the mouseLoc and checks whether the last 6 or 8 or 12(?) locations are in particular areas. Later on, your might refine this and check whether the previous locations are in particular areas relative to the current location.
To create a list, you might do this:
Code: Select all
local theLocations
on mouseMove x,y
put (line -8 to -1 of theLocations) & cr & x & comma & y into theLocations
pass mouseMove
end mouseMove
I hope this helps. For info about an icon in the system tray, have a look at the link and the Read Me files. To make your standalone start automatically, just put an alias into the startup items folder (both on Mac and Windows).
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 7
- Joined: Tue Jun 03, 2008 1:35 pm
Okay, thx for the code about recognising the gestures but I still have to know how to catch handlers when they are not in the windows or the window is not visible, minimize or hidden, because that code you gave me won't work when the window isn't visible or focused. And I wanted to create a program to catch gestures over all the window with nothing more visible then a system tray icon.
Dear Nr13,
I propose you use a send command to record the mouseLoc.
Yours sincerely,
Mark
I propose you use a send command to record the mouseLoc.
Code: Select all
local theLocations
on recordMouseLoc
put (line -8 to -1 of theLocations) & cr & the mouseH & comma & the mouseV into theLocations
send "mouseMove" to me in 100 millisecs
end mouseMove
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 7
- Joined: Tue Jun 03, 2008 1:35 pm