I'm trying to delete several cards in a repeat loop. I have no syntax error but when the script runs, I get an error message which says :
"(repeat: error in 'with' end condition expression), char 1" ???
My code is this one below:
Code: Select all
lock screen
repeat with bb = 1 to the number of card of this stack
get name of last card of this stack
if IT <> laLimiteToDelete then -- laLimiteToDelete is the name of a card from which I stop deleting
delete last card of this stack
end if
end repeat
unlock screen
Code: Select all
delete card IT of this stack
I must say that I don't run the script from the last card of the stack, but from the first one.
The card "laLimiteToDelete" is the third one of the same stack.
Do you understand what's wrong with that code ?
Kind regards.