Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Intelligent

macrumors 6502a
Original poster
hey guys I've been sitting here for 6678 hours trying to make my app, how do i make an action that allows me to press a button so it performs an applescript,
on myButtonHandler_(sender)
doesn't work and I've tried ALL combinations.
 
More information would be helpful - that looks like it might be an AppleScriptObJC action handler, so if it is connected to a button, the statements in the handler will be run when the button is pressed.
 
More information would be helpful - that looks like it might be an AppleScriptObJC action handler, so if it is connected to a button, the statements in the handler will be run when the button is pressed.

Sorry 🙁 but could you try to explain it a bit better, english is not my main language its a applescript cocoa. The problem is i can't connect it to the button.

on myButtonHandler_(sender)
my script
end

Im not even a bad developer (okay some people would say otherwise) or a newbie of any sort, i just can't figure out why this doesn't work 🙁 and if i find out how to do this can you tell how to have multiple buttons run different scripts?
 
Last edited:
Okay i found it out i never did selector to appdelgate, anyways, how do i do multiple scripts?

EDIT: i figured that out to i just named it to onmybuttonhandler2.
 
Here you go.

Send a shell command through myButtonHandler_
Code:
osascript -e <your apple script code here>
<your apple script code here> is your apple script code (ex: display dialog ...)
Garret Stand
OS X 10.5.8 leopard
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.