Binding an AppleScript to a button in OS X
You can drag and drop an AppleScript (script and application) to the Finder toolbar, which places the icon for the AppleScript in the toolbar just like any other button (though I prefer the menu bar's AppleScript menu for such things because I can have more scripts available in a smaller space). I don't think you can create a button out of nothing and bind an AppleScript to it, however.