command-click on a word
Peter M. Brigham
pmbrig at gmail.com
Tue Oct 2 08:42:11 EDT 2012
On Oct 1, 2012, at 6:42 PM, Bob Sneidar wrote:
> Command clicking and right-clicking are the same thing in OS x (unless you changed the default prefs).
Unless I am mistaken, this is not true. In OSX, control-clicking and right clicking are the same thing, but not the same as command-clicking -- the common denominator is that they both trigger a mouseup message even in an unlocked field. E.g., put this in a field script and you'll see the difference:
on mouseup tBtn
if tBtn = 3 then
put "controlkey:" && the clicktext
else if the commandkey is down then
put "commandkey:" && the clicktext
end if
end mouseup
Control-click on a word and you'll get the "controlkey" branch, command-click on a word and you'll get the "commandkey" branch. I don't find anything in the preferences that changes this, but maybe I'm missing something….
You can roll your own popup menu for what you want. I have a library with a button and a script for a function "popChoose" that makes this very easy:
put "choice 1" & cr & "second choice" & cr & "last choice" into tChoices
put popChoose(tChoices) into userChoice
switch userChoice
case "choice 1"
<snip>
If anyone wants this then I'll post it.
-- Peter
Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig
More information about the use-livecode
mailing list