What "key" are you wanting to spam?
PHP:
<HBProfile>
<QuestOrder>
<While Condition="true" >
<CustomBehavior File="Misc\RunLua" Lua="ActionButton1:Click();" WaitTime="1000" />
</While>
</QuestOrder>
</HBProfile>
The above code if pasted into a xml and loaded+ran through the Questing botbase will make the bot spam your first button endlessly while waiting 1 second between spams.
If you'll note it says: ActionButton
1.
1 is your first button whereas 2, 3, 4, -etc are the other buttons in sequential of your spell bar starting from the left.
You could also add multiple button spams per loop.
This would make it spam two buttons at once.
<CustomBehavior File="Misc\RunLua" Lua="ActionButton1:Click(); ActionButtion2:Click();" WaitTime="1000" />
This would make it spam one button, wait 1 second, then spam another button, wait 1 second.
<CustomBehavior File="Misc\RunLua" Lua="ActionButton1:Click();" WaitTime="1000" />
<CustomBehavior File="Misc\RunLua" Lua="ActionButtion2:Click();" WaitTime="1000" />
The times are in milliseconds. So 1000 milliseconds = 1 second.