I've written a recursive function to set a custom property of all cards in my stack. Here's a snippet of the longer function:
Code: Select all
put the cardnames of this stack into tCardList
repeat with cardIndex = 1 to the number of lines in tCardList
put line cardIndex of tCardList into tCard
if the myPageTitle of card tCard is empty then
set the myPageTitle of card tCard to "standard"
end if
end repeat
Now, it all goes as intended, as long as no card has the default name "card id xxxx". If there's such a card, the following error pops up:
Code: Select all
button "Button": execution error at line xx (Chunk: can't find card), char xx
(xxs are mine as the previous code is just a snippet)
Is there any workaround to this?
Thanks!!