mac add new file.md

1. Open the "Automator" that comes with the mac, and select the application for the document type:

2. Select: Utilities -> Run AppleScript

3. Paste the following code to the right side of the picture above, save it to the "Applications" directory with command + s, name it whatever you want, here is: New File, the default icon is the same as "Automator"

on run {input, parameters} 
    tell application "Finder"
    set selection to make new file at (get insertion location) 
    end tell 
    
    return input
end run

4. Change the icon: Right-click in "Applications" and select "New File" to display the introduction, click the icon above, command + v to paste any icon...

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325000228&siteId=291194637