Hi. Im writing a macro using both keyboard maestro and AppleScript to fill in programmatically a new note. I am struggling to understand how to refer (ie fill) the geolocation
field. I have managed to fill in the name, URL etc but cant understand how to do so for the `geolocation field. This is the current section
set theRecord to create record with {name:theClipboard, geolocation:LongLat, URL:LongLat, type:markdown, source:"# " & (the clipboard)} in theGroup
any idea? this is the full AppleScript btw
tell application "Keyboard Maestro Engine"
set LongLat to getvariable "longlat"
end tell
-- Create markdown record in specific group
tell application id "DNtp"
try
set theGroup to (get record with uuid "71A39E6F-DA44-4FBE-91C7-5E198D25122E") -- this is an UUID. Copy the Reference URL via the menu and delete everything before (and including) "://"
set theClipboard to the clipboard
set theRecord to create record with {name:theClipboard, geolocation:LongLat, URL:LongLat, type:markdown, source:"# " & (the clipboard)} in theGroup
-- set theRecord to create record with {name:"Test", type:markdown, source:"#"} in theGroup
set label of theRecord to 1 -- not sure which label is "todo"
-- create a new markdown record
#open window for record theRecord -- uncomment if you want to open the new record
#activate
#open window for record theGroup -- uncomment if you want to open the group
#activate
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
end try
end tell
Also I created a keyboard maestro macro to strip away lat/long from google map links which I can share gladly if anyone has interest?
best
Z