More groups

Klaus Major k_major at os.surf2000.de
Thu Feb 27 18:05:00 EST 2003


Hi Ken,

> Hi everyone,
>
> I'm not quite sure how to do this:
>
> I want to group of buttons which are already made and not in a 
> particular
> order (as in 1-40). Doing them by hand is wonky and time consuming,
> Sometimes it misses, or I accidenatally mess up the position or size, 
> too,
> and have to fix it.
>
> So, I want to just make a list of stuff that I want grouped with 
> background
> behavior, but I'm not sure how to script it. Actually, I'd like to 
> make a
> little temporary UI to do these types of things. In this case, though, 
> I
> just need a temporary button with a script to do what I want.
>
> Advice from the masters?
>
> TIA,
> Ken N.

supposed you have a list (field or var) of elements you want to group 
like:

field 3
field 2
button 2
button 3
...

Then you can script (i have a field here):

on mouseUp
   repeat for each line l in fld 1
     put l && "and " after mylist_to_group
   end repeat
   delete word -1 of mylist_to_group
   do "group" && mylist_to_group
   ## do what you want to -> group -1
   ## :-)
end mouseUp

Tested and works :-)

Hope that helps...


Regards

Klaus Major
k_major at os.surf2000.de




More information about the use-livecode mailing list