I have a livecode project with five cards. First card has one label "label1", Second card has two labels "Greeting" and "Word", Third card has a button "button1", Fourth card has a textbox "text1", and the fifth card has a label "HelloWord".
My goal is to display "Hello" to all controls mentioned above.
I have this code in every card
Card 1
on openCard
put "Hello" to field "label1"
end openCard
Card 2
on openCard
put "Hello" to field "Greeting"
put "Hello" to field "Word"
end openCard
Card 3
on openCard
put "Hello" to button "button1"
end openCard
Card 4
on openCard
put "Hello" to field "text1"
end openCard
Card 5
on openCard
put "Hello" to field "HelloWord"
end openCard
Mainstack
on openStack
go to card "card1"
go to card "card2"
go to card "card3"
go to card "card4"
go to card "card5"
end openStack
These codes are working.
But I want the program to execute those on openCard
scripts in every card on startup without going to another card.
I tried to execute those scripts in on openStack
(without go to card
scripts) but I got an error. The error says "can't find handler".
How can I do that?