objective c - Getting the POSIX path of the Finder's front window -


How can I get the POSIX path of the Finder window which is currently at the top of its window list? Preferably with some sort of coca framework, but I'm opening anything. Background: I'll need this because I want to select files that match a rajx pattern, which is resumed from this path. To get all the descent of this path, use

  [[NSWorkspace sharedWorkspace] subway etapath: thePath]  

method, in "grep "Use a NSTask (to avoid a regex support framework packaging) and select

  [[NSWorkspace sharedWorkspace] file: aFile inFileViewerRootedAtPath: thePath]  

Through an NSArray created from entries returned by GRP in a looping loop

So far, I have NSWsparas, NSFfile Manager and Ns Within Peepikrn and Akskod document seen other keyword searches.

Thank you for checking my question!

Andre

PS: I'm not sure about the grep part, maybe I'm slapping RegexKit light in there ...

< Div class = "post-text" itemprop = "text">

I am developing a business application that really describes you and I have been messing up with different ways of doing this for more than a year I am I'm a newbie developer, so I'm completely open for the idea that there may be a better way of doing this on my way, but it seems to be stable and work.

I use the Apple script

I get the path of the active document every 3 seconds, but if I am an active application finder, then I am active The path of the window is found. I accept using applet script, as per the approved answer.

Carbon list using the window

Window ID (can not do some apple script) to get the window list of all processes, I I use the CGWWo LIVE COPWindow Infograph in detail in the question:

This presents an array with all the windows of all the processes by which the order is given is the largest So what do i do No, that is to break the first entry from the array. It can also be used for scanning glass in the front window, if it is helpful for you, as shown in the GAB sample application, which is invaluable for me as an example.

Sending Apple Script to Cocoa

When it comes to Apple Script, I have experimented with all 3 that would give Jim suggestions And my conclusion is that both have a problem, both flexibility and flexibility in case of both stability.

  1. Apple Event Manager depends on sending you raw Apple events. For me, it was like hard work and very low level.

  2. I found slow and error prone using NSAppleScript. When you read about the Spiting Bridge, whenever you want to send an entire variety of Apple script messages, it is still very strange. And very disappointed. I was trying to grab windows properties, he did not even recognize them in the present form. It seemed to me that buggy and weird hope that if the orders you send are supported by SB, then this will be the best option.

A fourth option

Now I rely on a great objective casing around the Apple script, It has been for many years, it's stable, the developer is great and most of it only works

There are rock solid methods that allow you to send an Apple script and it is possible for you From the buggy and return the errors without the whole load of dirty code Received that require checking them.

I'm using it for a year. Now there is no problem if you have any other questions about doing so, please do not hesitate to comment and I will reply to them. I will try my best.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -