Interesting. It works when running from script editor with delay being 1 or 0.5, but not when invoked from hookmark. I will look into the potential issue of another app being a problem. Thanks.
I am still struggling to get this to work. With the same script in the get address section of Hookmark, I get no linkable item found when initiated with my keyboard shortcut through Logos app. When the same script is ran from script editor, it can return a markdown link. As far as I can tell, there are no other issues with UI Scripting. I can press option command C and it copies the appropriate link every time in the Logos app, as well as script editor scripting those keys and it correctly getting the url. Any ideas why itās not working through Hookmark for me? Thanks.
Which version of Logos are you running?
Logos has made some changes in their links in the newest version.
I am running version 37.2.12 which I believe is the newest version.
Iām running 38.0
Under the share menuā¦ do you see thisā¦?
Or do you still see the old version way of choosing which type link you want ā¦ e.g. L4 etc.?
Sorry about this issue, @tylermcrae7 .
Here is the new Get Address script. Please give it a try and see if it works. Please
(1)Replace the Get Address scritp with the one at below
(2) Take out the āOpen Itemā script
(3) Remove the scheme ālogosresā.
(4)Click on Save button
Thank you
Get Address
tell application "System Events"
--delay 1
set the clipboard to ""
delay 0.1
keystroke "c" using {option down, command down}
delay 0.1
repeat 10 times -- poll clipboard for ~1 seconds. Sometimes set x to the clipboard throws exception
try
set theLink to the clipboard
if theLink is not equal to "" then
exit repeat
end if
end try
delay 0.1
end repeat
set AppleScript's AppleScript's text item delimiters to "~"
set theItems to text items of theLink
set theTitle to item 2 of theItems
return "{\"name\":\"" & my base64encode(theTitle) & "\", \"address\":\"" & my base64encode(theLink) & "\"}"
end tell
on base64encode(str)
return do shell script "base64 <<<" & quoted form of str
end base64encode
That part doesnāt matter (most likely). Just copy the link from Logos to the clipboard and then use Hookmarkās āHook the selective item with the link in pasteboardā option.
Thanks for the help friends! I have got it working with the script provided by @bchend.
In the latest Logos beta, the link that is returned is in the format of: https: //ref.ly/logosres/esv?ref=BibleESV.Jas1.1-27
Most of the other link formats are removed. Will it be possible to utilize this new format with Hookmark?
Thank you for letting us know, @arthurwerry .
Can you do āCopy Locationā using option+command+c shortcut? Is this menu still available in Gear button menu:
Bi Ling
Yes, option+command+c still works.
This is what the Logos menu now looks like:
The copy link is now found under the Share menu.
The default link that is copied to the clipboard is now:
https: //ref.ly/logosres/lenski10?ref=Bible.Jas1.26
There is a āCopy specialā menu nowā¦ where you can choose the logos4 link format that returns:
logosres:esv;ref=BibleESV.Jas1.26
Let me comment too. With Logos v37+, this is the new UI:
Thanks to the friends who posted these screenshots above.
v37+ supports some, but not all of the earlier types of links (v <= 36).
Hereās what was there in earlier versions:
I crossed those that are no more available with v37+.
As you can see in the screenshots above, both versions use CMD-OPT-C
and provide clickable options. The CMD-OPT-C
calls what option you used last, so itās an auto-redefinable keyboard shortcut that automatically remembers your preference based on your last choice.
Back to comparing the versionsā¦
The UIās appearance has dramatically changed from v37, and out of the options that were available before v37, URL and L4 type links seem to be the sole survivors. To me thatās fortunate, becauseā¦
- URL (
https://ref.ly/logosres
ā¦) links are like Hookmarkās universal links. They have their uses in tools that donāt support L4ās custom links. But if one follows them using a browser that doesnāt auto-follow them, they spawn browser tabs and make following the links quite slow. Which is why many prefer L4 links when they work wellā¦ (And the browser tab loads the appās web equivalent in case someone is on a computer where they donāt have the desktop app - this can be useful, or annoying if youāre using the desktop app, because it slows things down much more while the browser app loads and offers you to follow through in your desktop app.) - L4 (
logosres:
ā¦) custom links canāt be pasted in e.g. Google Docs and some other tools. But for any tool that supports them, clicking them summons the desktop app very efficiently. No waiting for a browser to do any kind of middle-management.
Both types of links can be generated by v37+ of the desktop app using the same keyboard shortcut as in the previous versions: CMD-OPT-C
. This shortcut generates either of URL or L4 links based on what you used last. And there might sometimes be some quirks with this until you go click through the menus to remind it what you prefer by clicking on the appropriate choice. Then the next times the keyboard shortcut should follow your preference.
I performed some experiments (as I didnāt copy-paste much links since v37 appeared) and I think the behavior is exactly the same in all aspects (apart from where you find the options in the UI, and the disappearance of the other crossed options above). Thus, I think v37 can be considered a reskinned UI over the same UX.
Given all the above, as long as Hookmarkās script for Logos uses the keyboard shortcut CMD-OPT-C
, things should work and should be flexible enough to support both kinds of situations (when URL or L4 links are preferred).
One Shortcut to rule them all,
One Shortcut to link them,
One Shortcut to bring them all and in the light free them.
Thank you, @danieljomphe .
We have updated our script server with the support for Logos. It assumes that cmd+option+c will return a URL or L4 link.
Script version is 345.
Thanks @bchend for making it easier for all Logos users!
This new version seems to work better than the earlier ones too, BTW.
Thereās an internal Notes tool in the Logos app and I was curious to see if itās possible to lift its links for Hookmark. And it is! All thatās needed is adding one more case for the EditNoteId
delimiter to this part of your Get Address script:
if theLink contains "~" then
set theDel to "~"
else
if theLink contains "ref=" then
set theDel to "ref="
else
set theDel to "EditNoteId="
end if
end if
In fact, there are many other kinds of tools inside of Logos, and I suspect that if I was to copy links out of each type of tool, the param name to identify them would differ. (Except if all other tools used e.g. ref
.)
BTW I found this webpage that explains Logos Hyperlinks but since it doesnāt even mention EditNoteId
for Note documents, I suppose we could say the information is quite incomplete.
I might come back to this sometime in the future to contribute improved coverage.
BTW I must mention that Logos is such a strong platform for cross-referencing resources that I didnāt really feel the need until now to use Hookmark within and between Logos resources and documents.
But I could see myself finding Hookmark more efficient, more quickly accessible to peruse such cross-references. (Just playing with hooks between my current Notes document and this other resource I linked it tooā¦ wow the potential!)
If we raised Hookmarkās support level to all types of Logos documents (if possible), this might become true.
Iām wonderingā¦ are some friends here very much used to Hookmark already yearning for this, and why, and how?
What would you like to achieve with such support?
(Obviously Hookmark is very powerful for cross-referencing Logos resources with external documents and the added official script will be quite helpful!)
My primary use of Hookmark with Logos is grabbing the L4 link and placing that link into other note documents to quickly jump back to that particular scripture reference. I could do this utilizing some other tool and the script that was created to grab the L4 link, but I have a habit of using Hookmark so it is the best tool to do this for me. I am a Music Minister and mainly just have scripture references in a note that I use to help with transitions between songs and to reinforce thoughts for the week. Itās nice to be able to quickly jump back to those scriptures to read them again.
I am beginning to use Logos to read books as well. Logos already has a great feature of embedding the scripture links within a book to the scripture that it is referencing. I love being able to hover over the reference and read the scripture inline with my book reading.
I could see the potential use of Hookmark within logos if you were preparing a sermon and have thoughts and resources all throughout logos and then hooking all of those things together to quickly get back to the thought. I just personally donāt have that use case for now!
Thanks everyone for looking into all of this! You all have made Hookmark and my use of Logos much better and efficient!
For a number of my sermons, I did use Logos exclusively. I didnāt see a need for Hookmark.
- I opened a bunch of books and reference material (bibles, dictionaries, commentaries, whitepapers, etc.) and started highlighting things of interest with different colors.
- Then I would copy-paste relevant bits in a Notes document to start arranging my thoughts. With one setting enabled, Logos helpfully adds a bibliographical link at the end of of my citations. Following the link leads you back to the exact location (a deep link, in Hookmark parlance).
- Then in my Sermon document, I would write what Iām planning to say in short form or long form, and if I wanted to copy-paste some of those passages, Iād include the citation link.
(Also, thereās even an external copy-pasting tool. Say youāre in e.g. Google Docs and want the John 3:16 passage in your document. Instead of switching to Logos, browsing to that reference, copying the passage, then getting back to Google Docs to paste it, you can just type Jn 3:16 in Google Docs and hit Shift-Command-E
. In your document will appear the passage thanks to an automation from Logos, all performed in the background for you. For it to work, though, you might need to enable the shortcut in your Macās System Preferencesā Keyboard shortcuts for text services.)
Thus there was never a time when some passage in any of my documents, either in Logos or outside of Logos, didnāt come with its citation link to get back to the resource from which I copied it.
Also, when opening any of these resources (bible, book, dictionary, commentary, etc.), I could at any time call for a search of where this resource was cited by any other resources in my library, or by me in any of my personal documents inside of Logos. So I felt supported by Logos. This is such a serious tool for the professional academician and the laymanās needs! (I started using Logos in 2013 and I can say this software changed my life, along with some people who were also users of Logos and producing great content. It helped make a scholar (layman) out of me; I finally had a workflow for serious Bible study that I could see myself using and loving, and, oh how I used it! Thus I like Luc Beaudoinās and CogSci Appsā vision of enabling us to do serious cognitive work with well conceived tools.)
With all that said, when I played with the new support of Hookmark hooks between my Bible and my Notes document this morning, I could see how Hookmark can make some things faster. No need to scroll in my Note to the area where this passage is cited to click on its link to get back to the resource. And from the resource, no need to cross the cognitive gap of having to launch a āCited byā search before I can find back my Notes document. Iāve always been wondering if itās ok to expend more effort by calling Hookmark in the middle of this process. But if copying a link or a deep link is as easy as summoning a Hookmark shortcut, then I can get more out of what Iām already doing. Food for future thought and experimentation.