Beginner question?

When i use macros and ahk to spam 1 button i can get banned?

as long as you are pressing the button (spamming with no programs doing it for you) then you do not get banned
if you use a program to do the spamming for you then if you get caught you can get bannend. As far as I know

Blizzard are “OK” with it if its 1 button 1 action.

If you set up AHK to do more than 1 action per button press or create a toggle to say press 1 hold for 5 seconds then press 2 after it then they “May/Do” class that as automation which would be against their TOS and you may be banned for it.

hmm i use ahk script to spam 1 when i hold down key it bannable? It only spam 1 for me nothing else.