I’ve come back to Spark 2 (v 3.20.0) after a long break, and found that hookmark no longer works with it. A control h gives %5B%5D() on any message. Has anyone got a set of scripts that work?
Sorry about this issue, @Chris .
We just updated our script server, version 353. Could you please go to Hookmark setting s window->Update, click on Check now button?
You might need restart Hookmark.
Thank you
Thanks. After updating the script it’s now working for me.
Chris
Spark Mail Version 3.23.1 is no longer working for me. I note that with a mail message selected, Shift command L returns the url of the message. It seems that the applescript does not.
Thank you for contacting us, @Chris .
I just tested it and it appears to be working fine.
Hookmark uses command+L to get the email deep link. Does command+L copy the deep link on your mac?
I think the issue may be that I use the Setapp version, and Hookmark might not recognise it?
Thank you, @Chris .
We have updated the script server with the fix to support Spark Setapp version. Please update your local script and give it a try.
Updated, working now, thank you
New user here. It seems that integration v 385 is not working with Spark Desktop 3.26.0. Or is it just me?
Welcome to Hookmark forum, @mountain .
I just tried it and it seems to be working on my mac.
Could you please post the screenshot of Hookmark window?
Thank you
Thank you, @mountain .
Hookmark uses the shortcut command+”L” to get the email deeplink. If you press command+l in a Spark email, what do you get? You can check if the shortcut for Copy Deep Link is command+L.
Hi. I have the default key bindings, and I see the CMD+L link when invoking through CMD+K. When I manually press CMD+L, it copies the link just fine
Thank you, @mountain .
Could you please open a Spark email, then run the following script in Script Editor? Please let us know if it returns something like [ maildeeplink ]( maildeeplink ).
Script
use framework "AppKit"
use scripting additions
use framework "Foundation"
tell application "Spark Desktop"
activate
end tell
set the clipboard to ""
delay 0.2
-- wait until shift and ctrl keys aren't held down
property NSEvent : a reference to current application's NSEvent
property NSShiftKeyMask : a reference to 131072
property NSControlKeyMask : a reference to 262144
property NSAlternateKeyMask : a reference to 524288
set interfering_modifier_down to true
repeat while interfering_modifier_down
set modifier_flags to NSEvent's modifierFlags()
set shift_down to ((modifier_flags div (get NSShiftKeyMask)) mod 2) = 1
set control_down to ((modifier_flags div (get NSControlKeyMask)) mod 2) = 1
set option_down to ((modifier_flags div (get NSAlternateKeyMask)) mod 2) = 1
set interfering_modifier_down to shift_down or control_down or option_down
end repeat
tell application "System Events" to tell process "Spark Desktop"
keystroke "l" using {command down}
delay 0.2
repeat 10 times -- poll clipboard for ~1 seconds. Sometimes set x to the clipboard throws exception
try
set theUrl to the clipboard
if theUrl is not equal to "" then
exit repeat
end if
end try
delay 0.1
end repeat
end tell
return "[" & theUrl & "](" & theUrl & ")"
hi
I ran the script from script editor, and I can confirm that it returns something in the format of “[readdle-spark://bl=QTpvYmREDACTED](readdle-spark://bl=QTpvYmREDACTED)” in the script editor.
Thank you, @mountain .
Could you please go to Hookmark Settings window→Scripts→Spark Desktop→Get Address, replace the script with the following script? Then invoke Hookmark on a Spark email and let us know the result.
Thank you
Script
use framework "AppKit"
use scripting additions
use framework "Foundation"
set the clipboard to ""
delay 0.2
-- wait until shift and ctrl keys aren't held down
property NSEvent : a reference to current application's NSEvent
property NSShiftKeyMask : a reference to 131072
property NSControlKeyMask : a reference to 262144
property NSAlternateKeyMask : a reference to 524288
try
set interfering_modifier_down to true
repeat while interfering_modifier_down
set modifier_flags to NSEvent's modifierFlags()
set shift_down to ((modifier_flags div (get NSShiftKeyMask)) mod 2) = 1
set control_down to ((modifier_flags div (get NSControlKeyMask)) mod 2) = 1
set option_down to ((modifier_flags div (get NSAlternateKeyMask)) mod 2) = 1
set interfering_modifier_down to shift_down or control_down or option_down
end repeat
tell application "System Events" to tell process "Spark Desktop"
keystroke "l" using {command down}
delay 0.2
repeat 50 times -- poll clipboard for ~1 seconds. Sometimes set x to the clipboard throws exception
try
set theUrl to the clipboard
if theUrl is not equal to "" then
exit repeat
end if
end try
delay 0.1
end repeat
end tell
display dialog theUrl
return "[" & theUrl & "](" & theUrl & ")"
on error errMsg
display dialog errMsg
end try
hi, I followed your instructions (and hit “Save” for the updated scripts code), but the latest code you supplied does not work with Spark Desktop. Smae error as before
Thank you, @mountain .
Is there a dialog box before you see the “No linkable item…” window? Is your Spark Desktop from Setapp?
Hi, the spark desktop app is from the App Store, not setapp. There’s no dialog box that appears. However, I see that the code you sent me is not the same as the code you had sent me previously which I had confirmed to work when running from script editor; did you intend to ask me to insert the code that worked into the app but instead gave me a non-working version of the code instead?
ok, I think I figured this out. the issue is that the sparkdesktop app I use is from the AppStore.
In script editor when I ran : id of application “Spark”
I get → “com.readdle.SparkDesktop.appstore” which did not figure on the list of apps listed in Hookmark settings menu when clicking on “only show installed apps”. The default “Spark Desktop” dissapeared.
this behaviour is inconsistent because when running the script provided by Hookmark support directly from Script Editor, it found the app just fine.
the solution was to add another SparkDesktop app, now appearing with the correct com.readdle.SparkDesktop.appstore, and copy the default hookmark Get Name script from the com.readdle.SparkDesktop app into the Get Name for com.readdle.SparkDesktop.appstore.
this solved my problem. Although perhaps com.readdle.SparkDesktop.appstore should be included by default in the list provided by Hookmark as it will otherwise fail.
What still doesn’t work though is the indication of a linked item in the menu bar when reading an email, I have to invoke hookmark to see if there is a linked item in this thread.


