Need help with script please

i do not know how to make a script for autohotkey to basically press 1 for as long as a i hold it down for an amount of time or per second. i just need a basic script but also prevent the max press interval from popping up