skip to Main Content

This code and question is following on from perfectfiasco question and answer by Ted Wrigley.

I too find it crazy how many processes Adobe runs in the background – even when finder extensions are disabled and not using any apps.

Screenshot of processes to kill

I am trying to create something similar but for 3 additional apps also Lightroom / creative cloud and adobe bridge also and have edited it slightly to include all the other processes that Adobe run in the background. Any idea if I have added these correctly?

Not entirely sure how to separate apps from processes and if its necessary to killall for apps or just quit command?

Is it fine to force quit process and apps like this?

Something I have noticed is that if lots of adobe processes are quit then it launches this daemon "AdobeCRDaemon" is that expected?

Not sure what to put here now several other processes have been added – tell process "AGMService"

Does anything else in the code need updating for current macOS Monterey ?

Thank you in advance for any clarification

use AppleScript version "2.4"
use framework "AppKit"
use scripting additions

property NSWorkspace : class "NSWorkspace"

on run
    set workSp to NSWorkspace's sharedWorkspace()
    set notifCent to workSp's notificationCenter()
    tell notifCent to addObserver:me selector:"someAppHasTerminated:" |name|:"NSWorkspaceDidTerminateApplicationNotification" object:(missing value)
end run

on idle
    -- we don't use the idle loop, so tell the system let the app sleep. this comes out of idle once an hour
    return 3600
end idle

on someAppHasTerminated:notif
    set termedApp to (notif's userInfo's valueForKey:"NSWorkspaceApplicationKey")
    set termedAppName to (termedApp's localizedName) as text
    -- I'm guessing at the localized names for Photoshop and Illustrator. you may need to alter these
    if termedAppName is "Adobe Photoshop 2022" or termedAppName is "Adobe Lightroom Classic" or termedAppName is "Adobe Bridge 2022" or termedAppName is "Adobe Lightroom" or termedAppName is "Creative Cloud" then
        -- close the service here
        tell application "System Events"
            tell process "AGMService"
                if its accepts high level events is true then
                    tell application "AGMService" to quit
             tell application "Adobe Desktop Service" to quit
               tell application "CCLibrary" to quit
            tell application "CCXProcess" to quit
             tell application "Core Sync" to quit
              tell application "Creative Cloud Helper" to quit
                else
                    do shell script "killall AGMService"
            do shell script "killall Adobe Desktop Service"
             do shell script "killall CCLibrary"
              do shell script "killall CCXProcess"
               do shell script "killall Core Sync"
            do shell script "killall Creative Cloud Helper"
                end if
            end tell
        end tell
    end if
end someAppHasTerminated:

2

Answers


  1. This is a deeply unsafe way to do this, but I’ve replaced the nested tell hell in onAppHasTerminated this:

    do shell script "pkill -i -f adobe"

    My personal script looks like this.

    Login or Signup to reply.
  2. I had the same problem.
    Just run this command in terminal:

    kill $(ps aux | grep -i ‘.adobe’ | grep -v grep | awk ‘{print $2}’)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search