No internet connection
  1. Home
  2. How to

Finder "New Folder with Selection" - Shortcut

By yianniap @yianniap
    2022-02-17 19:58:41.449Z

    Hi all!

    I'm trying to create/modify a shortcut for the finder menu item "New Folder with Selection".

    By default the shortcut is control + commnd + C

    I want to change that to shift + option + commnd + N

    The issue i'm having is the the menu item tital changes depending on how many files are selected. So I'm having a hard time using the ui menu action.

    Is there any way to do this?

    • 2 replies
    1. Try this:

      
      sf.ui.finder.appActivate();
      
      const fileMenu = sf.ui.finder.getElement("AXMenuBar").children.whoseRole.is("AXMenuBarItem").whoseTitle.is("File").first.popupMenuFetchAllItems();
      
      const newFolderWithMenuItem = fileMenu["MenuItems"].filter(i => i["Path"][0].includes("New Folder with"))[0].Path[0]
      
      sf.ui.finder.menuClick({
          menuPath: ["File", newFolderWithMenuItem]
      })
      
      
      
      1. Y
        In reply toyianniap:
        yianniap @yianniap
          2022-02-18 17:24:21.515Z

          That worked!

          Thanks so much