Group/Ungroup by script

Peter Haworth pete at mollysrevenge.com
Thu Feb 17 23:16:25 EST 2011


Thanks Jacqueline, I knew there would be an easier way!  Does that work if the group doesn't yet exist?  I know that wasn't in my original post but it is something I  need to account for.

Pete Haworth

On Feb 17, 2011, at 7:10 PM, J. Landman Gay wrote:

> On 2/17/11 7:59 PM, Peter Haworth wrote:
>> I have a need to add a specific control to an existing group.  The following works but I'm curious if there's a better/easier way?
>> 
>> select group "Test"
>> put "group " into mycommand
>> repeat for each line myId in the selectedObjects
>>  	 put myID&&  "AND " after mycommand
>> end repeat
>> put the long ID of button "Button" after myCommand
>> do myCommand
> 
> Try:
>  copy control 1 to grp x
> 
> Substitute a control reference for "control 1".
> 
> If you don't need the original control after it's been copied to the group, delete it.
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> 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