No internet connection
  1. Home
  2. Support

Force Quite Macro

By Mark Mangini @Mark_Mangini
    2021-04-09 02:23:30.785Z

    Desired Workflow

    I want to create a macro to bring up the Force Quit menu

    Question

    Using Press Keys, I selecr OPT/CMND/ESC but they are not entered in that order in the ACTION window and, thus, the Macro doesn't work.

    Command Info

    ID: user:ckn9iazu30003jx10v6dywkol:ckn9ibdgf0004jx104bgonrur
    Name: Finder
    

    Source

    undefined
    

    Links

    User UID: iG2OvCZJcWSvwDquWBZPmJT3vHc2

    Feedback Key: sffeedback:iG2OvCZJcWSvwDquWBZPmJT3vHc2:-MXoRFeysSebbbctH6mb

    Feedback ZIP

    • 6 replies
    1. This is, like your other question, also possible to achieve in a more stable way using an Execute System Command, since it doesn't need to involve using UI automation.

      In this case, if Finder is the app you want to Force Quit, you can paste this into an Execute System COmmand's command line property:

      pkill -9 Finder
      

      Like this:

      1. MMark Mangini @Mark_Mangini
          2021-04-09 14:22:47.058Z

          Thanks Christian, however I only wanted to OPEN the FORCE QUITE window. How do I do that? Recording the sequence in PRESS KEYS does not work even though it is a sequence of buttons that is to HOLD down OPT+CMND and then press ESCAPE.

          1. Aaah. This might be a special case, since macOS may capture that keystroke before SF gets a chance to process it.

            This script should do it :)

            sf.ui.finder.menuClick({ menuPath: ['Apple', 'Force Quit…'] });
            
        • M
          In reply toMark_Mangini:
          Mark Mangini @Mark_Mangini
            2021-04-09 15:43:37.934Z

            That did't work. Here's what the action looks like...

            1. This one was intended to be a direct script :) Not a Execute System Command in this case (but that was what I meant in the other 2 threads)

            2. M
              In reply toMark_Mangini:
              Mark Mangini @Mark_Mangini
                2021-04-09 18:20:09.173Z

                Thanks again! That is working now, as well.