sending same command to multiple cards
Posted: Mon Apr 27, 2015 4:04 pm
Hi All,
I am a complete beginner, not just with LiveCode but with programming full stop. I've been trying to solve all my little problems myself, but may need some help with this. I'm sure there is a very simple solution.
I'm building an clinical health app, which has a number of scoring buttons which are doing identical jobs on multiple cards. All I want to do is create a "reset" button on the front screen to set the hilite of all the buttons to false.
It works as I have set out below, but is there a way of say listing all the cards on one line of script to save unwanted lines of script?
command startPressed
set the hilite of button "Importance0" on card "Goal1" to false
set the hilite of button "Importance0" on card "Goal2" to false
set the hilite of button "Importance0" on card "Goal3" to false
set the hilite of button "Importance0" on card "Goal4" to false
set the hilite of button "Importance0" on card "Goal5" to false
set the hilite of button "Importance0" on card "Goal6" to false
set the hilite of button "Importance0" on card "Goal7" to false
Any help will be much appreciated.
I am a complete beginner, not just with LiveCode but with programming full stop. I've been trying to solve all my little problems myself, but may need some help with this. I'm sure there is a very simple solution.
I'm building an clinical health app, which has a number of scoring buttons which are doing identical jobs on multiple cards. All I want to do is create a "reset" button on the front screen to set the hilite of all the buttons to false.
It works as I have set out below, but is there a way of say listing all the cards on one line of script to save unwanted lines of script?
command startPressed
set the hilite of button "Importance0" on card "Goal1" to false
set the hilite of button "Importance0" on card "Goal2" to false
set the hilite of button "Importance0" on card "Goal3" to false
set the hilite of button "Importance0" on card "Goal4" to false
set the hilite of button "Importance0" on card "Goal5" to false
set the hilite of button "Importance0" on card "Goal6" to false
set the hilite of button "Importance0" on card "Goal7" to false
Any help will be much appreciated.