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

Jim Ault jimaultwins at yahoo.com
Thu Mar 4 14:20:43 EST 2010


Try this---------------------
on changeScripts
    put "new script lines" into baseScript
    repeat with k = 1 to the number of cards
       repeat with m = 1 to the number of controls
          get word 1 of the short name of control m
          if char 1 of IT = "d" and char 2 to -2 of IT < 101 then
             get "--" & the short date && the short time
             get IT & cr & baseScript
             set the script of control m to IT
          end if
       end repeat
    end repeat
end changeScripts

Hope this helps

On Mar 4, 2010, at 10:46 AM, William de Smet wrote:

> 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.
>

Jim Ault
Las Vegas






More information about the use-livecode mailing list