If you put any delay at all in there, the device will expect to see the code from the beginning and you'll lose all cumulative repetitive effect.
I ran into this years ago with a Pronto and a JVC projector.
Someone here said to do this:
Learn the command and name this ON A
Next, learn a different part of the command this way, and practice first:
*put your hand in front of the projector remote.
*start the LEARN with the Pronto
*push and hold the power button on the remote
*after about 1/4 second, remove your hand and let the Pronto learn what's coming out of the remote. Name this one ON B.
Make a macro of ON A followed by several ON Bs. Put no delays in between. With the JVC projector, it took eleven Bs to have a bulletproof command.