Detecting Dock Icon Click

Hi,
I'm building an AppleScript Application in XCode and I'm wondering if anyone knows a way to detected when the dock icon is clicked?
Cheers
Chris

Thanks Camelot,
Unfortunately it doesn't seem to work in the AS Application. I've tried linking every application and window event in the Interface Inspector that I can but I can't get any of them to respond when clicking the Dock Icon. I can do what I need if I just check for the application becoming active, ie switching from another app to mine, but this obviously only works if my application is not active in the first place. What I really need is the ability to trap a dock icon click even when my application is active.
Regards
Chris

Similar Messages

  • Dock icon clicking won't open the Epson "scan" app.

    The Epson scan has always opened from the dock OR the applications window. It shows in both places. When I click or double click it now, It doesn't open, It bounces like it is going to open but, it doesn't. I think I had this problem before but, for the life of me I can't remember what I did to solve it. My printer is an Epson all in one CX6400. I have it turned "ON". I think it has something to do with preferences. Any help would be appreciated.
    hank you very much Warren

    Hi Warren!
    Navigate to HD > Users > Your Account > Library > Preferences: In this folder search for any .plist files that are associated with the Epson Application, that is not functioning properly, and put them in the Trash.
    Try the to load the app again.
    ali b

  • Is there a way to open a new tab/window by clicking the Safari dock icon?

    Is there a way to open a new tab or window by clicking the Safari dock icon? Right now, the default behavior seems to be that Safari simply un-minimizes or displays the last window in focus.
    I want to be able to quickly fire up a new tab or window in Safari when it is out of focus, such as when Finder is in focus. The workaround right now is to right-click on the Safari dock icon, and select "New Window", or to allow the last window in focus to appear, and cmd+t or cmd+n. But this is too many steps over the course of a day for a highly frequented task like this.

    I'm glad that helped. Thanks for posting back.
    ... when I save this as an application as "run only", it's relatively quick to run, but there's a delay to load... I assume it's opening Script Editor every time?
    As long as the script is saved as an application -- Run Only or not -- it should definitely not cause the Script Editor to open. You can verify this by closing the Script Editor application altogether prior to clicking on the docked script icon that you saved. You should notice that the Script Editor does not open when the script is run.
    FWIW, I went back and saved a version of the script as a Run Only app, and I didn't notice any difference between it and the original, which was saved without the Run Only option checked. The delay that you're noticing might be accounted for by the fact that the script, because it was saved as an application, will be activated just as any other standalone application would be. This happens prior to Safari being activated. Watch your menu bar when clicking on the docked script icon and you should see the name of the saved script app appear for a split second before Safari gets activated.
    The only time I can think of that you might wish to save the script as a Run Only application would be if you wanted to conceal the script for some reason. If, for example you were publishing the script as a part of an application release and didn't want its contents known, or you didn't want an end user to be able to edit the script, you might select the Save As > Run Only option. To illustrate this, try dragging and dropping a script saved as a Run Only application onto the Script Editor's icon. You should see a warning dialog to this effect:
    *Unable to read the file because the script is not editable (it was saved as run-only).*
    Whereas if you drag a script that was not saved as a Run Only app onto the Script Editor's icon, the script should open in the Editor, and it can be edited.
    I played around with the "stay open" option for saving the script as an application, but it appears I have to close the app and reopen it before I can get it to work a second time.
    The Stay Open option is appropriate for scripts which use an "On Idle" handler, which really wouldn't apply in this case. Check out more on Idle Handlers here and here.
    Is there a faster way to use this multiple times throughout the day?
    One way you might speed up the action would be to save the script +as a script+ by choosing Save As > File Format: script from the Script Editor's File menu. The resulting script can then be activated by assigning a hot key to it using one of several 3rd-party keyboard shortcut programs available on the Internet. (I used Spark, assigned a function key to the script I posted earlier, and found the action to run significantly faster.)
    Good luck.

  • 10.6.8 Unable to click in text boxes or on utility menu at top of screen, Dock icons lead to containing folders instead of programs

    As stated in my subject, periodically I become unable to click in text boxes (in my browser, addresses/search) and am also unable to click on the various icons in the utility bar at the top of the screen such as bluetooth and volume control etc.  Also, when this occurs if I click on Applications or one of my Dock icons it leads to the containing folder as a destination instead of the program itself.  It resolves itself after awhile, but I can fix it immediately by unplugging my mouse and plugging it back in.  At that point, everything works fine as if nothing ever happened.  What is strange to me is that it fazes in and out, while being able to return to being fully operational.

    Have you tried adding the following css selector to your css file.
    .nav-bar a {
        text-align: center;
    or insert it in the <style> tag you have on the page:
      <style type="text/css">
      body {
        margin-left: 200px;
      .n {
        text-align: center;
    .nav-bar a {
        text-align: center;
      </style>

  • OSX: FF running, but no windows open - clicking on the dock icon should open a new window.

    Running OSX 10.5.8, FF3.6.10. If I close all FF windows, but leave FF running, I should be able to open a new FF window by clicking the dock icon. This doesn't work - it just brings FF to the front, but no windows open. Any ideas how I can fix this?

    Is an external display connected and turned off? If not, open Mission Control. Do you see the window(s) in any other spaces?

  • How to force safari to open a new window when dock icon is clicked

    If Safari is already running on my MacBook Yosemite, and I click on the Safari icon in the dock, the Safari window is brought forward.  The behavior  I want is whenever I click the safari icon on the dock, is that a new safari browser window is opened.  I don't see this option in preferences (or any keyboard  mouse combination) that would make the dock icon open a new browser window.    (an option is available for new windows if you click on a hyperlink, but not if you click on the dock icon) .
    p.s. And I don't want to first  have to place focus on the current running safari and then click File New...too many steps when all I want is a new browser window
    Thanks in advance

    Hi css,
    Welcome to the Apple Support Communities!
    I understand that you would like to click on Safari in your Dock and have it open a new Safari Window. As you said in your post, clicking on Safari in the Dock brings the Safari window forward. There are a couple of possibilities to help resolve this situation. You can control-click (right click if enabled) on Safari in your Dock which will give you the option to open a new window. You can also click and hold on Safari, otherwise known as Press, to display these same options.
    Mac OS X: Additional features of the Dock - Apple Support
    Mouse clicks and key combinations for the Dock
    Control-click
    Reveals contextual menu for item. Menu choices vary per application or file. When used on Dock separator, it reveals Dock preferences. There you can turn magnification and hiding on or off, change the position of the Dock on screen, and change the minimization effect. Choose Dock Preferences to see more options.
    Press
    Reveals contextual menu for item. Menu choices vary per application or file.
    Cheers,
    Joe

  • Clicking on Dock icon only brings most-recently-used window to front

    In Leopard, clicking on the iChat Dock icon would bring all iChat windows (contact lists, chats, etc.) in front of other open applications, and give focus to the most recently used iChat window.
    After installing Snow Leopard, clicking on the iChat Dock icon only brings the most recently used iChat window to the front and gives it focus -- other iChat windows remain behind other application windows (if that is where they were before).
    Is this just me? My friend tells me that it still behaves like it did in Leopard on his computer. Any ideas?

    In the First Post your Specs said Snow Leopard, now they say Tiger
    Sorry, I didn't realize it wouldn't remember that setting for me -- I am running Snow Leopard.
    With Chax in Leopard/iChat 4 an extra item was added to the Window menu of iChat that says "Always On top"
    No, this is not what I was looking for. I have another machine with Leopard, and it does not have Chax -- iChat windows are not always in front, but they all come to the front when clicking on the Dock icon.
    I don't use it on the Buddy List as you can set it on Any iChat window.
    What do you mean, "you can set it on Any iChat window"? You mean the Chax setting, or something else?
    Are any Minimised to the DOCK ?
    No, none are minimized to the Dock.
    Chax does not work in iChat 5 and may be the cause of the issue.
    There is a beta version of Chax for iChat 5.
    I would delete Chax and then the com.apple.ichat.plist to remove any thing in it that refers to Chax and then relaunch iChat.
    I deleted Chax and every Chax and iChat plist, then restarted my computer. The problem did not go away -- still, only one window comes to the front when I click on the iChat Dock icon -- the others stay behind other windows.

  • Right Click on dock icon freeze the dock

    Using Macbook Pro, 10.6.4. A lot of the time when I was trying to right click on a dock icon, the dock freeze, expose and spaces all not working, I have to call up activity monitor to force quit the dock and everything went fine again.
    It's very annoying especially when you're in rush for something important.
    Anyone has this experience before or know how to fix it?
    Thanks for any kind help.

    I've been having some issues with Dock/Exposé/Spaces (they're all related, as far as I know). Not the same though.
    Go into ~/Library/Preferences. You'll see a lot of files called com.apple.something.plist. Remove all the files in which something has to do with Dock, Expose, Finder, or Spaces. Reboot. See if that fixes anything. You could also try the 10.6.4 combo update.

  • Clicking dock icon adds another firefox icon to the dock

    Recently upgraded to Firefox 3.6.10.
    When I clicked on my Firefox dock icon the Firefox app icon appeared on the dock in another location--and vanished when I quit Firefox.
    So I deleted the dock icon, and created a new one from the new Firefox app icon in my apps folder.
    Same thing occurs...click on Firefox dock icon and app icon appears on the dock. The dock icon does NOT show Firefox as active. Quit Firefox and reopen, this time the dock icon is the only Firefox icon showing...and shows as active app.

    Make sure that Firefox gets installed properly.
    Open the DMG file and drag to Firefox program to the application folder on your hard drive.
    You shouldn't double-click the Firefox application to run it from the disk image, but drag it out of the DMG folder instead.
    See [[Installing Firefox on Mac]]

  • Open Buddies window when clicking dock icon, not Messages window

    Fantastically annoying that clicking the dock icon for messages does not open the buddy list..this should be configurable. 

    Right!?!? Beyond annoying, it's like Apple has gone out of it's way to just make little annoyances.  I wish it would just go back to how iChat was, or like you said, make it configurable.
    Also, if you close out of all Messages windows, and then put the computer to sleep (this is something I do quite common), when you return from sleep, Messages has completely quit on its own.  Why....??

  • How can I make a new Dock Icon which when clicked has apps inside

    I just seen a Youtube video for something and on the video it had a dock icon of iLife 09, and when clicked it had all the iLife 09 apps, iPhoto, imovie etc in the icon like stacks. (http://www.youtube.com/watch?v=ahiXGtP3bGA, about 22secs in he click its)
    i would like to do this and then I'd be able to remove the individual iLife 09 apps from my dock for space.
    Can someone help me on this please. I have leopard v10.5.8
    cheers

    Create a folder anywhere convenient. Place in it aliases to the iLife programs. Drag it to the Dock.
    If you want it to show with an icon rather than the generic folder icon, do this before dragging it to the dock:
    Select the program which has the icon you want to use, e.g. GarageBand. Hit command-i. In the top left-hand corner of the info pane which opens is the icon for Pages. Click this to select it and hit command-c. Close the pane.
    Select your folder: hit command-i. At the top left of the pane you will see the folder icon: click this to select it and his command-v. Now you can drag your folder to the Dock.

  • Eed to click twice on dock icon to see buddy list?

    Ichat app is Off, I click once on the iChat iCon (in the dock) the application becomes active, I can hear the chime (user available) in the background but no iChat window. I have to click twice on the icon to see the iChat window. When I start iChat from the application folder it works great.
    Tried:
    remove dock icon and reinstall
    deleted ichat pref files
    no luck so far.
    Is there anything I can do to make it work correctly from the dock?
    Thanks

    Hi,
    Using the Red Dismiss button does not Quit the application as it does in some other apps.
    if the Buddy List is dismissed and then iChat is Quit then this is remembered between iChat Start ups (Using the iCon to reveal or windows is only a temporary over-ride.)
    Use the iChat Menu Bar > Windows to reveal the Buddy List
    Use the Red Button to dismiss again
    Repeat getting it back with the menu item or keyboard strokes it lists.
    When you shut down iChat now it should remember that the buddy list was open when it was Quit.
    If this does not work delete com.apple.ichat.plist from you Users/(your account)/Library/Prefernce folder and restart iChat.
    This method is a bit more drastic as it also deletes Bubble colours, font choices, saved Status Messages and the like
    10:07 PM Sunday; November 25, 2007

  • When I open Thunderbird no windows will open on my desktop until I click "Hide Thunderbird" then click on the dock icon again, Mac OS10.8

    When I click on the dock icon to open Thunderbird, the menu at the top of the screen opens, but no windows, ie. Mail & Newsgroups, New Message, About Thunderbird, etc. will open on my desktop. I have to click on Hide Thunderbird, then click on the dock icon again, and then all of the windows I attempted to open become visible. This is on a Mac running OS 10.8.5, Thunderbird 3.0.11. All runs normally after this until I quite Thunderbird.

    Hello,
    Sorry you are frustrated. If you have improvements you would like to make, you can file them to the [[Suggestion Box]] and the Firefox logo in the top left with upside down arrow is the Firefox button containing menu items. Try a clean reinstall as instructed below to see if it resolved your issue.
    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!

  • Let the application know that the Quit is selected from dock icon menu

    I'm building dock icon menu for the Air application, is there a way for me to know if the 'Quit' from the context menu on the Dock icon is selected? I've looked at 'closing' it is not what I'm looking for as this is also dispatched when the X button on the application is clicked.
    Thanks.

    The trick was to handle 'EXITING' event
    http://stackoverflow.com/questions/1338152/detecting-different-quit-options-in-air-applica tion-on-mac

  • Mouse over dock icon no longer indicates "application not responding"

    A very convenient feature seems to be missing from Snow Leopard. In prior versions, if an application was not responding, holding the cursor over its dock icon would display "[Application] Not Responding" and also an option to Force Quit. This status message does not appear in Snow Leopard.
    Are we to assume that if we click and hold on a dock icon and "Force Quit" is presented as an option, that the application has stopped responding?
    Suggestions?

    drdocument wrote:
    Thanks!
    So if I click and hold a dock icon and "Force Quit" is shown instead of "Quit" would that indicate that the particular application is in the midst of some process and simply unable to respond?
    Should I simply allow more time for the app to finish whatever it's doing?
    it could be either. sometimes an application is busy and is showing as not responding but will come out of it after a while. but sometimes it's truly hanging and then you have to force quit it to get rid of it. there is no way to tell just by looking at the dock. give it a bit of time and if it's still not responding then force quit. but if it's happening all the time then you may have problems with your system.
    In particular, here, I've launched DiskWarrior 4.2 on a Mini (via Screen Sharing from my Mac Pro) in an attempt to rebuild directory on a My Book 1TB external drive connected by FireWire, which Disk Utility indicates needs repair but DU cannot repair. Ideas?
    so what does disk warrior say when you try to rebuild the directory? and you should also verify the internal drive on the mini too.

Maybe you are looking for