Re: mouseButtonNumber

2014-04-20 Thread Peter M. Brigham
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

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: mouseButtonNumber

2014-04-20 Thread Richmond

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.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: mouseButtonNumber

2014-04-19 Thread Peter Haworth
I think in should be into

Pete
lcSQL Software http://www.lcsql.com
Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and
SQLiteAdmin http://www.lcsql.com/sqliteadmin.html


On Sat, Apr 19, 2014 at 2:36 PM, Richmond richmondmathew...@gmail.comwrote:

 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?

 Richmond.

 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: mouseButtonNumber

2014-04-19 Thread Dar Scott
The 1 after mouseUP in my email confuses me.  Maybe they represent something 
fishy there, too, such as a funny character

On Apr 19, 2014, at 5:05 PM, Peter Haworth p...@lcsql.com wrote:

 I think in should be into
 
 Pete
 lcSQL Software http://www.lcsql.com
 Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and
 SQLiteAdmin http://www.lcsql.com/sqliteadmin.html
 
 
 On Sat, Apr 19, 2014 at 2:36 PM, Richmond richmondmathew...@gmail.comwrote:
 
 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?
 
 Richmond.
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: mouseButtonNumber

2010-12-23 Thread David Bovill
Thanks Ken!

On 22 December 2010 20:14, Ken Ray k...@sonsothunder.com wrote:

 You can use the mouse() function, looking for a down result:

 if mouse(1) is down
 if mouse(2) is down
 if mouse(3) is down

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: mouseButtonNumber

2010-12-22 Thread Mark Schonewille
Hi David,

Do you mean this?

dispatch mouseUp to btn x with 3

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.5 for LiveCode here http://qurl.tk/ce

On 22 dec 2010, at 18:42, David Bovill wrote:

 This is the param that mouseUp and mouseDown pass. From the docs:
 
 The mouseButtonNumber specifies which mouse button was pressed:
* 1 is the mouse button on Mac OS systems and the left button on Windows
 and Unix systems.
* 2 is the middle button on Unix systems.
* 3 is the right button on Windows and Unix systems and Control-click on
 Mac OS systems.
 
 I want to emulate this in a script - is there a built in function, or does
 someone have a utility function for this that has been tested
 cross-platform?



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: mouseButtonNumber

2010-12-22 Thread David Bovill
Hi Mark, not quite. I have a handler - something like:

command mimickMouseUp
   put getMouseButtonNumber() into pMenuButtonNum
   if pMenuButtonNum = 3 then
 doSomething
   end if
 end mimickMouseUp

 function getMouseButtonNumber
   -- ?
 end getMouseButtonNumber


Assuming there is no built in handler I want a function that returns the
same value (ie number), that you get with:

on mouseUp pMenuButtonNum
   if pMenuButtonNum = 3 then
 doSomething
   end if
 end mouseUp



On 22 December 2010 18:07, Mark Schonewille 
m.schonewi...@economy-x-talk.com wrote:

 Hi David,

 Do you mean this?

 dispatch mouseUp to btn x with 3

 --
 Best regards,

 Mark Schonewille

 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553

 New: Download the Installer Maker Plugin 1.5 for LiveCode here
 http://qurl.tk/ce

 On 22 dec 2010, at 18:42, David Bovill wrote:

  This is the param that mouseUp and mouseDown pass. From the docs:
 
  The mouseButtonNumber specifies which mouse button was pressed:
 * 1 is the mouse button on Mac OS systems and the left button on
 Windows
  and Unix systems.
 * 2 is the middle button on Unix systems.
 * 3 is the right button on Windows and Unix systems and Control-click
 on
  Mac OS systems.
 
  I want to emulate this in a script - is there a built in function, or
 does
  someone have a utility function for this that has been tested
  cross-platform?



 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: mouseButtonNumber

2010-12-22 Thread Ken Ray
You can use the mouse() function, looking for a down result:

if mouse(1) is down
if mouse(2) is down
if mouse(3) is down

Ken


On 12/22/10 1:16 PM, David Bovill da...@vaudevillecourt.tv wrote:

 Hi Mark, not quite. I have a handler - something like:
 
 command mimickMouseUp
   put getMouseButtonNumber() into pMenuButtonNum
   if pMenuButtonNum = 3 then
 doSomething
   end if
 end mimickMouseUp
 
 function getMouseButtonNumber
   -- ?
 end getMouseButtonNumber
 
 
 Assuming there is no built in handler I want a function that returns the
 same value (ie number), that you get with:
 
 on mouseUp pMenuButtonNum
   if pMenuButtonNum = 3 then
 doSomething
   end if
 end mouseUp
 
 
 
 On 22 December 2010 18:07, Mark Schonewille 
 m.schonewi...@economy-x-talk.com wrote:
 
 Hi David,
 
 Do you mean this?
 
 dispatch mouseUp to btn x with 3
 
 --
 Best regards,
 
 Mark Schonewille
 
 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553
 
 New: Download the Installer Maker Plugin 1.5 for LiveCode here
 http://qurl.tk/ce
 
 On 22 dec 2010, at 18:42, David Bovill wrote:
 
 This is the param that mouseUp and mouseDown pass. From the docs:
 
 The mouseButtonNumber specifies which mouse button was pressed:
* 1 is the mouse button on Mac OS systems and the left button on
 Windows
 and Unix systems.
* 2 is the middle button on Unix systems.
* 3 is the right button on Windows and Unix systems and Control-click
 on
 Mac OS systems.
 
 I want to emulate this in a script - is there a built in function, or
 does
 someone have a utility function for this that has been tested
 cross-platform?
 
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.com/



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode