send "end mouseUp"

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

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

send "end mouseUp"

Post by richmond62 » Sat Jun 14, 2025 9:14 am

I wonder why this code:

Code: Select all

if intersect(grc "bug", image "path", 2) then
                  move grc "bug" to 70, 630
                  --send "end switch"
                  send "exit mouseUp"
               end if
throws a bluey.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: send "end mouseUp"

Post by Klaus » Sat Jun 14, 2025 10:30 am

Maybe because LC thinks this does not make much sense? :D

If this snippet is part of a "mouseup" handler, then a simple "exit mouseup" will suffice, no need to SEND anything.
If not, please post the complete handler.

SWEdeAndy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 324
Joined: Sat Aug 16, 2008 9:48 am
Contact:

Re: send "end mouseUp"

Post by SWEdeAndy » Sat Jun 14, 2025 10:55 am

Indeed! "Send" is a command and needs a handler name as argument. "exit mouseUp" is not, an can never be, a handler name.
Andreas Bergendal
Independent app and system developer
Free LC dev tools: https://github.com/wheninspace
(WIS_WebDeployHelper, WIS_ScriptDependencies, WIS_BrowserAnimation)
WhenInSpace: https://wheninspace.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: send "end mouseUp"

Post by richmond62 » Sat Jun 14, 2025 11:15 am

Thank you very much for your help. 8)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: send "end mouseUp"

Post by dunbarx » Sat Jun 14, 2025 3:46 pm

Richmond.

I am not sure if this helps or not but if you had this in a button script

Code: Select all

on mouseUp
   beep 3
   send "exitMouseUp" && "5" to this cd
end mouseUp
:
and this in the card script:

Code: Select all

on exitMouseUp var
   answer var
end exitMouseUp
The real difference is that the message "sendMouseup" is ONE word, as all message names must be. The only method, and likely the only reason to send more than one word is in the example, that is, appending a parameter to the message.

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: send "end mouseUp"

Post by richmond62 » Mon Jun 30, 2025 9:44 am

Humpf . . .

This throws a bluey:

Code: Select all

 if ctrlKey() is down then
      put numToCodePoint(122933) after fld "OOT"
      end mouseUp
   end if
   if altKey() is down then
      put numToCodePoint(11767) after fld "OOT"
   else
      if shiftkey() is up then
         put numToCodePoint(1077) after fld "OOT"
      else
         if shiftkey() is down then
            put numToCodePoint(MAGIC) after fld "OOT"
         end if
      end if
   end if
Where I have 'end mouseUp' (which throws the bluey) I should like to, erm, exit the mouseUp script . . .

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10080
Joined: Fri Feb 19, 2010 10:17 am

Re: send "end mouseUp"

Post by richmond62 » Mon Jun 30, 2025 9:45 am

OK, OK, just for a change answering my own query:

exit mouseUp :lol:
Last edited by richmond62 on Mon Jun 30, 2025 10:52 am, edited 2 times in total.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: send "end mouseUp"

Post by Klaus » Mon Jun 30, 2025 10:07 am

Nope, I already answered that about two weeks ago, see my first answer here! 8)

Post Reply