Question and was trying to do the same type of thing...
I have a text field with a number in it and depending on that number (1-8) I want 8 buttons to either be on/off using SetImageVisible.
I have this script but it doesn't seem to do anything and wondering if someone can help. Basically if it finds the text field with 6, then buttons 1-6 are on and 7-8 are off. Scorebug is the template. RedRocks.text is the text field with the number and button1.Source is the image. I would continue this for "1" through "8" with each having the End If. I only put the first 3 sections on here but you get the idea.
If Input.Find("scorebug.gtzip").Text("RedRocks.Text") = "8" Then
API.Function("SetImageVisibleOn", "scorebug.gtzip","button1.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button2.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button3.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button4.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button5.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button6.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button7.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button8.Source")
End If
If Input.Find("scorebug.gtzip").Text("RedRocks.Text") = "7" Then
API.Function("SetImageVisibleOn", "scorebug.gtzip","button1.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button2.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button3.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button4.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button5.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button6.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button7.Source")
API.Function("SetImageVisibleOff", "scorebug.gtzip","button8.Source")
End If
If Input.Find("scorebug.gtzip").Text("RedRocks.Text") = "6" Then
API.Function("SetImageVisibleOn", "scorebug.gtzip","button1.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button2.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button3.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button4.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button5.Source")
API.Function("SetImageVisibleOn", "scorebug.gtzip","button6.Source")
API.Function("SetImageVisibleOff", "scorebug.gtzip","button7.Source")
API.Function("SetImageVisibleOff", "scorebug.gtzip","button8.Source")
End If