finder

finder file icon badging (icon overlay) on mac osx >=10.6

不问归期 提交于 2019-11-30 07:52:48
I search a solution to do File icon overlays (icon badging) (like Dropbox does it on mac) with cocoa on mac. Does anyone knows a way to do this? I've searched the Xcode docs as well i look into scpplugins source code which is kind of old carbon code. Thanks for any help Since the Finder was reworked in Snow Leopard, the older Carbon methods will no longer work. The route I've taken to be able to badge icons in Finder involves writing a custom bundle which then needs to be injected into the Finder. Look into Wolf Rentzsch's mach_inject (https://github.com/rentzsch/mach_star/tree/master/mach

How to use Mac Finder to list all aliases in a folder

柔情痞子 提交于 2019-11-30 07:32:57
问题 I downloaded a repository from Bitbucket.org as a zip file and unzipped it using iZip to my Mac. Xcode found many compile errors because the zip or unzip did not preserve aliases properly. So I used hg to clone the repo, the aliases were preserved, and the Xcode compile was then clean. I would like to find all the aliases in my folder and replace them by their targets so future zips will work. I've done a lot of searching and can't find anything that says how find them either with the Mac

Programmatically add a folder to “Places” in Finder

耗尽温柔 提交于 2019-11-30 04:06:39
I'm trying to figure out how to programatically add a folder to Finder's Places sidebar. I've seen ways to modify it through the Finder Preferences, but I've also seen some applications actually add folders to the sidebar. If someone has any advice/pointers on what I should look up, it would be greatly appreciated (This is for Snow Leopard and Leopard... hopefully it didn't change) mself Try this: -(void) addPathToSharedItem:(NSString *)path { CFURLRef url = (CFURLRef)[NSURL fileURLWithPath:path]; // Create a reference to the shared file list. LSSharedFileListRef favoriteItems =

Applescript: Open a Folder in Finder

倾然丶 夕夏残阳落幕 提交于 2019-11-30 01:38:24
问题 I m trying to open a folder in Finder using AppleScript. The following is my code. I want the folder WorkSpace to open in Finder, but it opens the Parent Folder /Volumes/MyMacDrive/Mani and highlights the WorkSpace folder. I want the contents of WorkSpace folder, but all I'm getting is its Parent Folder's Contents. What am i missing here ..? property the_path : "/Volumes/MyMacDrive/Mani/WorkSpace/" set the_folder to (POSIX file the_path) as alias tell application "Finder" activate if window 1

Add an item to the Finder/Save dialog sidebar

蹲街弑〆低调 提交于 2019-11-29 23:54:27
问题 I'm working on a script where a user logs into a guest account on OS and is prompted for their network credentials in order to mount their network home folder (while they benefit from working on a local user folder). As the guest folder is deleted when users log out, I want to discourage them from saving anything there. I would like to replace the items on the Finder and Open/Save sidebar lists (such as "Desktop", username, "Documents", etc) with ones that would save into their network home

Adding a script to MacOS finder contextual menu

自古美人都是妖i 提交于 2019-11-29 22:39:53
I want to add an option to the finder context menu that calls hg add %1 with %1 being the full path of the selected file in finder. Of course there are more useful cases I can think of, to add to the context menu. Is there a simple way to do that which doesn't involve installing any 3rd party software or coding in a compiled language and building binary plugins? Like creating a script with the script editor and dropping it in /Library/Contextual Menu Items/ ? Yeah, I know this is third party software - but for the sake of a fuller overview - http://www.abracode.com/free/cmworkshop/on_my

finder file icon badging (icon overlay) on mac osx >=10.6

南笙酒味 提交于 2019-11-29 10:18:14
问题 I search a solution to do File icon overlays (icon badging) (like Dropbox does it on mac) with cocoa on mac. Does anyone knows a way to do this? I've searched the Xcode docs as well i look into scpplugins source code which is kind of old carbon code. Thanks for any help 回答1: Since the Finder was reworked in Snow Leopard, the older Carbon methods will no longer work. The route I've taken to be able to badge icons in Finder involves writing a custom bundle which then needs to be injected into

Getting the full path of a TFENode in Lion

五迷三道 提交于 2019-11-29 07:47:44
I'm trying to get the full path of a TFENode in OSX Lion, but am unable to get a result using the old way (by converting to an FINode and getting the fullPath - the method [[FINode nodeWithFENode:myTFENode] fullPath] doesn't seem to work for Lion anymore. Is there a way to do this? From a TFENode, you can get an OpaqueNodeRef, and use that with FINode's nodeFromNodeRef: method. After that, you can get the NSURL to the item with FINode's previewItemURL method. 来源: https://stackoverflow.com/questions/8861503/getting-the-full-path-of-a-tfenode-in-lion

How to use Mac Finder to list all aliases in a folder

那年仲夏 提交于 2019-11-29 04:43:24
I downloaded a repository from Bitbucket.org as a zip file and unzipped it using iZip to my Mac. Xcode found many compile errors because the zip or unzip did not preserve aliases properly. So I used hg to clone the repo, the aliases were preserved, and the Xcode compile was then clean. I would like to find all the aliases in my folder and replace them by their targets so future zips will work. I've done a lot of searching and can't find anything that says how find them either with the Mac Finder utility or the bash find command. I've tried using Finder->All My Files with search->kind->other-

Relative file paths with Applescript

一世执手 提交于 2019-11-29 02:25:14
I'm trying to make an Applescript that will open a file on a user's computer without knowing the hard drive or user name, presuming the file is in the same place in the user directory. tell application "Finder" to open "/Users/jim/Dropbox/Getting Started.pdf" as POSIX file works great, whereas tell application "Finder" to open "~/Dropbox/Getting Started.pdf" as POSIX file fails. Is there any way to accomplish this simply? You can't use tilde paths in AppleScript basically because POSIX file is in fact an URL. URLs for file paths doesn't support incremental paths, only absolute paths. But the