Right click menu on Windows

Mark Brownell gizmotron at earthlink.net
Wed Aug 25 00:23:45 EDT 2004


On Tuesday, August 24, 2004, at 06:34 PM, Sarah Reichelt wrote:

> Why do you want to simulate a key combination? Wouldn't it be easier 
> just to have your popup menu use the "copy", "paste", "cut" & "undo" 
> commands directly?
>
> Sarah

They don't work for some reason that I can't understand. The keyboard 
commands for Control-C, and Control-V work perfectly but when I do a 
menuPick from a popup menu it didn't work. I spent hours on this. 
Perhaps I missed something. I just wanted a right-click menuPick to 
work on the selected text in a field of the same stack. It was 
suggested to use an offScreen button like this:

> Create a popup button with the menus you need and put it offscreen...
> (I think hiding the button does only work on a mac...?)
>
> Then script:
>
> on mousedown whatmouse
>    if whatmouse = 3 then ## right- or control-click!
>      popup btn "you btn here"
>   end if
> end mousedown
>

In the right-click menuPick I tried copy & paste. Perhaps I'll try one 
more time. I gave up on turning the locktext or textlock true and then 
false.

So I just tried now and with the mousedown handler moved from the text 
field to the stack the handler opens the popup menu but I lose the 
selection so there is nothing for the cammands to work on now.

Maybe I'll figure that out soon.

Mark



More information about the use-livecode mailing list