Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

205
Views
Get list of window names for all running applications

Using the following block of code

Application("System Events")
  .applicationProcesses.where({ backgroundOnly: false })()
  .forEach((app) => {
     app.windows().forEach((window) => {
       console.log(window.name());
     });
  });

I can access a list of all window names for currently running applications. However, for my particular use case, this code is too slow to be useful. I have been looking into the Objective-C Bridge for JavaScript scripting and have been able to list all running applications, but not the windows for those applications.

const runningApps = ObjC.unwrap($.NSWorkspace.sharedWorkspace.runningApplications)
  .filter((app) =>
    app.activationPolicy === $.NSApplicationActivationPolicyRegular &&
    !ObjC.unwrap(app.hidden)
  );

So my question is: Which Objective-C API gives me access to a list of windows for running applications?

Note - I have seen other posts that ask similar questions to this, but I have not been able to get anything working from those answers as I am unexperienced with Objective-C.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!