3

I want to kill the process of the Automator application, but i can't find the name of it in the activity monitor.

  • 2
    What problem are you having that you need to kill Automator? – benwiggy Aug 30 at 10:16
  • Welcome to the community. The process you are looking for is 'Automator'. Sometimes things are easy to miss, so open your activity monitor and look for it. :-) – Dakta Moriamé Aug 30 at 11:09
4

The Automator.app's main process is called "Automator".

enter image description here

You should be able to Force Quit it from the Apple menu, or from right-clicking its Dock icon.

Of course, Automator workflows that are still running will be entirely separate processes.

  • Hmm, that was also my first guess, but there is no process called Automator in my Activity Monitor.In the Dock there is no "dot" under the Automator icon, so it seems Automator is not started, but i can not open it and a right click on the icon shows "App is frozen".. – tbr Aug 30 at 11:10
  • @tbr Have you tried Force Quitting from the methods I mentioned? Is the problem that Automator won't launch? – benwiggy Aug 30 at 11:22
  • 1
    @tbr If all else fails, restart the computer. – benwiggy Aug 30 at 11:50
  • i have already tried "force quit" but it is not working. i think automator is running, because i get the message in the dock "force quit" and "app is frozen"... – tbr Sep 3 at 6:55
2

I wrote an AppleScript a while back which helped me address the same kind of issue you are dealing with. In short, the code gives the options to choose from either visible or invisible application processes, in which you want killed. The code then uses the shell script command kill to terminate those processes by their process ID.

The advantage to using this rather than Activity Monitor is that this code allows for selecting multiple items or processes to kill in one shot. Activity Monitor only allows for selecting one process at a time.

With your circumstance, I would run this code and first choose to view the list of visible applications. If Automator is not in that list, I would choose to kill Finder in that list (which will kill Finder and relaunch it). Then check to see if that solves your problem. If not, then run the script again and choose to view the list of invisible application processes, selecting "WorkflowServiceRunner" (if it exists), "System Events", and "System UI Server" and kill those processes (which should kill them and relaunch them also)

You can run this following code directly in Script Editor.app or save the code in Script Editor.app as an application and just like any other app in Finder, just double click the file to launch it.

use framework "Foundation"
use scripting additions

property appsToKill : missing value
property NSArray : a reference to current application's NSArray

activate
set theChoice to button returned of (display dialog ¬
    "WOULD YOU LIKE TO LIST VISIBLE OR INVISIBLE APP PROCESSES?" buttons ¬
    {"CANCEL", "VISIBLE", "INVISIBLE"} default button ¬
    "INVISIBLE" cancel button "CANCEL" with title ¬
    "  WOULD YOU LIKE TO LIST VISIBLE OR INVISIBLE APP PROCESSES?  " with icon ¬
    2 giving up after 10)

if theChoice is "INVISIBLE" then
    listInvisibleAppProcesses(false)
else if theChoice is "VISIBLE" then
    listInvisibleAppProcesses(true)
else if theChoice is "CANCEL" then
    return
else if theChoice is "" then
    return
end if

set aList to ((NSArray's arrayWithArray:appsToKill)'s ¬
    sortedArrayUsingSelector:"caseInsensitiveCompare:") as list

activate
set killApp to (choose from list ¬
    aList with title "Choose The App To Kill" with prompt ¬
    "Choose The App" OK button name "OK" cancel button name ¬
    "CANCEL" with multiple selections allowed)

set pidList to {}

if killApp is not false then
    tell application "System Events"
        repeat with i from 1 to count of killApp
            set thisItem to item i of killApp
            tell application process thisItem
                set thePID to unix id
                set end of pidList to thePID
            end tell
        end repeat
    end tell
else
    return
end if

set text item delimiters to space
do shell script ({"kill", pidList} as text)

on listInvisibleAppProcesses(trueOrFalse)
    tell application "System Events"
        set appsToKill to name of every application process ¬
            where visible is trueOrFalse
    end tell
end listInvisibleAppProcesses

enter image description here enter image description here enter image description here

Hopefully this will help with your situation but if it doesn't, saving this code as an application in Script Editor.app and using it rather than Activity Monitor... To kill applications... Should prove to be a handy tool in your arsenal.

  • 1
    Nice script. Some minor suggestions to consider, none critical: ➀ Avoid top-level globals for good practice. Here, it’s only set once, so probably better done in the two then clauses, if theChoice...then... set appsToKill to listInvisibleAppProcesses(…). ➁ Iterating pidList can be replaced by setting TIDs to space then do shell script ({"kill", i} as text). ➂ Doubt activate is useful. Check "Results" in Script Editor to see who receives command, but pretty sure it’ll be current application/Script Editor. ➃ You may prefer "caseInsensitiveCompare:". Anyway, +1. – CJK Sep 3 at 14:34
  • Thanks for your script, really cool! Unfortunately it doesn't help with my problem, the Automator App is still frozen. I think i have to reboot the mac. – tbr Sep 4 at 8:16
  • @CJK Removing the top level variable global appsToKill and trying to set its value in the 2 then clauses with set appsToKill to listInvisibleAppProcesses(…) threw an error. Removing the top level variable global appsToKill and replacing it with property appsToKill : missing value , seems to work without a hitch. Iterating pidList was successfully replaced by setting TIDs to space then do shell script ({"kill", pidList} as text) after I replaced (your suggestion of) i with pidList. – wch1zpink Sep 5 at 7:05
  • @CJK ... Continued... And yes the activate command while running the code directly from Script Editor.app, targets Script Editor. Excerpted from Learn AppleScript 3rd Edition.pdf, "When writing AppleScript applets that display dialog boxes to users, you may want the applet to send an activate command to itself immediately before it displays a dialog box: ... That way, your applet will bring itself to the front, ensuring that the user doesn’t miss the dialog box." – wch1zpink Sep 5 at 16:54
  • "after I replaced (your suggestion of) I with pidList" Oops, apologies. Since I'm idling currently in an Apple Store, I quickly threw you (latest version) script into Script Editor. Removing the property declaration for appsToKill and simply setting the variable as I previously described didn't produce any errors. I can only surmise that you made some small error, such as a typo. Without knowing the error message, I can only offer reassurance that it does work as one would expect. – CJK Sep 6 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .