Finder "New Folder with Selection" - Shortcut
By yianniap @yianniap
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?
- Chris Shaw @Chris_Shaw2022-02-17 20:52:24.412Z
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] })