User prompt to things3 todo

Hello guys!

I am trying to make a quick user prompt for the things3 todo app.

what is wrong with it?

sorry for my newb-ness :blush:

Execute an AppleScript.kmactions (947 B)

I don't have Things, but in your AppleScript, you're setting _Skriven to an empty string, because there's nothing within the quotes. I think you want this:

set _Skriveri to getvariable "TODO"

I'm assuming TODO holds the name of the to do that you want to pass to Things.

-rob.

Hello rob!

Thanks you!

It is still not working.

Is the
{name:"_skriveri"}

the right syntax?

because the inputtext in things is "_skriveri" and not the variable

I am not an AppleScript wizard (at all!), but I think you need to lose the quotes around _Skriveri. If that doesn't work, maybe one of the wizards will reply.

-rob.

I wonder if the Things 3 global Quick Entry hotkey might be useful for you.

Save yourself some work and use the Things "Quick Entry" function -- by default, ⌃Space:

While that doesn't work if Things isn't running you can get around that with this macro:

Things Quick Entry.kmmacros (5.0 KB)

Image

If you do want to go the AppleScript route then (remembering that it is good practice to use local variables in KM whenever possible, and that means you need to reference the macro instance too) this should do it:

Things Quick Entry (AS).kmmacros (3.0 KB)

Image

...where the AS is:

set inst to system attribute "KMINSTANCE"
tell application "Keyboard Maestro Engine"
	set _Skriveri to getvariable "Local_todo" instance inst
end tell

tell application "Things3"
	make new to do of list "Inbox" with properties {name:_Skriveri}
end tell

Perhaps worth noting that Cultured Code are recommending that you use Shortcuts instead of AppleScript now. That doesn't stop you from using KM, though! You can drive a simple Shortcut:

...from a KM macro:

image

2 Likes

Thank you so much! It is working now :slight_smile: