Using the new features in GSE you can now only cast a spell when it becomes instant.
/cast [nochanneling] Frostbolt /click pause 1.7 /cast Flurry /click pause 0.1 /stopcasting /cast [nochanneling] Ice Lance /click pause ~~GCD~~ /cast Frozen Orb
What this does is pauses after the frostbolt and then casts Flurry. If flurry is instant it just moves on but if it isn’t it waits 1/10th of a second then stops casting and moves on to the next thing.
The pause at the top protects the frostbolt cast from being clipped by the /stopcasting. If the ability was an instant instead you could replace it with
/click pause ~~GCD~~