mouseButtonNumber

Richmond richmondmathewson at gmail.com
Sun Apr 20 08:56:21 EDT 2014


On 20/04/14 15:43, Peter M. Brigham wrote:
> On Apr 19, 2014, at 5:36 PM, Richmond wrote:
>
>> when I have a script in a button like this:
>>
>> on mouseUp 1
>>    put "Left button" in fld "whichMouseBtn"
>> end mouseUp 1
>>
>> I get a "red hot-cross bun": why?
> Check the syntax for the mouseup command. The command expects one parameter, mouseButtonNumber. Also, it's put into, not put in.
>
> Try this instead:
>
> on mouseup tBtn
>     if tBtn = 1 then
>        put "Left button" into fld "whichMouseBtn"
>     else if tBrn = 3 then
>        put "Right button" into fld "whichMouseBtn"
>     end if
> end mouseup
>
> -- Peter
>
>

Gotcha: thank you very much indeed.

Richmond.




More information about the use-livecode mailing list