what you are doing is trying to get your app to do it’s thing using the “Title” of theObject, ie" the title of your button is “up”, the script below will address this.
on clicked theObject
if the title of theObject is "up" then
tell application "TextEdit"
activate
end tell
end if
end clicked
You could also goto Inspector applescript, and put “up” in the “Name” area their, and use the script below to have your app do it’s thing,
on clicked theObject
if the name of theObject is "up" then
tell application "TextEdit"
activate
end tell
end if
end clicked
Exactly, name and title are 2 different things. I prefer to use name. To use name click your object in IB, go to the applescript inspector and just above where you checked of clicked, there is a text field where you “name” your button. Naming it allows you to change the title of the buttons whilst always retaining the same name. This will help you create much tidier code.