Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3227146
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:32:25+00:00 2026-05-17T16:32:25+00:00

I was wondering if and in how many way an app can access specific

  • 0

I was wondering if and in how many way an app can access specific funcions of another app.
for example

  • open an url in safari/firefox/chrome
  • run a javascript in current browser-tab
  • play/pause itunes
  • rename selected files in Finder

I am aware of the existence of applescript but i was wondering if that’s the only way i have to interact with those apps and others

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T16:32:26+00:00Added an answer on May 17, 2026 at 4:32 pm

    There are three main ways an app exposes its function to the outside world.

    1. One is by supporting an URL protocol. To open an URL, just use NSWorkspace. There are many methods; if an app registers a specific protocol like x-my-app://some-work, you can just do

      [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"x-my-app://some-work"] ];
      

      If you want to open an URL whose protocol (say http) is supported by many apps and if you want to specify which app to use, use openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers:
      .

    2. Another is the System Services. With this, an app can add entries in the Service menu and in the context menu of other apps; you can also call it programmatically.

    3. Otherwise, it’s via Apple events. Applescript is one way to deal with them, but not the only one. It’s just a language to issue Apple events. There are many ways to deal with Apple events from Cocoa, see this detailed document by Apple.

      Basically, an app can export its internal as an object-oriented manner (which is not just its Objective-C hierarchy; you can control how much of its internal objects and methods you expose, etc.) by an sdef file. Then, another app can use this object-oriented system via Apple events.

      To send and receive Apple events, you can of course construct them by hand, but you can use higher-level objects like

      • Applescript via NSAppleScript
      • Scripting Bridge
      • or AppScript.

      To learn what kind of aspects an app exposes, just open the AppleScript Editor and choose the menu File → Open Dictionary, and choose an app.

    Now, it’s rather hard to use features of an app which the app does not expose via any of these methods. You still have a few workaround.

    1. UI Scripting. This is done by sending Apple Events to a headless app called System Events which is one of the core program in OS X. This way, you can programmatically emulate clicking a button, choosing a menu, etc. of another app. So, almost whatever you can do using GUI with another app can be done programmatically from another app. To see the hierarchy of UI objects accessible from UI scripting, use a utility which comes with XCode tools, at

      /Developer/Applications/Utilites/Accessibility Tools/Accessibility Inspector.app
      

      This is very rudimentary but does the job; if you regularly use UI scripting, consider obtaining UI browser, as Zygmunt suggests.

    2. Finally, if you want to use a non-GUI non-exposed feature of another app, you can inject a code into another app.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm wondering how many images I can store in the iPhone documents directory so
I was wondering if this common IDE feature is available. Suppose I open many
Many people talk about namespace as a way to change the URL that lead
I was wondering about the best way to do this: I have an app
I'm wondering about the best way to structure authentication/authorization in my app. I want
I'm wondering the best way to query mongo db for many objects, where each
Was just wondering how do these sites (and many other softwares that generate flash
I'm just wondering if anyone has had any problems having too many subscribers for
I am crunching through many gigabytes of text data and I was wondering if
I'm wondering what a better design is for the intersection table for a many-to-many

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.