Hi Liam,
I'm coming to the party late, but here's another way to streamline your
code. If you're open to changing the button names, why not change them
to their corresponding values of 'it'? For example, the label of btn
"AB" would be "NextTrack" according to your original code.
If the text on the button communicates something to the user, you can
set the labels of the buttons to display whatever text you wish on the
button itself.
Then your code can be reduced to a single line:
send "mouseUp" to btn it -- no need for an 'if' now
Just another approach... Thanks -
Phil Davis
liamlambert wrote:
how do I write this in a switch statement or is there a better way
to write it
if it contains JK then send mouseUp to button "NextTrack"
if it contains AB then send mouseUp to button "NextTrack"
if it contains JL then send mouseUp to button "playpause"
if it contains JM then send mouseUp to button "back"
if it contains GK then send mouseUp to button "1"
if it contains HK then send mouseUp to button "2"
if it contains IK then send mouseUp to button "3"
if it contains GL then send mouseUp to button "4"
if it contains HL then send mouseUp to button "5"
if it contains IL then send mouseUp to button "6"
if it contains GM then send mouseUp to button "7"
if it contains HM then send mouseUp to button "8"
if it contains IM then send mouseUp to button "9"
if it contains HN then send mouseUp to button "10"
if it contains "IN" then send mouseUp to button "11"
if it contains GN then send mouseUp to button "12"
thanks
Liam L.
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution