Leslie Nielsen

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Leslie Nielsen

** Clarence P Martin ** via use-livecode
I can send a command to a button like this:

send "mouseUp" to btn "BASH"

BUT I want to fake having the altKey pressed as well:

pseudocode

send "mouseUp" with altkey(down) to btn "BASH"

can it be done?

and if so, how?

Richmond.
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Leslie Nielsen

** Clarence P Martin ** via use-livecode
On 2017-08-08 17:41, Richmond Mathewson via use-livecode wrote:

> I can send a command to a button like this:
>
> send "mouseUp" to btn "BASH"
>
> BUT I want to fake having the altKey pressed as well:
>
> pseudocode
>
> send "mouseUp" with altkey(down) to btn "BASH"
>
> can it be done?

Yes.

> and if so, how?

Look up the 'click' command in the dictionary :)

Warmest Regards,

Mark.

--
Mark Waddingham ~ [hidden email] ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Leslie Nielsen

** Clarence P Martin ** via use-livecode
That's marvellous . . .

as far as it goes:

click at the loc of btn "BASH" with altKey

The only "snag" is that that calls BOTH of the scripts in btn "BASH" (
mouseDown & mouseUp )

and I really only want to 'get' mouseUp

Richmond.

On 8/8/17 6:44 pm, Mark Waddingham via use-livecode wrote:

> On 2017-08-08 17:41, Richmond Mathewson via use-livecode wrote:
>> I can send a command to a button like this:
>>
>> send "mouseUp" to btn "BASH"
>>
>> BUT I want to fake having the altKey pressed as well:
>>
>> pseudocode
>>
>> send "mouseUp" with altkey(down) to btn "BASH"
>>
>> can it be done?
>
> Yes.
>
>> and if so, how?
>
> Look up the 'click' command in the dictionary :)
>
> Warmest Regards,
>
> Mark.
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Leslie Nielsen

** Clarence P Martin ** via use-livecode
Are ye daft man?? ;-)

Put the code that would run if the alt key were down in another handler, and just call that handler!

Bob S


> On Aug 8, 2017, at 08:54 , Richmond Mathewson via use-livecode <[hidden email]> wrote:
>
> That's marvellous . . .
>
> as far as it goes:
>
> click at the loc of btn "BASH" with altKey
>
> The only "snag" is that that calls BOTH of the scripts in btn "BASH" ( mouseDown & mouseUp )
>
> and I really only want to 'get' mouseUp
>
> Richmond.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Leslie Nielsen

** Clarence P Martin ** via use-livecode
In reply to this post by ** Clarence P Martin ** via use-livecode
Try this:
dispatch mouseUp to button "BASH" with true

Regards Tore

> 8. aug. 2017 kl. 17:54 skrev Richmond Mathewson via use-livecode <[hidden email]>:
>
> That's marvellous . . .
>
> as far as it goes:
>
> click at the loc of btn "BASH" with altKey
>
> The only "snag" is that that calls BOTH of the scripts in btn "BASH" ( mouseDown & mouseUp )
>
> and I really only want to 'get' mouseUp
>
> Richmond.
>
> On 8/8/17 6:44 pm, Mark Waddingham via use-livecode wrote:
>> On 2017-08-08 17:41, Richmond Mathewson via use-livecode wrote:
>>> I can send a command to a button like this:
>>>
>>> send "mouseUp" to btn "BASH"
>>>
>>> BUT I want to fake having the altKey pressed as well:
>>>
>>> pseudocode
>>>
>>> send "mouseUp" with altkey(down) to btn "BASH"
>>>
>>> can it be done?
>>
>> Yes.
>>
>>> and if so, how?
>>
>> Look up the 'click' command in the dictionary :)
>>
>> Warmest Regards,
>>
>> Mark.
>>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Leslie Nielsen

** Clarence P Martin ** via use-livecode
In reply to this post by ** Clarence P Martin ** via use-livecode
And change the script in the BASH button to something like this:

on mouseUp pAltKey
   if pAltKey then
      answer "Alt key was down"
   else
      answer "Alt key was up"
   end if
end mouseUp


> 8. aug. 2017 kl. 17:54 skrev Richmond Mathewson via use-livecode <[hidden email]>:
>
> That's marvellous . . .
>
> as far as it goes:
>
> click at the loc of btn "BASH" with altKey
>
> The only "snag" is that that calls BOTH of the scripts in btn "BASH" ( mouseDown & mouseUp )
>
> and I really only want to 'get' mouseUp
>
> Richmond.
>
> On 8/8/17 6:44 pm, Mark Waddingham via use-livecode wrote:
>> On 2017-08-08 17:41, Richmond Mathewson via use-livecode wrote:
>>> I can send a command to a button like this:
>>>
>>> send "mouseUp" to btn "BASH"
>>>
>>> BUT I want to fake having the altKey pressed as well:
>>>
>>> pseudocode
>>>
>>> send "mouseUp" with altkey(down) to btn "BASH"
>>>
>>> can it be done?
>>
>> Yes.
>>
>>> and if so, how?
>>
>> Look up the 'click' command in the dictionary :)
>>
>> Warmest Regards,
>>
>> Mark.
>>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Leslie Nielsen

** Clarence P Martin ** via use-livecode
In reply to this post by ** Clarence P Martin ** via use-livecode
> Tore wrote:
> And change the script in the BASH button to something like this:
> on mouseUp pAltKey
>   if pAltKey then
>     answer "Alt key was down"
>   else
>     answer "Alt key was up"
>   end if
> end mouseUp

Tore, we have to use a second param, e.g.

on mouseUp pButton, pAltkey

The first param is *always* the button number, so your script above
will not work if pAltkey is the first param.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Leslie Nielsen

** Clarence P Martin ** via use-livecode
In reply to this post by ** Clarence P Martin ** via use-livecode
On 8/8/17 11:05 AM, Tore Nilsen via use-livecode wrote:
> And change the script in the BASH button to something like this:
>
> on mouseUp pAltKey
>     if pAltKey then
>        answer "Alt key was down"
>     else
>        answer "Alt key was up"
>     end if
> end mouseUp

This will error. The parameter is always an integer representing the
mouse button that was pressed.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Leslie Nielsen

** Clarence P Martin ** via use-livecode
You are right! I have lived to long in the Mac world and did not think of a mouse with more than one button. This script will work though:

In the button sending the mouseUp:

on mouseUp
   dispatch mouseUp to button "BASH" with 1,true
end mouseUp

In the button receiving the mouseUp call:

on mouseUp pButton pAltKey
   if pAltKey then
      answer "Alt key was down"
   else
      answer "Alt key was up"
   end if
end mouseUp

Regards
Tore

> 8. aug. 2017 kl. 20:23 skrev J. Landman Gay via use-livecode <[hidden email]>:
>
> On 8/8/17 11:05 AM, Tore Nilsen via use-livecode wrote:
>> And change the script in the BASH button to something like this:
>> on mouseUp pAltKey
>>    if pAltKey then
>>       answer "Alt key was down"
>>    else
>>       answer "Alt key was up"
>>    end if
>> end mouseUp
>
> This will error. The parameter is always an integer representing the mouse button that was pressed.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...