Prob with that method is if you fail on one of the subcombines your macro goes to hell
You need to get the subcomponents in factory crates, even then you can only do 1 run until one of the crates runs out beacause the order of your resources in your inventory then changes and once again your macro goes to hell.
The only real 'Solution' to this would be to write a script to do it. Keeping track of whats is where in your inventory window will still prove problematic though. The best solution to this would be a crafting plugin that has functions that can loacate something in your inventory and put your mouse in the correct location to double click. Your getting into some serious memory scanning and decompiling then though and I for one aint smart enough to do that.
In short Get factory components for subcombines. Only loop your macro until it runs out of one of the subcomponents.
Or learn assembler and get a copy of a good debugger/decomplier and figure out how the write the plugin.
Sorry if thats not much help but XU is really only best at producing large runs of simple products or grinding the same thing in practice mode. Mass producing Stim B's is better done in a factory.