most items you can add events on.
if you've added a button to the screen, click(select it) on it
go to "Window -> Script Editor"
it will pop up on the top.
once your item is selected you'll see different events in the drop down, in the scripting window, top left, and language selection on the top right.
I always use "JavaScript and Both" as my selections.
good luck!
hope that'll help to get you started.
sample you can use for your button is:
app.alert("i clicked it")
under the "click" event.