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 8481505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:34:27+00:00 2026-06-10T19:34:27+00:00

I have this app where I need to activate an other app’s menu item

  • 0

I have this app where I need to activate an other app’s menu item (like Print cmd+p) from within my app. Right now I’m using CGEventPostToPSN() to do the job and it works fine, but when I activate sandboxing, it stops working.

CGEventPostToPSN(&psn, keyDownEvent);
CFRelease(keyDownEvent);
CGEventPostToPSN(&psn, keyUpEvent);
CFRelease(keyUpEvent);

My question now is what can I do when I need to enable sandboxing? I heard a lot about the Accessibility API but I was unable to find out how I can activate an other app’s menu item. I’m thankful for any answer on this problem.

Fabian

  • 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-06-10T19:34:28+00:00Added an answer on June 10, 2026 at 7:34 pm

    I still don’t have a final answer to this question, but it seems to be possible with the Accessibility API as suggested by @nielsbot.

    There are some promising functions like AXUIElementPostKeyboardEvent() and AXUIElementPerformAction(). Problem: Using the Accessibility API to control another app is prohibited in Apple’s Sandbox Guideline.

    Note: With App Sandbox, you can and should enable your app for accessibility, as described in this document. However, you cannot sandbox an assistive app such as a screen reader, and you cannot sandbox an app that controls another app.

    If you came across this question and have the same problem as me, I fear you’re out of luck. Reconsider if you really have to control another app and if so, you might not be able to distribute your app on the Mac App Store, sorry.

    Fabian

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

Sidebar

Related Questions

I have this need to place my app in the share/send context menu so
In my app, I have this scenario where I need to post an object
I have a file as documentRoot/app/webroot/myFile.php I need to be able to access this
I have a Django app that use a django-tagging. I need to port this
So I have this app which needs to query entities from the Azure Tables
So I have this App in the store, and I would like to release
I have this app https://github.com/staticdev/django-crud-utils that need to have django-sorting installed to work. But
I have QListWidget in my app, I need to get string value of item
I have this problem with an app of a printer. I need to know
I have this link which i need to translate in a php variable. http://www.facebook.com/dialog/apprequests?app_id=346824075388300&to=1149862205&message=Facebook+Dialogs+are+so+easy%21&redirect_uri=http%3A%2F%2Fpenelope-ns.net%2Ffb%2F

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.