Can I get the name of an object at the clickloc?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Can I get the name of an object at the clickloc?

Post by dunbarx » Tue May 03, 2022 4:07 am

Richmond
How about making "all the other stuff" happen
when one presses the ESC key?
You can, sort of. An offering like Jacque's or Stams, where the LC is left alone as opposed to any sort of "wait" (with messages or without), can be exploited. This is because all handlers are independent. A rawkeyDown message can be invoked just like any other. Check out this stack. Click on the button and you can then click anywhere on the card to get the mouseColor.
Escape.livecode.zip
(1.08 KiB) Downloaded 72 times
You can escape at any time with the escape key.

I wasted a lot of time tying up LC (with nonsense like "...with messages"), hoping I could find a back door and force a "rawKeyDown" message to be invoked inside a running handler. I could not do it; I doubt if it can be done.

Craig

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”