Hi,
I am a complete beginner and am trying to create an ebook with Livecode. It looks simple enough (at least for now...) but I need a quick way to rename all the cards already created into Page 1, Page 2, etc. For now, the only thing I can do is click a card window, then click the Object>Card Inspector menu to display the Card data in the Inspector Window, change the name, then go to the next card, click the Object>Card Inspector menu to display the Card data in the Inspector Window, change the name, etc. Is there a fastest way or a plug-in to do that more quickly?
Renaming a batch of cards
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Renaming a batch of cards
Glyphs...
To see this work... make a stack and add a number of cards to it... make a button on the first card and add the script below to it... it will then rename each card for you, in this case 'Card 1' ...2,3.. etc.
Look in the dictionary for an explanation of 'push' and 'pop'
be well
Dixie
To see this work... make a stack and add a number of cards to it... make a button on the first card and add the script below to it... it will then rename each card for you, in this case 'Card 1' ...2,3.. etc.
Code: Select all
on mouseUp
push card
put 1 into count
repeat for (the number of cards) times
set the name of card count to "Card" && count
add 1 to count
end repeat
pop card
end mouseUp
be well
Dixie
Re: Renaming a batch of cards
Hi Glyphs,
Welcome in this forum
For rename each cd "Card 1,Card 2 etc...
For rename each cd from a list of names (tnamesCd in this example)
All the best
Jean-Marc
Welcome in this forum
For rename each cd "Card 1,Card 2 etc...
Code: Select all
on RenameCD1 pName --••pName is a generic name
put the num of cds of this stack into nbCD
repeat with i = 1 to nbCD
set the name of cd i to pName&i
wait 1 milliseconds --•• good for the processor
end repeat
end RenameCD1
Code: Select all
on RenameCD2
put "Entry,summary,theme1,theme2"into tnamesCd--••or what you want
repeat with i = 1 to the num of items of tnamesCd
set the name of cd i to(item i of tnamesCd)
wait 1 milliseconds --•• good for the processor
end repeat
end RenameCD2
Jean-Marc
https://alternatic.ch
Re: Renaming a batch of cards
Thanks Dixie and Jean-Marc:) So, the only way to do this is by programming? No simple button in the interface to just display each card one by one or as a list, and rename all the cards by batch or individually without entering any line of code ? Maybe I should add this as a suggestion to RunRev...
Re: Renaming a batch of cards
Hi Glyphs,
Best
Jean-Marc
You can see all cds of stack and substack with the item "Application browser" of the menu "Tools"No simple button in the interface to just display each card one by one or as a list
Best
Jean-Marc
https://alternatic.ch