Finding out if a Right-Click has occurred

19 views
Skip to first unread message

cmclane

unread,
Jul 4, 2018, 10:03:44 PM7/4/18
to SuperCard Discussion
My simple question is can I tell if a right-click has occurred in a SuperCard project and do something based on that. I have looked in the User Guide and the Help System for any words I can think of related to click, mouse click, right click etc. and have come up empty. I did find something called ContextClick, but it is not clear to me from the description how to use this.

My broader question is what is the best way to learn SC for items like this - - I will post that as a separate question.

jen...@adelaide.on.net

unread,
Jul 4, 2018, 11:25:57 PM7/4/18
to SuperCard Discussion
Hi Charlie

I think that you are on the right track with contextClick.

I have never used that message but I thought that it would be simple to test.

I have a small SuperCard project called Test.sc45 that I use for testing.
In it I created a new card and I added this to the card's script:

on contextClick
put "contextClick at" && the time
end contextClick

If I click the mouse on the card, nothing happens.
If I right-click on the card, this appears in the message box:
contextClick at 12:53
Same if I control-click.

Peter Jenkins

Bill Bowling

unread,
Jul 4, 2018, 11:26:48 PM7/4/18
to superca...@googlegroups.com
Is CTRL click the same as right click... you could experiment to catch keydown when a click happens.

Bill

On Jul 4, 2018, at 19:03, cmclane <cmc...@mclaneenv.com> wrote:

My simple question is can I tell if a right-click has occurred in a SuperCard project and do something based on that. I have looked in the User Guide and the Help System for any words I can think of related to click, mouse click, right click etc. and have come up empty. I did find something called ContextClick, but it is not clear to me from the description how to use this.

My broader question is what is the best way to learn SC for items like this - - I will post that as a separate question.

--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.
To post to this group, send email to superca...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/supercard-talk/acfb1720-73af-45c3-8570-0d80b38faaf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Charles McLane

unread,
Jul 5, 2018, 10:04:05 AM7/5/18
to superca...@googlegroups.com
Bill - - When I read Peter's post that was my question. If two different clicks return "contextClick" how do I differentiate them? But it appears they are both equivalent:

On Mac computers, right click is known as secondary click or Control click. If yourmousetrackpad, or other input device doesn't include a right-click button or other way to perform a right click, just hold down the Control key on your keyboard while you click.Apr 14, 2017

How to right-click on Mac - Apple Support

https://support.apple.com/en-us/HT207700


Peter - - Thanks for this tip. I reproduced your short script on my test card and am getting the same results. So thank you for that.

I think what threw me off was the wording in the SuperCard Help description for contextClick where is said something about a contextual click on a menu (which is not what I am trying to do):

"The contextClick message is sent to an object or card when it receives what the OS determines to be a contextual menu click.


COMMENTS

Depending on the OS version, this may be a right click, a control click, or some other device-specific gesture."







On Wed, Jul 4, 2018 at 11:26 PM, 'Bill Bowling' via SuperCard Discussion <superca...@googlegroups.com> wrote:
Is CTRL click the same as right click... you could experiment to catch keydown when a click happens.

Bill

On Jul 4, 2018, at 19:03, cmclane <cmc...@mclaneenv.com> wrote:

My simple question is can I tell if a right-click has occurred in a SuperCard project and do something based on that. I have looked in the User Guide and the Help System for any words I can think of related to click, mouse click, right click etc. and have come up empty. I did find something called ContextClick, but it is not clear to me from the description how to use this.

My broader question is what is the best way to learn SC for items like this - - I will post that as a separate question.

--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-talk+unsubscribe@googlegroups.com.
To post to this group, send email to supercard-talk@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "SuperCard Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/supercard-talk/kQzkwDvXLnE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supercard-talk+unsubscribe@googlegroups.com.
To post to this group, send email to supercard-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/supercard-talk/C844286F-2BFC-4E1A-8A8F-9463E819878D%40me.com.

For more options, visit https://groups.google.com/d/optout.



--
Charles F. McLane III, PhD
Principal

707 Alexander Road, Suite 206 - Princeton NJ 08540
Direct: 609-919-2701  Fax: 609-987-8488
Reply all
Reply to author
Forward
0 new messages