A quick way to paste in current md file im editing the name of the current note?

Hi all!

im looking for a quick way (via a script, using keyboard maestro etc) to quick paste in a current md file im editing the name of the current note:

image

anyone ever done such a thing? Any tips welcome!

thx

Z

?
It’s unclear what you’re trying to accomplish. Please clarify.

sorry I knew I wasn’t to clear… :slight_smile:

ok so im editing a markdown file in devonthink. I want to launch a script or macro to simply insert the current note name at cursor

so this

# header 1

becomes

# header 1

NAME of current NOTE

does that make more sense now?

thx

Z

You can’t insert at any arbitrary cursor location via AppleScript.
Something may be possible with KM, but I don’t use it so I can’t say for sure.

thx again @BLUEFROG

yeah KM can paste variables and clip contents so that can work. I wonder if anyone knows how to query via AppleScript to get or assign a variable in AppleScript the current name of the note you are editing?

thx

Z

Here’s a simple example…

Paste Record Name.kmmacros.zip (1.4 KB)

awesome!!!

thx so much that’s exactly what I wanted :slight_smile:

you rock @BLUEFROG, appreciate your help with this!

best

Z

PS

Something may be possible with KM, but I don’t use it so I can’t say for sure.

If I cane ever recommend of a software (apart from devonthink ofc) it would be keyboard maestro, if you have time explore it, its just so great :slight_smile:

You’re welcome.

Yeah, there are plenty of people who love it and that’s cool.

For all of you, I generally don’t use or advocate external applications, scripting additions, etc. as dependencies add complexity and also present a point of failure. I like to work with what’s already installed on a Mac so the likelihood of success is much higher. Also, dependencies add complexity to troubleshooting since it easily can be unclear if it’s your code or misbehavior of another application or resource.

Cheers!