Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > AppleEvents in Cocoa

AppleEvents in Cocoa
Thread Tools
Mac Enthusiast
Join Date: Nov 2001
Status: Offline
Reply With Quote
Jan 17, 2002, 10:35 PM
 
After searches on the internet and past threads, I still have not found how to send an AppleEvent from Cocoa. I need to execute the following AppleScript command:
tell application "My App" to «event tlBTrcBK» given «class btNM»:"My Parameter"
Other than sending the event directly using Obj-C code, I also considered executing a terminal command, "osascript -e '[code]'", which I know how to do. However, in that case, I would need to know how to escape double crochets in the terminal.

Thanks for the help!
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Jan 18, 2002, 04:11 PM
 
People have shown how to do this on macosx-dev, I think, it involves calling the OSAScript API (which is in Carbon).
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:45 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2