The key to making a macro work properly is timing, so you may have to fiddle with the hold down times a bit:
Press Left Shift key and hold for 0,03 seconds and release
Press Left Shift key and hold for 0,03 seconds and release
Press Left Shift key and hold for 5 seconds and release
I don't know how the afterburner works exactly, but if you have to hold down the shift key as long as you'd like it to fire, you can have one command press the key and hold it indefinitely, with another releasing it:
"Afterburner"
Press Left Shift key and hold for 0,03 seconds and release
Press Left Shift key and hold for 0,03 seconds and release
Press down Left Shift key
"Resume cruise"
Release Left Shift key