I read Using Hookmark with Zotero Using Hookmark with Zotero – Hookmark
I set it up.
But I can not use Hook with Zotero.
Hook shows: No linkable item in Zotero.
What do I do?
Please let me know.
Hook: Version 6.5 (6117; Integration v. 345)
Zotero: 7.0.7
Could you please
(1) Select a record in Zotero
(2) Run the following script in Script Editor and see if it return a markdown link?
Thank you
Summary
tell application id "org.zotero.zotero"
activate
end tell
set the clipboard to ""
delay 0.1
tell application "System Events" to tell process id "org.zotero.zotero"
keystroke "c" using {shift down, command down}
delay 0.1
repeat 20 times -- poll clipboard for ~2.5 seconds. Sometimes set x to the clipboard throws exception
try
set markdownLink to the clipboard
if markdownLink is not equal to "" then
exit repeat
end if
end try
delay 0.1
end repeat
end tell
return markdownLink
Could you please run the following script in Script Editor and see if it throws any error message?
Thank you
Script
tell application id "org.zotero.zotero"
activate
end tell
set the clipboard to ""
delay 0.1
tell application "System Events" to tell process id "org.zotero.zotero"
keystroke "c" using {shift down, command down}
delay 0.1
repeat 20 times -- poll clipboard for ~2.5 seconds. Sometimes set x to the clipboard throws exception
try
set markdownLink to the clipboard
if markdownLink is not equal to "" then
exit repeat
end if
on error errStr number errorNumber
display dialog errStr
end try
delay 0.1
end repeat
end tell
return markdownLink
tell application "Zotero"
activate
end tell
tell application "Script Editor"
set the clipboard to ""
end tell
tell application "System Events"
keystroke "c" using {shift down, command down}
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
the clipboard
end tell
Result:
""
tell application "Zotero"
activate
end tell
tell application "Script Editor"
set the clipboard to ""
end tell
tell application "System Events"
keystroke "c" using {shift down, command down}
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
the clipboard
--> ""
end tell
Result:
""