It's a 3 option macro which could be used often.
You can buy 1000 units by executing this macro when pressing Ctrl key, 20 units when pressing Alt key. And default quantity is 100 units.
Code:
/run C={GetCursorInfo()}if C and (C[1]=="merchant")then a=100;if IsControlKeyDown()then a=1000;end;if IsAltKeyDown()then a=20;end;BuyMerchantItem(C[2],a)PickupMerchantItem(C[2])end