Mouse messages

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
MarcVanCauwenberghe
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 142
Joined: Thu Feb 21, 2013 8:47 am

Mouse messages

Post by MarcVanCauwenberghe » Tue Apr 29, 2014 10:04 am

Hi,

is there a way to watch only mouse messages? Down, up, leave, enter, etc.. handler or not.

Best regards,
Marc

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Mouse messages

Post by Klaus » Tue Apr 29, 2014 10:37 am

MarcVanCauwenberghe wrote:Hi,
is there a way to watch only mouse messages? Down, up, leave, enter, etc.. handler or not.
Best regards,
Marc
:?: :?: :?:

Sorry, no idea what you are after! :D

MarcVanCauwenberghe
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 142
Joined: Thu Feb 21, 2013 8:47 am

Re: Mouse messages

Post by MarcVanCauwenberghe » Tue Apr 29, 2014 10:56 am

Oops, didn't know my english was that bad :cry:

I want to watch the messages as they are being send.
I opened the Message Watcher but there are soooo many messages I want to filter them to only show me some.
More precisely only those related to the mouse. MouseUp, mouseDown, ....
I enabled / disabled several checkboxes but was unable to get the result.

My question: is it possible to do this with the Message Watcher? If not is there another way?

Best regards,
marc

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Mouse messages

Post by Klaus » Tue Apr 29, 2014 11:23 am

Dag Marc,

your english is probably better than my dutch, I was just no getting what exactly you wanted :D

OK, I never used the Message watcher for exactly that reason you were experiencing: infomation overload!
I would create a frontsript that catches all the mouse events you want ot "spot".

Create a button with all the mouse scripts you want to watch and "insert" it into front.

Someting like this:

Code: Select all

on mouseup
  put "Mouseup" && the milliseconds & CR after fld "my personal message watcher"
  ## Or whatever you like...

  pass mouseup
end mouseup

on mouseleave
  put "mouseleave" && the milliseconds & CR after fld "my personal message watcher"
  pass mouseleave
end mouseup
## Etc. for all other mouse stuff...
Best

Klaus

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Mouse messages

Post by Simon » Tue Apr 29, 2014 11:24 am

Hi Marc,
I think you are asking about the mouseLoc?
But it doesn't give up, down, right , left you have to code that yourself.

Simon
Edit: or what Klaus says.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

MarcVanCauwenberghe
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 142
Joined: Thu Feb 21, 2013 8:47 am

Re: Mouse messages

Post by MarcVanCauwenberghe » Tue Apr 29, 2014 12:12 pm

Hi Simon. I am looking for messages actually, thanks anyway.

@klaus: also thanks. I thought as much. I think the message watcher could do with an option 'only allow' i will put in a enhancement request.
I will try it your way.

I'm still learning what messages are being send or not being send at any time.

Actually I want the name of the group the mouse is over at the moment the mouse is released when the mouse first clicked on another group.
If you now understand what I mean you get some bonus points :D

Mouseup will not do as that is never send. Mouserelease will get you the group of the first click... Mousewithin maybe?

Best regards,
Marc

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Mouse messages

Post by dunbarx » Tue Apr 29, 2014 1:53 pm

Marc.

This is a terrific idea. The message watcher is great at filtering OUT messages, but terrible at ALLOWING only certain ones. Please do put this into the "feature request" section.

Craig Newman

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Mouse messages

Post by [-hh] » Tue Apr 29, 2014 2:19 pm

..........
Last edited by [-hh] on Wed Aug 13, 2014 12:28 pm, edited 1 time in total.
shiftLock happens

MarcVanCauwenberghe
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 142
Joined: Thu Feb 21, 2013 8:47 am

Re: Mouse messages

Post by MarcVanCauwenberghe » Tue Apr 29, 2014 6:27 pm

That stack is great, thanks
Looks very close to what I need.

Best regards,
Marc

Post Reply