applescriptappleevents

sending Apple event to console application


I have console app named "MyApp" it is running and I see it in the activity monitor.

I'm writing in AppleScript Editor the script:

tell application "MyApp"

display dialog "Hello World"

end tell

When running the script the editor asks me where is MyApp? And it doesn't appear in the list it shows. When I'm trying to brows it's location, I can't select MyApp's bundle. How can I deal with it? Thanks!


Solution

  • The solution I found is to addressing the bundle identifier and not the application name.

    tell application id "com.MyApp.app"
        display dialog "Hello World"
    end tell