Inventory Item's freezing from macro

Hello,
I’ve recently come across several upgrades for my offhand weapon, and with that, I wanted to be able to seamlessly cycle them into my combat rotation while raiding. Because two of weapons have the same item:id & enchant, I had to resort to using item slot manipulation. I made some macros that seemed almost perfect for what I needed, and when tested outside of combat, I had no issues. However when tested in combat, the first item in bagslot (4,3) becomes frozen, it cannot be equipped, selected or swapped. It becomes a dead slot in my container, and even after reloading, remains so. The only solution I found was so to relog, which is inconvenient.

These are the macros:

#showtooltip 17
/click MultiBarRightButton6
/stopmacro [mod:alt]
/run PickupInventoryItem(17) if CursorHasItem() then PickupContainerItem(4,3) end;

#showtooltip 4 3
/stopmacro [nomod:alt]
/run PickupContainerItem(4,4) if CursorHasItem() then PickupContainerItem(4,3) end;
/run ClearCursor()

I ended up using two macro’s due to this clause about the API which I found on Wowwiki’s item equipping webpage:

“There is a problem when executing multiple Pickup commands because they execute instantaneously on your client, which is not always synched with the server.”

To work around the issue of having to perform two actions, I used my external mouse software to make a macro that would play the first macro, and then shortly after, do the exact same thing except with the alt modifier. That way I could always have my next weapon que’d up and ready to go, and also having a perfect cycle.

Originally I created a support ticket, and reported a bug, however my response was to seek out advice here. So I suppose, is there a non-addon method of getting this to work? Does anyone know what the minimum delay between these item macro’s should be, in order to prevent this locking issue?

Or am I at a dead-end?

PickupInventoryItem is partially protected. You’ll get that bugged/locked behavior when attempting to equip a weapon via PickupInventoryItem in combat.

/equipslot 17 4 3

will achieve in combat (and out) what

/run PickupInventoryItem(17) if CursorHasItem() then PickupContainerItem(4,3) end;
does out of combat.

Unfortunately doing

/equipslot 17 4 3
/equipslot 16 4 4

will only swap one weapon in combat.

There are so many annoying minor bugs like this in the game it gets frustrating at times. (edit: and I found a new one experimenting with these. On same itemID they can wig our regardless. Blizzard get your act together!)

Wow okay, thank you.

Changing the macro to:

#showtooltip 17
/click MultiBarRightButton6
/stopmacro [mod:alt]
/equipslot 17 4 3

#showtooltip 4 3
/stopmacro [nomod:alt]
/run PickupContainerItem(4,4) if CursorHasItem() then PickupContainerItem(4,3) end;
/run ClearCursor()

solved everything, just that one line.

THANKS again