Menu Buttons

André Bisseret andre.bisseret at wanadoo.fr
Tue May 10 06:02:03 EDT 2011


Bonjour David,

Did you try :

set the menuHistory of btn "examples" to 1 -- (or 2, 3, etc)

Best regards from Grenoble

André


Le 9 mai 2011 à 23:18, David Brooks a écrit :

> I DO exactly those sorts of things. But, when I send a menupick message, nothing happens. 
> 
> I've tried things like:
> 
> send menupick (line 3 of btn "Examples") to btn "Examples"
> 
> and 
> 
> send menupick aspirin to btn "Examples"
> 
> However, I've never used the term "combo box" and it looks as if I have a new avenue to try.  Many thanks. This looks to be similar to what one would do with a field. 
> 
> MANY thanks.
> 
> Best,
> 
> Dave B.
> 
> 
> 
> On May 9, 2011, at 2:16 PM, DunbarX at aol.com wrote:
> 
>> When you say you want to drive the menuItems displayed by script, does that mean you never want to use the mouse at all? I made a workaround recently where I did something like this, and I am giving you a snippet for your examination. Make two buttons, one an ordinary one, and one a combo box. Put several choices into the combo. Place the comboBox so that the loc of its selection arrow is, say, "200,200". In the regular button script write:
>> 
>> 
>> on mouseUp
>>  click at "200,200"
>>  wait 50
>>  click at "175," && 225 + random(100)
>> end mouseUp
>> 
>> 
>> This should open the combo box and select a random line within it. You can trap a "menuPick" message inside the combo box. Not sure what you are doing, but this might give you a hint as to a possible method. HTH.
>> 
>> 
>> Craig Newman
>> 
>> 
>> 
>> 
>> 
>> 
>> -----Original Message-----
>> From: David Brooks <dbrooks at unlserve.unl.edu>
>> To: How to use LiveCode <use-livecode at lists.runrev.com>
>> Sent: Mon, May 9, 2011 2:14 pm
>> Subject: Menu Buttons
>> 
>> 
>> I am trying to create a series of "helps" where I step a user through a process 
>> using the underlying tool. I have one "help" field that variously shows, hides, 
>> fills, and moves around.
>> 
>> The scripts "say" things (aural feedback).
>> 
>> There is a "pointer" button that locates as needed, flashes, and shows/hides.
>> 
>> Here's my problem. Suppose I have a menu button that affords several choices. In 
>> my application, I can click the button, move among the choices from a list that 
>> is displayed -- with a choice automatically hiliting as I move around (hovering) 
>> in the list, and then click to make the hilited choice. 
>> 
>> I want to drive that from a script. Is there an easy way? The list seems to 
>> behave like some sort of modal stack that I must deal with. That is, if I create 
>> a script that pops out the list, that list behaves as I would expect -- FROM 
>> MOUSE ACTIONS -- but I haven't found scripting that leads to the same effects. I 
>> suppose I could capture images and use these AS IF they were the real thing, but 
>> then I'd have less flexibility than if I did this from scripts. 
>> 
>> Should I simply redesign things such that buttons display fields and try to go 
>> from there? I seem to be able to get that approach to work from scripts, but it 
>> seems cumbersome.
>> 
>> Thanks in advance for your help.
>> 
>> Dave B.
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at 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 at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list