Not exactly that but the best i think you could do for this is
macro 1 - The one that goes on your spamming button
/click <button 1>
/click <button 2>
/click <button 3>
macro 2 - Sits on <button 1>
/castsequence <reset=1> Spell 1,,
macro 3 - Sits on <button 2>
/castsequence <reset=1> ,Spell 2,
macro 4 - Sits on <button 3>
/castsequence <reset=1> ,,Spell 3
The only thing you would need to do is ensure you hit the button at least 3 times everytime you hit it. That way if you take a couple of seconds off and spell 1 is still on cooldown then spell 2 will cast. But if spell 2 is also on cooldown then spell 3 will still go off.
By the same token spamming it constantly will always cast the spells in order Spell 1, Spell 2, Spell 3. Sometimes you will be quite unlucky with timing and spell 1 will come off cooldown just after your sequence trys to cast it, but nothign you can do about that.
As for your tanking macro that just sounds like a straight cast sequence, but like the DPS one above if you break it down into a /click and /castsequence set then it wont get hung up on spells on cooldown as long as you press the key at least as many times as you have spells each time.
Connect With Us