Change button icon

How do you change the icon of a button using applescript? Or tell it to use it’s alt icon?

First, get to know the AppleScript Studio Terminology Reference online:

http://developer.apple.com/documentation/AppleScript/Reference/StudioReference/sr1_about/chapter_1_section_1.html#//apple_ref/doc/uid/20011215

===

set icon of theButton to “dragonmonkey”

… where dragonmonkey is the name of the icon file you’ve added to your project.