A way to only cast a spell when it is procced?

Is there a way to only cast a certain spell when it is procced? i.e. a firemages Pyroblast?
I am trying to write the start of a macro, and for obvious reasons, i want to spam fireball, until a hot streak / pyro proc comes up.