Running a set programme

how do i get the small bit of code to run with just an instantaneous press if the button.

There really is no such thing as an instantaneous press of a switch. The switch will be pressed for a while. What you need to do is make sure that you get around to reading the switch while it is pressed. That means no delay() calls anywhere in this mysterious code of yours.