finder

unable to copy release folder to desktop using AppleScript

Hi all, I tried this script to copy release folder of one of my Xcode projects to desktop: tell application "Finder" set targetFolder to folder "release" of folder "build" of folder "8_15pm" of folder "26th_March" of folder "XYZ" of startup disk set destinationFolder to folder "Desktop" of folder "miraaj" of folder "Users" of s...

OSX: Why is GetProcessInformation() causing a segfault?

Here's my C method to get the pid of the Finder process. GetProcessInformation() is causing a segfault. Why? Here's the function: static OSStatus GetFinderPID(pid_t *pid) { ProcessSerialNumber psn = {kNoProcess, kNoProcess}; ProcessInfoRec info; OSStatus status = noErr; info.processInfoLength = sizeof(ProcessInfoRec); ...

Auto sorting of icons on window resize

Hello. I know this is a newbie question but I have never found an answer to this problem and I thought I would ask here. Where do you enable the option (if there's any) to automatically sort and line up the icons in a finder window, when you resize it? I have the default Windows' behaviour in mind where the icons take all the available...

Spotlight query to search for all archives and ISO files that their names do not end in bin

The following Spotlight query, correctly returns all archive and ISO files on my system: kind:iso OR kind:archive However, Spotlight treats .bin files as archives too and returns .bin files in the results as well. How can I modify the above query and exclude files that end in bin from the result? I tried the following query but it is...

Trying to understand MVC Models, Advice?

I am writing my own MVC for the purpose of learning it. I have pretty much everything "down-pat" and my main stuff written besides models due to some trouble understanding them and lack of viable examples. Now, I've been told a model should reprecent a single row, someone told me, your model class should on update/insert and delete rows...

How to make a plugin for [Path] Finder to browse zip-archives as folders?

What really surprises me is lack of some essential functionality in Finder, when one migrates from Windows to OS X. One of the things is a possibility to open an archive as a folder, i.e. staying in the directory tree and being able to drag and drop files from the archive to folders in the tree, sidebar etc. What would you do to enable ...

Snow Leopard Services Tutorial for Contextual Menus

I'm relatively new to OSX programming (i.e. really new) and I find myself in need of creating a Contextual Menu that ties into Finder. From what I've read here as well as online, this is only possible through the use of Services in Snow Leopard. I found the Apple Developer guide at Apple Services Implementation Guide But it's not suffi...

How to make Finder 'Open With' work for my application (XCode, OS X)?

I have created an application that is capable of playing audio files. This in itself works fine, and so does drag&drop from finder to my application. What I would like as well, is that people can use my application from Finder using the Open With menu (or even allow them to set my application as default for a certain file type) After a...

Delete Drag and Drop Behavior of IKImageBrowserView

Hi Everyone: By default (it seems), IKImageBrowserView enables drag and drop to locations in the Finder. I would like to turn off this behavior but am unsure of how to do so. I was thinking that perhaps implementing the NSDraggingDestination protocol and overriding it could solve this, but so far it hasn't worked for me. Thanks for a...

ScriptingBridge Finder POSIX path

Hi, is it possible to get the POSIX path or target to the frontmost window using the Scripting Bridge framework? I'm using FinderApplication *theFinder = [SBApplication aplicationWithBundleIdentifier:@"com.apple.Finder"; but I can't find anything in "Finder.h" that could work. ...

How to tell Finder to select/reveal multiple files in AppleScript

Using the following code: tell application "Finder" to reveal every item of theFiles Works when theFiles contains a single file, but when it contains multiple files, I get: error "Finder got an error: AppleEvent handler failed." number -10000 What am I doing wrong? I simply want to highlight a list of files in Finder. ...

Has any program used .DS_Store (or the like) for something useful?

There is a lot of talk about how to exclude, ignore, or delete .DS_Store files on macs. It seems these small files contain data about folders that is used by Finder: http://en.wikipedia.org/wiki/.DS_Store https://wiki.mozilla.org/DS_Store_File_Format Has this information ever been put to use by a third party program? ...

Grails finding parent by the many side

Hi, My problem should be obvious, but I just don't see the light right now :-( I have two domainclasses like this: class Parent { String name static hasMany = [children: Child] } class Child { String name } Now I should be able to find the Parent of a child by using the dynamic finder of the Parent like: Parent.findByChild...

Specify a Finder item by its path

is it possible to specify a Finder item by its path? e.g. I want to refresh the icon of a single item. So far, to do this, I call update on every item of the front window: tell application "Finder" to update every item in front window But this only works if the folder currently has the item. Is it possible to specify an item with its ...

Form inputs hash navigation and serialization using Prototype.

Given this object is SELECT input which name = "record[exp_items][1279485786799][batch]" and I want to find all fields in "record[exp_items][1279485786799]" artificial hash and serialize them. Keep in mind that 1279485786799, exp_items always change, so I need either move to one level up in hash and serialize it or find all these objec...

How to implement the folder tree in the left of finder?

I just like to implement a function : Develope a app , and have a outline view, which have a folder and file tree just like Finder or a app called PathFinder , how to implement it ? Thank you very much! ...

[OS X Finder] Is there a way to programmatically connect to a remote server from Cocoa ?

Is there an Coca/obj-C API call to mimic the "Connect to Server" action in Finder? It's possible with Automater, so it seems like Finder has a hook somewhere. ...

How do I move every fourth item in a folder?

I'm trying to make a script that will move every fourth item in a folder to a destination folder. So far I have: tell application "Finder" set originFolder to folder choose folder set dest1Folder to folder choose folder set dest2Folder to folder choose folder set quarter to 1 repeat with i from 1 to count of items in...

Opening files from Finder with a Qt-based application?

Apparently, for Cocoa applications, you're supposed to implement [[NSApp delegate] application:openFile:] or something like that to allow your application to open files double clicked in Finder. How do you achieve this functionality using Qt, as the name of the file to be opened is not passed on the command line? ...

AppleScript: Finder: How can I tell if the Desktop has focus?

window of the desktop is rather crippled. Can't get its index. Finder windows does not include the desktop window, so I can't check that the it's the first there. index of the first Finder window is 1 regardless of the desktop having focus. (as long as other Finder windows exist, otherwise it'll fail.) ...