Hi,
MarginNote has finally brought out a long-awaited new major version and released MarginNote 4. It’s great!
Since the old Hookmark scripts no longer worked, I’ve created a very simple replacement based on UI scripting. It seems to work without issues in my testing.
Get Name
try
tell application "System Events" to tell process "MarginNote 4"
delay 0.1
click menu item "Copy Card Clone" of menu "Card" of menu bar 1
delay 0.1
set clipboardContent to the clipboard
end tell
-- Retain only the content up to the first line break
set theURL to paragraph 1 of clipboardContent
return theURL
on error msg
display dialog msg
end try
Get Address
try
tell application "System Events" to tell process "MarginNote 4"
delay 0.1
click menu item "Copy Card URL" of menu "Card" of menu bar 1
delay 0.1
set clipboardContent to the clipboard
end tell
set theTitle to the clipboard
return theTitle
on error msg
display dialog msg
end try