Have you ever been working and wanted to remember something for later, but found switching applications tedious?
Here’s a fun Keyboard Maestro script that allows you to highlight text anywhere and have it saved to the file of your choosing for later processing. Your computer will speak to you and tell you the process is complete!
I started this macro with a User Prompt. It asks the user to choose which file you’d like to save the text to. Of course, you need to create these files, store them in one place. If you ever move them, you’ll have to change the path in your script.
You can create as many files as you want or you can skip this step entirely if you plan to save all your text to the same file.
Since I have placed a drop down menu in the user prompt, we will need an If Then Macro to sort the 2 options. If the user has chosen the ‘Notes’ file, then we proceed with this action:
- If the variable, ‘Choose File’ (created in the User Prompt) contains ‘Notes’, then store the highlighted text to a Clipboard I created named ‘Temporary’.
- Use the ‘Append Text to File’ macro, and in the text area, simply add a return carriage by hitting the return key. This will ensure the highlighted text gets placed on its own line. Before moving on, make sure you choose the correct file path from the file path chooser.
- Use the ‘Append Named Clipboard ‘Temporary’ to File’ macro, choosing your file path once again.
There are some settings here; feel free to make any adjustments to your text. I prefer plain text for its portability.
Lastly, we have three macros to confirm it executed properly.
- We quit TextEdit (or whatever application you prefer) if it is open.
- The computer will now speak the words: “Text was appended to your Notes files”.
- Finally, we reopen TextEdit and the Notes file and see the result. You can remove this step once you see for yourself that indeed it worked for you. Note: we must close the file and reopen in order to see the results. The changes do not dynamically update themselves live. Although the changes were made, a refresh of the file will allow you to see them.
Lastly, we repeat the same steps again, and place them into the ‘otherwise execute the following options:’, or the ‘Else’ section of the Else If script step. However this time, you make a few small changes:
- change the file path to the To Dos file you created
- change the message the computer speaks from ‘Notes’ to ‘To Do’
Variations: As already mentioned, you can skip the whole If Then step, simplifying the process, but all your text goes to the same file. You could then duplicate this macro, change the file path and direct your text elsewhere; one keyboard shortcut for every file. You could also add a radio button to the User Prompt, asking whether this information is deemed important. Then you could add an If Then script step to apply a series of asterisks before the text is placed, in an effort to emphasize your notes later.
I hope you find this as useful as I do. With the addition of the ‘Speak Text’ macro, working on my Mac became even more fun.