Shao Sean shaosean at wehostmacs.com
Fri Aug 5 02:18:27 EDT 2011

You can always use the cantDelete property for the master form cards..


# only run this after setting the cantDelete property to TRUE on the  
cards you want to keep
# every other card will be deleted, so exercise caution..

lock messages  -- suppresses the deleteCard message
repeat for each line tCardID in the cardIDs of stack "yourStackNameHere"
     delete card id tCardID of stack "yourStackNameHere"
   catch tErr
   end try
end repeat
unlock messages

The try statement allows you to run the delete command on the cards  
that have the property set to true and not have the script stop to  
post an error saying that the card cannot be deleted..

More information about the Use-livecode mailing list