How do I change the script for 100 buttons in one time?

Jacques Hausser jacques.hausser at unil.ch
Thu Mar 4 14:05:00 EST 2010


Hi William

A good case for using behaviors ! Set the script of an hidden btn "BCommonScript" as you want and then put somewhere in the opening process of your stack:

repeat with i = 1 to 100
   put "d" &i into tButtonName
   set the behavior of btn tbuttonName to the long ID of button "BCommonscript"
end repeat

Jacques

Le 4 mars 2010 à 19:46, William de Smet a écrit :

> Hi there,
> 
> I have a stack with 100 buttons in it and they all have the same script.
> The buttons are called "d1" to "d100".
> 
> How do I change the code for all of them in one time?
> I don't feel like copy/paste 100 times.
> 
> Thanks!
> 
> Greetings,
> 
> William
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

******************************************
Prof. Jacques Hausser
Department of Ecology and Evolution
Biophore / Sorge
University of Lausanne
CH 1015 Lausanne
please use my private address:
6 route de Burtigny
CH-1269 Bassins
tel/fax: 	++ 41 22 366 19 40
mobile:	++ 41 79 757 05 24
E-Mail:	jacques.hausser at unil.ch
*******************************************




More information about the use-livecode mailing list