Run automaticly instead of button

I made a short script that runs on the press of an image… How can I make one that runs automatically?