https://github.com/bensouchet/finder-new-file
MacOS Finder add-on to create a new text file!
https://github.com/bensouchet/finder-new-file
applescript bigsur file finder macos macos-app monterey txt-file
Last synced: 6 months ago
JSON representation
MacOS Finder add-on to create a new text file!
- Host: GitHub
- URL: https://github.com/bensouchet/finder-new-file
- Owner: BenSouchet
- License: mit
- Created: 2022-02-18T10:49:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-20T17:04:57.000Z (over 3 years ago)
- Last Synced: 2025-03-30T18:12:26.964Z (7 months ago)
- Topics: applescript, bigsur, file, finder, macos, macos-app, monterey, txt-file
- Language: Rich Text Format
- Homepage:
- Size: 134 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Finder New File
Add a button to your Mac OS finder to create an empty `.txt` file in the current folder. đź“‚
- No Additional software or library required, it's native AppleScript code ⌨️
- Open Source project, you can check the code, copy it, edit it, it's under MIT License. đź’«## Installation
1. First download the project archive via [this link](https://github.com/BenSouchet/finder-new-file/archive/refs/heads/main.zip) and unzip the archive.
**Or** retrieve it via git clone:
```shell
> git clone https://github.com/BenSouchet/finder-new-file.git
Cloning into 'finder-new-file'...> cd finder-new-file
```
2. Go in the folder `/apps`, open the sub-folder according to your macOS apparence (dark or light), if you use the `auto` apparence, select `auto_theme`. *Info: There is three apps (one in each folder) because the icon need to fit the Mac OS theme. The source code of these apps are identical.*
3. Move the file `finderNewFile.app` in a folder where the app don't risk to be move or delete in the future.
I recommend creating a folder `addons` in your user directory (`cd ~`) and put the app inside:
4. Inside this folder, on your keyboard hold the keys  command + option and drag the application (`finder_new_file.app`) into the finder toolbar:
5. Go to your **Documents**, to do a first try of the app:
6. The first time you will have **a lot** of Permission requests, `Allow` these permissions:
7. Last Step, go to `System Preferences` > `Security & Privacy` > `Accessibility` and allow `Script Editor.app` and `FinderNewFile.app`.
## Errors / Bugs
This project has been developed on macOS Monterey v12.2.1, normally the code work well on older versions but I can't guarantee that it works on newer versions.
### Know Issues
| Screenshot | Title | Resolution |
|:----------:|:-----:|------------|
|| **finderNewFile is not allowed to send keystrokes. (1002)** | You need to verify that on `System Preferences` > `Security & Privacy` > `Accessibility` both `Script Editor.app` and `FinderNewFile.app` are on the list, if not add them with the little `+` button. (You first need to unlock the panel by clicking on the padlock icon on the bottom left). |
If you had another error (or bug), please [open an issue](https://github.com/BenSouchet/finder-new-file/issues).
## Source Code
To check and edit the source code open `finder_new_file.app` with the app `Script Editor`.
`Script Editor` is a native Mac OS app available by default in your mac.You can also find the source code in the file `source.scpt` [here in the assets folder](https://github.com/BenSouchet/finder-new-file/blob/main/assets/source.scpt).
## Others Ressouces & Useful links
- [AppleScript to create a new file in Finder](https://gist.github.com/rarylson/5d20fc96335851365a02)
- [How to create a text file in a folder](https://apple.stackexchange.com/questions/84309/how-to-create-a-text-file-in-a-folder)
- [PNG to ICNS](https://github.com/BenSouchet/png-to-icns) (used to create the apps icons)## Author & maintainer
CW Wizard has been created and is currently maintained by [Ben Souchet](https://github.com/BenSouchet).The code present in this repository is under [MIT license](https://github.com/BenSouchet/finder-new-file/blob/main/LICENSE).