# AppleScripts running with NSButton?



## qbkd10 (Dec 8, 2007)

Would it be possible to link a button in an IB project to an AppleScript? Thanks in advance.


----------



## Viro (Dec 8, 2007)

This is how you'd call Applescript from Cocoa. http://www.cocoadev.com/index.pl?CallAppleScriptFunction

So make a Cocoa app like normal, and in the outlet connected to the button you can use the code described in the linked article to call your applescript.


----------



## qbkd10 (Dec 8, 2007)

Anything more simple?


----------

