elscorcho42

Q: How can I get Messages to bounce in the dock when I receive a message?

It looks like Messages no longer offers the option to "Bounce in Dock" with an incoming message... anyone found a work around?

Mac OS X (10.6.4)

Posted on Nov 21, 2013 11:13 AM

Close

Q: How can I get Messages to bounce in the dock when I receive a message?

  • All replies
  • Helpful answers

  • by Ralph Johns (UK),

    Ralph Johns (UK) Ralph Johns (UK) Nov 21, 2013 1:47 PM in response to elscorcho42
    Level 9 (72,994 points)
    Applications
    Nov 21, 2013 1:47 PM in response to elscorcho42

    Hi,

     

    In iChat and Messages there was a Preferences sections called Alerts.

    In the Alerts you could set the sound for any of 17 actions and link these to the icon Bouncing in the DOCK.

     

    On top of that the Notification Center in the System Preferences also had a DOCK bounce item in Mountain Lion.

     

    It was certainly known that the Sounds set in Messages overrode the settings in the Notification Center

    Turning the sound option Off in Notifications did not stop the app playing the sound or setting the sound to play in Notifications and setting to NONE in Messages played no sound.

     

    Now neither Notifications or the app have an option to Bounce the DOCK icon.

     

    I have not workaround at the moment.

     

     

    3Sigcopy2.png
    9:47 pm      Thursday; November 21, 2013

     

      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • by nonagonal,

    nonagonal nonagonal Jul 8, 2015 10:39 AM in response to Ralph Johns (UK)
    Level 1 (0 points)
    Jul 8, 2015 10:39 AM in response to Ralph Johns (UK)

    I was looking for this too, and I came up with the following workaround. Messages allows you to use AppleScript to handle incoming messages, so I wrote an AppleScript to create a notification when messages arrive. It may be possible to get the dock icon to bounce with this approach as well, but I was happy with it as is.

     

    1) Run Script Edtor, create a new file, and paste in the below file. Save it in this location:

    /Users/<your username here>/Library/Application Scripts/com.apple.iChat/Show Notification

    2) In the Messages app open Preferences and under "AppleScript handler" select "Show Notification"

    3) Now a notification should be displayed when new messages (among other things) arrive.


    Regards,

    Jeremy


    Here is what you paste into the script in step 1:

    (*

     

    Based on "Speak Events.applescript"

    *)

     

    using terms from application "Messages"

      on message sent theMessage with eventDescription

      # say eventDescription

      end message sent

     

      on message received theMessage from theBuddy with eventDescription

      notify_me(theBuddy, eventDescription)

      end message received

     

      on chat room message received from theBuddy with eventDescription

      notify_me(theBuddy, eventDescription)

      end chat room message received

     

      on active chat message received from theBuddy with eventDescription

      notify_me(theBuddy, eventDescription)

      end active chat message received

     

      on addressed message received theMessage from theBuddy for theChat with eventDescription

      notify_me(theBuddy, eventDescription)

      end addressed message received

     

      on received text invitation from theBuddy with eventDescription

      notify_me(theBuddy, eventDescription)

      end received text invitation

     

      on received audio invitation theText from theBuddy for theChat with eventDescription

      notify_me(theBuddy, eventDescription)

      end received audio invitation

     

      on received video invitation theText from theBuddy for theChat with eventDescription

      notify_me(theBuddy, eventDescription)

      end received video invitation

     

      on received local screen sharing invitation from theBuddy for theChat with eventDescription

      notify_me(theBuddy, eventDescription)

      end received local screen sharing invitation

     

      on buddy authorization requested with eventDescription

      notify_me("buddy auth requested", eventDescription)

      end buddy authorization requested

     

      on addressed chat room message received from theBuddy with eventDescription

      notify_me(theBuddy, eventDescription)

      end addressed chat room message received

     

      on received remote screen sharing invitation from theBuddy with eventDescription

      notify_me(theBuddy, eventDescription)

      end received remote screen sharing invitation

     

    # The following are unused but need to be defined to avoid an error

     

      on login finished with eventDescription

      # say eventDescription

      end login finished

     

      on logout finished with eventDescription

      # say eventDescription

      end logout finished

     

      on buddy became available with eventDescription

      # say eventDescription

      end buddy became available

     

      on buddy became unavailable with eventDescription

      # say eventDescription

      end buddy became unavailable

     

      on received file transfer invitation theFileTransfer with eventDescription

      # say eventDescription

      end received file transfer invitation

     

      on av chat started with eventDescription

      # say eventDescription

      end av chat started

     

      on av chat ended with eventDescription

      # say eventDescription

      end av chat ended

     

      on completed file transfer with eventDescription

      # say eventDescription

      end completed file transfer

     

    end using terms from

     

    on notify_me(theBuddy, eventDescription)

      set buddyHandle to name of theBuddy

    display notification eventDescription with title "Incoming message" subtitle buddyHandle

    delay 1 --one online source said we can't show notifications as the last thing we do, so adding delay here

    end notify_me


  • by fionna_adams,

    fionna_adams fionna_adams Jun 5, 2016 4:07 PM in response to nonagonal
    Level 1 (4 points)
    Jun 5, 2016 4:07 PM in response to nonagonal

    Hi! I found this after searching around for something to handle this, but I'm getting specific errors in El Capitan when Messages tries to run this script.

    Event: Message Sent

    File: Show Notifications.applescript

    Error: The operation couldn’t be completed. /Users/Letao/Library/Application Scripts/com.apple.iChat/Show Notifications.applescript:1248:1253: script error: Expected “given”, “into”, “with”, “without” or other parameter name but found “local”. (-2741)

    I know literally nothing about writing AppleScript, I just want to fill in this gap. Do you know what's up?

  • by Ralph Johns (UK),

    Ralph Johns (UK) Ralph Johns (UK) Jun 6, 2016 1:14 PM in response to fionna_adams
    Level 9 (72,994 points)
    Applications
    Jun 6, 2016 1:14 PM in response to fionna_adams

    Hi,

     

    The above instructions could have been clearer.

    The person duplicated the Speak Events Script and changed the first section to the "notify_me" bits instead of "say eventDescription"

    There is also the last paragraph outside the "Use Terms..."  settings which I don't think is needed as they have:-

     

    on message received theMessage from theBuddy with eventDescription

      notify_me(theBuddy, eventDescription)

      end message received


    and several other related Active Chat and Group chat lines to go with it in the main section.


    The # symbol denotes items that are not "read" and therefore Inactive in the script.

    They have left all these in the second section fro the "say eventDescription" parts.


    That is too say although they say it works it is not very well written.


    Since this Thread was started we have had Yosemite and El Capitan which probably means changes to AppleScript as well.


    You may want to Post here Mac OS X Technologies

     

    3Sigcopy2.png

    9:14 pm      Monday; June 6, 2016

     

      iMac 2.5Ghz i5 2011 (El Capitan)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     iPhone and an iPad (2)