Page 1 of 1

right-click option

Posted: Fri Sep 30, 2011 2:38 pm
by herbwords
Hi to All,

Could someone tell me how you include right-clicking in a program?

Thanks,

Patrick

Re: right-click option

Posted: Fri Sep 30, 2011 2:52 pm
by dunbarx
The mouseClick function does not discriminate. Perhaps try to use the "click" command? Check the dictionary and try a few experiments.

Craig Newman

Re: right-click option

Posted: Fri Sep 30, 2011 2:53 pm
by Klaus
Hi Patrick,

you need:
1. prepare a POPUP menu button
2. Add a "mosuedown" script to the objects where you want to popup the contextmenu:

Code: Select all

on mousedown tMouseButton
  if tMouseButton = 3 then ## right click!
    popup btn "you prepared button here" at the mouseloc
  else
   ## optional...
 end if
end mousedown
That's the mechanism, basically :)

Best

Klaus

Re: right-click option

Posted: Fri Sep 30, 2011 8:16 pm
by herbwords
Hi Klaus,

Thanks. I got the general idea, but I'm not sure how to word what I want. Is there anything written already that would work on the text in a field (copy, delete, etc) like a typical windows right click?

Thanks,

Patrick

Re: right-click option

Posted: Fri Sep 30, 2011 10:43 pm
by dunbarx
I see what you mean now. Maybe start more simply...

Make a button. Put this in its script:

Code: Select all

on mouseUp tButtonNumber
   if tButtonNumber = 1 then answer "You used the left button"
   else answer "You used the right button"
   
   -- or more elegantly:
   
   answer "You must have used button" && tButtonNumber
end mouseUp
Craig Newman

Re: right-click option

Posted: Sat Oct 01, 2011 3:07 am
by marksmithhfx
herbwords wrote:Hi Klaus,

Thanks. I got the general idea, but I'm not sure how to word what I want. Is there anything written already that would work on the text in a field (copy, delete, etc) like a typical windows right click?

Thanks,

Patrick
Hi Patrick, I'll post a complete working example this weekend (I've been working on one that lets you add, edit, delete items from a list in a scrolling list field and then drag/drop to re-arrange the list). However, there is one problem. Currently, because of a bug (#7766) on the PC version it will only work on the Mac. That being said, the only impact of the bug is that after a "popup" function the drag/drop won't work until you move the mouse out of the field and then back in again (this has to do with the fact that LC stops sending mousemove messages to the field after a pop-up). So, in short what I am trying to say is most of the functionality you want will be in the program, you'll probably just have to remove or disable the drag/drop stuff until RR can fix the bug. Look for a repost of the Enhanced Scrolling List field later this weekend.

-- Mark

Re: right-click option

Posted: Sat Oct 01, 2011 7:08 am
by herbwords
I've contacted a developer to see what it will cost to get it written. If anyone here wants to take a crack at it give me a price.
send to: herbwords@yahoo.com

Thanks All