• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Re: frontmost document window (of all running apps)?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: frontmost document window (of all running apps)?


  • Subject: Re: Re: frontmost document window (of all running apps)?
  • From: b UND d <email@hidden>
  • Date: Thu, 16 Feb 2006 10:33:30 +0100

Many thanks for your help with my problem, Omar & Jason!

You lead me on the right path and I managed to get the frontmost app via NSWorkspace and it's frontmost window and the document path (if there is one) via AXUIElementCopyAttributeValue -> kAXDocumentAttribute.


But now I'm stuck with this problem: How can I determine if the frontmost window is a document window?


- If the document is saved and there is a path - no problem.
- If the window is not an AXStandardWindow then it's almost 100% sure that it's not a document window - ok - I can filter this with kAXSubroleAttribute


- but how can I find a difference between unsaved document windows and non document AXStandardWindow windows?

I know this has discussed (without solution) in the accessibility-dev list some time ago - but maybe there is a solution outside accessibility?


Many thanks for your help and ideas in advance,

Dominik



Am 11.02.2006 um 08:33 schrieb Omar Qazi:

You can use NSWorkspace to get a dictionary of data about the frontmost application.

NSDictionary * app = [[NSWorkspace sharedWorkspace]activeApplication];

As for the path of a document I'm not sure but I think I might have seen something in the Apple Events programing guide.

For a monitoring app idea (automated time tracking) I am looking for a solution to find out what's the frontmost (focus) document window of all running applications (with document name/path or at least the title of that window if possible).

Is there any way to do this? ( applescript is probably no solution since not all of the apps are scriptable).


Many thanks in advance for your ideas


Dominik

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40roflsoftware.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >frontmost document window (of all running apps)? (From: b UND d <email@hidden>)
 >Re: frontmost document window (of all running apps)? (From: Omar Qazi <email@hidden>)

  • Prev by Date: Re: Automator-like UI?
  • Next by Date: Re: Cross-platform?
  • Previous by thread: Re: frontmost document window (of all running apps)?
  • Next by thread: Re: frontmost document window (of all running apps)?
  • Index(es):
    • Date
    • Thread