you might get different codes from the same button for a couple different reasons.
First reasons is that the signal is no strong enough, you are not aiming properly, batteries are low, or there is other IR interference which is interfering with the signal (like from an LCD TV).
The second reason is that the code from the remote you are pressing is actually intended to alternate between different codes.
If it is the second situation and it is happening in a predictable way, maybe you should just add all the possible code events for that button to the macro you want to trigger. i.e. Drag them all over to the macro you want to trigger.