Script problem

Charles Szasz cszasz at me.com
Wed Oct 24 11:41:44 EDT 2012


I am using the following script to retrieve the labels of checked checkboxes on marked cards and put them in the field "recommendations". The labels are custom properties (uMyLabel).  The script works fine but I am getting five blank lines in recommendations field before the first checkbox label is inserted in the field.   

Any suggestions? 

on mouseUp 
    
   repeat with y = 1 to the number of cards of stack "MyStack" 
      if the mark of card y of stack "MyStack"= true then 
         put the number of buttons of card y of stack "MyStack"into nbr 
         repeat with n = 1 to nbr 
            if the style of button n of card y of stack "MyStack" is "checkbox"\ 
                  and the hilite of button n of card y of stack "MyStack" is true then 
               put the uMyLabel of button n of card y of stack "MyStack" into tName 
               put tName & cr after theList 
            end if 
         end repeat 
      end if 
   end repeat 

  delete char -1 of theList 
  put theList into field "recommendations"

Charles Szasz
cszasz at mac.com







More information about the use-livecode mailing list