Play/Pause button

Hi, I'm trying to make a button that controls foobar from RocketDock, I have all the buttons I want so far, but I want one that changes between a play symbol and a pause symbol when I click it, but I can't figure out how to do it. It would be ace if I could get it to ask foobar what the play status is (rather than just switching between play and pause every time it's pressed)- I should be able to do that as I have the COM Automation component for foobar, but I just can't figure it out!

Any help is much appreciated! Thanks.

#482590