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

Intelligent

macrumors 6502a
Original poster
Aug 7, 2013
922
2
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.
 

Red Menace

macrumors 6502a
May 29, 2011
578
226
Colorado, USA
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.
 

Intelligent

macrumors 6502a
Original poster
Aug 7, 2013
922
2
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:

Intelligent

macrumors 6502a
Original poster
Aug 7, 2013
922
2
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.
 

MacMaster1000

macrumors newbie
Jul 24, 2014
7
0
Private!
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.