Hi William First off - the send is outside the repeat but I assume that's an error in transcribing to the email.
but this works on mouseUp local gone, x repeat with x= 1 to the number of images of this card if the short name of image x is "ticket" then put the id of image x into gone delete image ID gone end if end repeat end mouseUp the name gives "image ticket" so it will never succeed. Lagi On 17 January 2018 at 22:25, William de Smet via use-livecode < use-livecode@lists.runrev.com> wrote: > Hi there, > > I have several cloned images and all have the same name: ticket. > Of course there ID is different. > On close card I want to delete them. > How do I delete them all at once? > Wat is wrong with this code? > > on mouseup > repeat with x= 1 to the number of images of this card > if the name of image x is "ticket" then put the ID of image x into GONE > end repeat > send ("delete GONE") to me in 0 ticks > end mouseup > > > > > greetings, > > William > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode