This will greatly improve work efficiency.
PopClip has this function,KM if supported, I think it will be better.
This is the connection of the files and Source Code
This will greatly improve work efficiency.
PopClip has this function,KM if supported, I think it will be better.
This is the connection of the files and Source Code
how to do it
Hi @live,
I'm not familiar with Shell at all, but I made some attempts. I've made it to work. See if you are satisfied with it or not.
First, I downloaded the extension to my Downloads folder. All files are saved in the "Notes" folder that is in the Downloads folder.
We have to edit the original "notes.sh" file, from:
./MessageMaker2.app/Contents/MacOS/MessageMaker2 notes text "$POPCLIP_TEXT" > /dev/null &
to:
# First, read from the SystemClipboard.
# The text in the SystemClipboard will be the default text to the Note content.
clipboard="$(pbpaste)"
./MessageMaker2.app/Contents/MacOS/MessageMaker2 notes text "$clipboard"
Now, in Keyboard Maestro, I made a macro with two actions. The first is "Copy", the second is a shell script.
You need to change <your user name>
to your own user name. If the "Notes" extension folder is located elsewhere, then cd
to that folder.
###########################################
Alternatively, you may change the "notes.shell" to give a full path:
/Users/<your user name>/Downloads/Notes/MessageMaker2.app/Contents/MacOS/MessageMaker2 notes text "$clipboard"
Then, you can use the Execute Shell Script File action.
That's it!
Now, you can set a trigger for the macro.
Select any text, and trigger the macro.
Hope it helps!
amazing @martin,
and thanks @live for finding the source code
Here's a zip of the files, notes.sh
includes Martin's code
NotesKM.zip (61.0 KB)
I placed the unzipped folder in /Applications so I remember it's important.
To make the script executable, open Terminal,
cd
to the unzipped folder directory, and
run this command once:
chmod +x notes.sh
I literarily googled all the steps I took to make it work, except for the "Copy" action in KM.
Thanks, @live, for asking this question. I actually bought PopClip after making this macro. KM can probably do all thing that PopClip can do, but having a menu show up upon text selection is very neat.
Thanks for @martin & @hello 's help very much!
but I don't know how to program. Errors are reported all the time, so it can't be realized on km. It would be great to have a km file. Click Run. Solve the problem of a computer idiot like me
I've just bought PopClip too after reading this current thread (it's on the Mac App Store) and really liking it. The Extensions make it so flexible. I love the Extension to search for the selected text in Apple Music - makes it very easy to find tracks that I have in in Spotify Playlists that I'd like to also have in Apple Music.
Sorry, I don't know how to make the same thing with KM only. I'm a newbie in this field.
If you follow the steps I described above, it should work.
@hello has done you a favor in zipping the script files. You can use his file, upzip to a folder, and follow the steps he shows.
The only thing you may have not known is how to cd to the folder.
You can right click on the "Notes" folder which contains the the "notes.sh" file.
Then hold down the Option key, and then click "Copy 'Notes' as Pathname".
Then you can open the Terminal, type "cd " (there is a space after 'cd') then paste the Pathname after.
Then you can run the command once:
If you still have problems, just post them to the forum. Don't forget to tell us what exactly you did.
In which step are you?
This is great. (I plan to purchase PopClip also.) Here's a macro that incorporates the information above.
Download: Text to Note.kmmacros (24 KB)
Note: I revised the Text to Note macro 2023-07-03.
can you try
cd
to the directory where you unzipped the NotesKM folder,./notes.sh
When you are doing it in the Terminal, you don't need a KM macro. You just run the 'notes.sh' file.
If it works in the terminal, then you can integrate it in a KM macro, as I've shown in my first reply:
Unzip the archive that @hello provided. When you do you will get a folder named NotesKM. Place the folder anywhere you like, but note the location.
Then after installing and enabling the macro that I provided (named Text to Notes), move to the bottom portion of the macro where you will see the orange-colored Set Variable to Text action (local_Folder). Change that value from ~/Documents/Automation/_Keyboard Maestro/ to the folder path where you placed the NotesKM folder. (Note that ~ represents you Home folder, e.g., ~/Documents is your personal Documents folder.)
Note: If you follow the above instructions, you will not need to run the chmod +x notes.sh command.
Thank you very much, perfect solution!
#!/usr/bin/env bash
cd /Users/live/Documents/Other/NotesKM
./notes.sh
@live, glad you got this working! My thanks to you and the others that made me aware of the MessageMaker2.app. It will be very useful.
I can't find "MessageMaker". Is it part of PopClip?