Using Numbers & [] to update a progress bar
Posted: Wed Mar 06, 2013 8:59 pm
I have 15 buttons selecting channels on a TV, each button looks like the channel icon. The commands they send are, for example:
0.0 Exit
0.5 Digit 1
1.0 Digit 0
1.5 Digit 1
I want a progress bar to run across the relevant channel icon as the command is executing. I have set up a Number, number_favourite1_progress, with custom actions to set the value of a various Flags, flag_favourite1_progress and then a percentage. This Flag determines whether & which progress icon is displayed over the channel icon button by virtue of the Reveal settings (but only for favourite1 at the moment).
So the new commands on the buttons are:
0.0 number_favourite1_progress=1 (Group flag_favourite1_progress=OFF, flag_favourite1_progress_0%=ON)
0.0 Exit
0.5 number_favourite1_progress=33 (Group flag_favourite1_progress=OFF, flag_favourite1_progress_33%=ON)
0.5 Digit 1
1.0 number_favourite1_progress=66 (Group flag_favourite1_progress=OFF, flag_favourite1_progress_66%=ON)
1.0 Digit 0
1.5 number_favourite1_progress=100 (Group flag_favourite1_progress=OFF, flag_favourite1_progress_100%=ON)
1.5 Digit 1
2.00.0 number_favourite1_progress=0 (Group flag_favourite1_progress=OFF)
Question1:
I initially set up the channel Button, then progress Images (that are the same size as the button, but mostly transparent) immediately on top of one another as it were, but the Images do not show on execution. Moving the Button from 'underneath' the Images, to a different part of the screen proves that the progress bar is progressing when the button is pushed.
Buttons always appear on top of Images?
Question2:
If I want to do this for all 15 channel favourite buttons I will need to create 15 Numbers (number_favourite1_progress, number_favourite2_progress...), one for each favourite, 15 Groups of Flags (flag_favourite1_progress, flag_favourite2_progress...), each with four Flags in, and then set up 4 custom feedback actions for each of the 15 Numbers...
Is there a way, using the [] identifier that the commands for pushing the favourite 6 button could be something like:
0.0 number_favourite_pushed=6
0.0 number_favourite[number_favourite_pushed]_progress=0
0.0 Exit
0.5 number_favourite[number_favourite_pushed]_progress=33
0.5 Digit 1
1.0 number_favourite[number_favourite_pushed]_progress=66
1.0 Digit 0
1.5 number_favourite[number_favourite_pushed]_progress=100
1.5 Digit 1
2.0 number_favourite[number_favourite_pushed]_progress=0
2.0 number_favourite_pushed=0
So I guess that question is can I use a Number to set a Number? Or perhaps I need to use a Number to set a Label. I am lost in logic!
Many thanks in advance.
Rex
0.0 Exit
0.5 Digit 1
1.0 Digit 0
1.5 Digit 1
I want a progress bar to run across the relevant channel icon as the command is executing. I have set up a Number, number_favourite1_progress, with custom actions to set the value of a various Flags, flag_favourite1_progress and then a percentage. This Flag determines whether & which progress icon is displayed over the channel icon button by virtue of the Reveal settings (but only for favourite1 at the moment).
So the new commands on the buttons are:
0.0 number_favourite1_progress=1 (Group flag_favourite1_progress=OFF, flag_favourite1_progress_0%=ON)
0.0 Exit
0.5 number_favourite1_progress=33 (Group flag_favourite1_progress=OFF, flag_favourite1_progress_33%=ON)
0.5 Digit 1
1.0 number_favourite1_progress=66 (Group flag_favourite1_progress=OFF, flag_favourite1_progress_66%=ON)
1.0 Digit 0
1.5 number_favourite1_progress=100 (Group flag_favourite1_progress=OFF, flag_favourite1_progress_100%=ON)
1.5 Digit 1
2.00.0 number_favourite1_progress=0 (Group flag_favourite1_progress=OFF)
Question1:
I initially set up the channel Button, then progress Images (that are the same size as the button, but mostly transparent) immediately on top of one another as it were, but the Images do not show on execution. Moving the Button from 'underneath' the Images, to a different part of the screen proves that the progress bar is progressing when the button is pushed.
Buttons always appear on top of Images?
Question2:
If I want to do this for all 15 channel favourite buttons I will need to create 15 Numbers (number_favourite1_progress, number_favourite2_progress...), one for each favourite, 15 Groups of Flags (flag_favourite1_progress, flag_favourite2_progress...), each with four Flags in, and then set up 4 custom feedback actions for each of the 15 Numbers...
Is there a way, using the [] identifier that the commands for pushing the favourite 6 button could be something like:
0.0 number_favourite_pushed=6
0.0 number_favourite[number_favourite_pushed]_progress=0
0.0 Exit
0.5 number_favourite[number_favourite_pushed]_progress=33
0.5 Digit 1
1.0 number_favourite[number_favourite_pushed]_progress=66
1.0 Digit 0
1.5 number_favourite[number_favourite_pushed]_progress=100
1.5 Digit 1
2.0 number_favourite[number_favourite_pushed]_progress=0
2.0 number_favourite_pushed=0
So I guess that question is can I use a Number to set a Number? Or perhaps I need to use a Number to set a Label. I am lost in logic!
Many thanks in advance.
Rex