I'm trying to delete some cards of a stack with the char "-" in their name.
Example of names of cards to delete: "ach-pach" or "ach-rach", etc.
Here is the code:
Code: Select all
repeat with bb = 1 to the number of cards
put the short name of card bb into tName
if tName <> "premiereCard" then -- we keep always the card where the script is running
get offset("-",tName)
if IT > "0" then -- "al-mal" for example
delete card tName
end if
end if
end repeat

Now I get an error which says that it can't find the card "uz" for example.
And this card has no "-" in its name ?!?

Any idea what's wrong in that code ?
Thanks in advance, Jean-Paul.