Probaby my problem is quite easy for the majority of you but still it is a problem for me.
I have 2 sets of buttons or 2 rows of buttons if you prefer.
PRV1 PRV2 PRV3
PGM1 PGM2 PGM3
Only ONE button from each row can be pressed every time.
Also there is also a button called TRANS.
I need by pressing the TRANS button to swap the mouseUps betwen the 2 rows. For example If PRV1 and PGM3 were pressed, I need to send mouseUp to PGM1 and PRV3.
bellow is the code from one button from PGM row, it is the same for every other button
Code: Select all
global gVarPgm
on mouseUp
put "PGM2" into gVarPgm
set the textcolor of me to "yellow"
set the textcolor of button "PGM1" to "BLACK"
set the textcolor of button "PGM3" to "BLACK"
set the backgroundcolor of me to "RED"
set the backgroundcolor of button "PGM1" to "WHite"
set the backgroundcolor of button "PGM3" to "WHite"
end mouseUp
Code: Select all
on mouseUp
global gVarPrv
put "prv3" into gVarPrv
set the backgroundcolor of me to "green"
set the backgroundcolor of button "PRV1" to "WHite"
set the backgroundcolor of button "PRV2" to "WHite"
end mouseUp
bellow is the code from TRANS button
Code: Select all
global gVarPrv
global gVarPgm
on mouseUp
set the backgroundcolor of me to "YELLOW"
if gVarPrv = "prv1"
then send "mouseUp" to button "PGM1"
else if gVarPrv = "prv2"
then send "mouseUp" to button "PGM2"
else if gVarPrv = "prv3"
then send "mouseUp" to button "PGM3"
if gVarPrv = "pgm1"
then send "mouseUp" to button "PRV1"
else if gVarPrv = "pgm2"
then send "mouseUp" to button "PRV2"
else if gVarPrv = "pgm3"
then send "mouseUp" to button "PRV3"
end mouseUp
Thank You all in advance