I'm trying to paste a blank text document into a Finder path with a keyboard shortcut.
KM pastes the file fine into a document but it won't paste it into the Finder.
Essentially, I'm trying to copy a blank document wherever I happen to be when I use the shortcut.
Duplicating and moving doesn't work since it asks for a specific path. Any ideas?
In case I'm being dumb, here's why I'm trying to accomplish this; I'm trying to save the hassle of having to open up text editor, creating a new document, finding the save path to the place I want it to be. I'd rather just paste a blank, double click and begin writing. If there's an easier way to do this I'd love to hear it.
##Macro Library@Finder Create Blank Doc in Current Finder Folder @Example
####DOWNLOAD:
<a class="attachment" href="/uploads/default/original/2X/7/7d47c738dce4fce85d58fdabf428a788fe46900a.kmmacros">@Finder Create Blank Doc in Current Finder Folder @Example.kmmacros</a> (8.5 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
###How To Use
* Open Finder to the Folder where you want the new blank file to be created.
* Trigger this macro
* Accept default file name of "BlankFile.txt", or enter different name.
* File will be created in the Finder Folder (Insertion folder)
* File will be opened in the user's default app for that file type.
---
###ReleaseNotes
Author.@JMichaelTX
**NOTICE: This macro/script is just an _Example_**
* It is provided only for _educational purposes_, and may not be suitable for any specific purpose.
* It has had very limited testing.
* You need to test further before using in a production environment.
* It does not have extensive error checking/handling.
* It may not be complete. It is provided as an example to show you one approach to solving a problem.
**MACRO SETUP**
* **Carefully review the Release Notes and the Macro Actions**
* Make sure you understand what the Macro will do.
* You are responsible for running the Macro, not me. 😉
.
* Assign a Trigger to this maro.
* Move this macro to a Macro Group that is only Active when you need this Macro.
* ENABLE this Macro.
.
* **REVIEW/CHANGE THE FOLLOWING MACRO ACTIONS:**
* ALL Actions that are shown in the magenta color
**USE AT YOUR OWN RISK**
* While I have given this limited testing, and to the best of my knowledge it will do no harm, I cannot guarantee it.
* If you have any doubts or questions:
* **Ask first**
* Turn on the KM Debugger from the KM Status Menu, and step through the macro, making sure you understand what it is doing with each Action.
---
<img src="/uploads/default/original/2X/a/a6e019fba83637e3592ce366a2676d74ab5832a0.png" width="485" height="1473">
I'm just wondering whether it's possible to change this so that the highlighted text when the file is creates does NOT include the extension. That way I can just begin typing and then save.
Currently I have to select the title text and then begin typing.
Yes, this is very doable. First, in this Prompt for User Input action:
Change "BlankFile.txt" to just "BlankFile" (or even leave it blank) so that the extension is no longer there by default:
Then, to add the ".txt" extension automatically, insert a new "Set Variable to Text" action immediately after "Prompt for User Input" that sets the CBD__BlankFileName variable to %Variable%CBD__BlankFileName%.txt:
When finished, that section of the macro should look like this:
It's been "missing" since 2017, so I suspect there's been a change in the OS's behaviour since then -- if you look at the original screenshots above you'll see %FinderInsertionLocation% includes the trailing / in the returned path, but it doesn't in Mojave 10.14.6 (which is what I'm currently in front of).
Have you just jumped from High Sierra to Ventura? If so, you may be in for a few more shocks!