How to set custom icon for file-type in mac osx - objective-c

I have a launcher application for some file-types in mac osx. I want to know is it possible to register custom Icon for file-types associated with my launcher application? and does anybody know exact behavior of OS, when does it show Icon and when does it show some empty icon?

Question 1:
It's easy. In finder, right click on the filename with the extension you're interested in.
Find the "Open with:" section,
Click on the blue part and navigate to your launcher app and select it.
Then click on "Change All..."
Write down, or remember what it used to be before changing it, in case you want to go back to the old behavior. It affects all files with that extension.
Question 2:
Check this link for information on filling in the images in your assets folder: App Icons
If you include an icon in your app, and do the above steps, the icon will show. If you don't include one, it won't.

Related

vb desktop icon different from application icon

I am trying to set the icon of my application. I set the icon once before by changing the property of the form and the property of the project. Now I am trying to change the icon to a different one. The icons of the form and the application have been successfully changed, but when I copy the application to the desktop, the desktop icon still remains the previous one. Can anyone please tell me how to change the desktop icon?
Thanks,
Kai
If you change the icon properly on the form it should get visible in the Taskbar immediately as soon as you start your application.
However even if you did change the project icon properly and therefore your executable has the correct (new) icon (check that in your \bin-folder) you can get the wrong (old) icon from the desktop because you system might retrieve it from the icon cache.
Please check the following link to understand that topic and to see how you can enforce windows to renew its icon cache.
Win 7--: http://www.winability.com/repair-windows-desktop-icon-cache/
Win 8++: http://www.winability.com/how-to-erase-icon-thumbnail-cache-windows-8/

How do I add my own option to Finder's right click menu?

I have an app that basically takes a file path(s) and copies the data name and extension from it to be used in my app. I was wondering how to add on to the Finder right click menu (like Dropbox does) and do run some Objective-C code when clicked. (I need to get the path(s) of the selected file). Is there any way to do this? All the answers I've seen are very vague and unhelpful. I do not want to use mach_inject because my app might go onto the appstore, and I can probably get FinderSync API to work.
Take a look at the FinderSync API in Yosemite; I'm fairly sure you don't need to sync anything, but you can use the API to install a toolbar and sidebar item as well.

Hide System Tray Icon of a 3rd party exe

I'm trying to hide the system tray icon of a program that I'm calling with my program. I'm currently working on a program that provides guides and quick resources to other members of my team. I've got the program to load an AutoHotKey file at launch but the AHK icon shows in the System Tray/Notification area of the task bar. I would like to hide that icon.
I'm currently working in VB.net
So, I don't want to hide anything from the taskbar, I just want to hide the icon of AHK from the system tray.
I have done some looking around and seen some things with the Shell_NotifyIcon but I'm not sure how to implement this.
Figured it out. AutoHotKey has a built in feature to hide the tray icon.
HideTrayIcon
Place that inside the script and it will not show it in the system tray.

How to hide the automator application icon when running

I create a automator application and set it to run at logon, and I check the "Hide" box, but it still shows up (the gear icon) in the status bar. How can I hide it?
I check the "Hide" box here:
but the gear icon is still shown (the worse part is that it never stops rotating!)
Is it possible to hide this icon, or let it stop rotating?
control-click on it, and choose Show Package Contents from the pop-up menu. Inside the Contents folder, open up Info.plist, and change LSUIElement from No to Yes (if using Property List Editor) — or change the line after the LSUIElement key line to (if using a text editor). Save Info.plist.
Now when the alarm triggers, the Automator plugin will run in the background, without a Dock icon or a menu bar, and the focus will remain on the application you’re using.
Three things to note:
You might have to move the plug-in out of the iCal folder and back in
for this to work. Tiger caches the LSUIElement info; moving the app
forces Tiger to renew the cache.
You probably do not want to do this with any iCal plugin that has
dialogs or requires user interaction! This works best for maintenance
actions, automated downloads, and that sort of thing.
Third, this will work with any Automator workflow that is saved as an
application, not just with iCal plugins.”
Then Clear your Cache

Change Icon on Task Bar for VB.net

I have a program in vb.net which is ready to be published.
Its a small detail, but I'd like to change the icon on both the published app shortcut on my desktop, but more importantly on my taskbar (like where the chrome circle shows up).
Is there any way to accomplish this?
To change the main icon for your application, go to the "Application" tab under the project property page, and change the "Icon:" combo box.