

This makes it possible to change the name and extension of the new file. Click the Options button in the action, and click the 'Show this action when the workflow runs' box. Then drag CurrentFolder from the Variable panel at the bottom of the Automator window to the Where entry of the New Text File action. (Do this by clicking on the drop-down menu.)ĭrag and drop the New Text File action from the Text library into the work area. Set currentPath to insertion location as textĭrag and drop the 'Set value of a variable' action from the Utilities Library, and create a new variable called, for example, CurrentFolder.

Paste in the following AppleScript, then click the Hammer icon (to compile the code): on run

This makes it easier to assign a keyboard shortcut to our service, which we'll do at the end.ĭrag and drop the 'Run AppleScript' action (in the Utilities Library) into the work area on the right. Set the Service to receive selected folders in Finder (the two drop-down menus at the top of the work area on the right). This will open a new Automator window, set up to create a Service. Start by launching Automator, and in the chooser that appears, select Service. This a simple Service for creating new files the currently-open folder in Finder, using AppleScript and Automator. This is a bit old, but nothing is drastically different in 10.8: So any recommendations are more than welcome! I've searched a bit for these but haven't found anything of substance I could set up a hacky hotkey workaround but that's suboptimal, in my experience. How can I customize the macOS Finder context menu? I want to add the menu items: On top of that, it'd be really killer to have an "open terminal here" option that would open a terminal window already cd'd into the current working directory. I'd really like to add a "New File" option right under "New Folder" in the right click menu, and just have it make a new file in the selected folder or finder window. However, I very much miss a few features of windows, one of them being how easy it was to create a new text file. I've found my workflow (web developer) has increased substantially and I love the general performance and snappiness of my OSX. In this example, we've held down Command and pressed the backslash key \.I've been a native windows'er up until this year and have finally made the jump to OS X. Press the desired key combination for your shortcut. Scroll down to the service you created, and click to select it. Open the Apple menu and choose System Preferences.Create a shortcut for the serviceįollow these steps to create a keyboard shortcut for your new service. Type a name for your quick action and click Save.Ĭlose the Automator window.In this example, we have chosen the terminal application iTerm. If your app is not listed, choose "Other" to locate it manually. In the Launch Application drop-down menu, select the application you want to launch.The new action appears on the right, outlined in blue.Drag this action from the list and drop it in the gray area of the window, as indicated. On the left is a list of Actions from your Actions Library.In the Workflow receives current drop-down menu, select no input.Click the Quick Action document type, then click Choose.Click the New Document button, or double-click the New Document icon. If this is the first time you are running Automator, your Automator documents open in a Finder window.In the macOS Finder, open the Applications folder.Create an Automator serviceįirst, create an Automator service to launch your app. When you press the keyboard shortcut, the chosen application launches automatically.įollow the steps below to configure a keyboard shortcut to launch an application in macOS 10.15 Catalina. Using the macOS Automator, you can create a custom service to launch the application of your choice, and bind a keyboard shortcut to it. However, in macOS, there is no built-in way to launch an application by pressing a keyboard shortcut. You can click an icon in the Dock or the Launchpad, or type the name of the app in the Spotlight search box. In macOS, there are many ways to launch an application.
