For what it's worth... This doesn't give you any advantage and in fact can and will fail on you quite frequently.

If I am understanding what you want is a button that when pressed the first time will send F1 and when pressed additional times within X seconds will send F2. Leaving spells and abilities out of this to avoid confusion.

Why will this fail?

F1 is your HOT spell you wish to apply, F2 is your heal spell...

You happen to be spell locked when you press F1, the spell fails. You are not hotted for the duration and in this configuration you are unable to hit F1 again.

If GCP has the ability to tell if F1 was successfully cast and make a decision it's already violating TOS (I don't believe this is the case) so the addition of this functionality actually limits you more.

A similar functionality to this would be a key that when pressed sends F1 then for 10 more presses sends F2. Spamming this button @ 1 press per second would have the same effect as what you are describing and is certainly not a violation of the TOS - the ONLY difference is you are adding a timed duration. The functionality without a timer is able to be accomplished within the native UI as it stands (Macrosequence by Cogwheel) but not with a timer.