I would like to be able to make an app's icon on the dock, for any application, bounce with a keyboard command. Is there any way I can do this?
It would need to work on all application icons, so for example which ever application is currently in use, the keyboard command would make that icon bounce like it does when the application is opening - although preferably it could bounce just once.
I presume some sort of script?
Thanks
Related
Is there a way of doing this?
I want to hide the Dock when my JFrame starts and then show it when the JFrame is disposed.
According to this stackoverflow answer
There's is no API to control the Dock... at best, you can only suggest a tile to represent your app when present on the Dock.
To my recollection, you can hide the Dock from an App (and/or the MenuBar) but this is achieved from the Info.plist file (and Terminal applications do not have one) or you can do this with NSApplication, but once again Terminal apps do not have such object.
However, you may want to transform your CLI application into a faceless GUI application, so you can benefit from a GUI application without ever displaying anything.
I want to whip something up that would run a small script every time i clicked on the Desktop. Any hints on how to make this happen?
For those interested, the script would toggle the display of desktop icons.
I assume you mean on the desktop background, not any icon. You could create a transparent overlay window, use [window setIgnoresMouseEvents:NO] to make it receive clicks, and set its window level to something between the desktop and the icons (kCGDesktopWindowLevel and kCGDesktopIconWindowLevel).
You would presumably want to create one of those per screen and monitor for changes in the screen configuration to add, remove, or resize them as appropriate. Either observe the NSApplicationDidChangeScreenParametersNotification or implement the -applicationDidChangeScreenParameters: application delegate method (which amounts to the same thing).
I have an application I'd like to build that starts when you start the mac and will appear in the dock.
I have some experience with Objective-C and iPhone dev but none with Mac dev, I'm also a PC user normally so I'm not au fait with the norms of Mac usage. Any guidance here is appreciated.
How do you get an application to autostart?
*edit Can you run an app in the status bar? (with the clock etc) or do apps only run in the dock?
To write a program in the Status Bar check out this great tutorial.
To get an application to auto start on login, look for information on launch daemon or just make your application installer to place an entry on /Library/StartupItems.
About the dock: usually, user controls what's on his/her dock. When your UI application is running, it will usually be in the dock. If you want the icon to stick there permanently, you will need the user dragging the icon from the Finder to the dock, or, right-click on the dock icon while is running in select Options->Keep In Dock menu option.
I'd like to show another app's windows under my app's taskbar button. It's a background app that reports another process's windows as my app's own. Is there any universal way to do this, e.g. each "new" window, alert glow, progressmeter, and other taskbar features, show under my own app's button?
For example, Winfox runs under its own process and steals Firefox's windows. It also adds features, but that's irrelevant -- I just want to support another app's existing taskbar features under my own app's button -- multiple windows, progressmeter, alert flashing, error flashing, mini-icons, etc. Is there a near-universal way to steal an app, or is it largely app-specific? Thanks!
You should be able to use SetParent() to take ownership of a window, but I'm not sure how much this will help you in your attempt to add taskbar features to the legacy app.
I was surprised this doesn't happen automatically, but I would like my applications window to be in focus as I click its dock icon, when in minimized mode.
Just to clarify, when I minimize the app, the window goes to dock, but when I click the its corresponding Dock Icon, the window don't come in focus.
Is there anything I am missing?
I am using Qt 4.5.3 on Mac OS X 10.5, 10.6
Thanks for help.
Rahul
First answer: That's the expected behavior of a Mac app. Try Safari for example. An app can be active without showing any window. In that case, only the menu bar at the top shows that the active app is changed. So, unless absolutely necessary, you shouldn't bring the minimized window back unless the user explicitly does so. That's the Mac way!
Second answer: I understand that there are cases where you want to bring the minimized window up. In Cocoa, the application delegate method -applicationDidBicomeActive is called when the application gets the focus, and there you can bring the window up yourself. I'm sure Qt also has a similar event/callback/signal or whatever, but I don't know any Qt ... :p Sorry I can't be of any help.