Jump to content
Server Maintenance This Week. ×

Using links from Cogsci's Hook app


This topic is 688 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I would like to use a text field to store links from Hook, then use the OpenURL step to open the linked resources. But when I paste a Hook link into a text field, FileMaker renders it. For example:

hook://file/DOFUUff5c?p=SGFyZGluZy9GaWxlcw==&n=H1%20project%20outline%2Eooutline

gets pasted in as 

H1 project outline.ooutline

FM interprets what it can, and strips out the rest. I need for the field to store the raw text without modification. Of course, once it does this, there's no guarantee that OpenURL will recognize it, but one step at a time. If anyone else is using Hook, and has a workable method, I would like to hear about it.

Thanks.
 

Link to comment
Share on other sites

Filemaker text field does not "render" anything. If you see  H1 project outline.ooutline  as result of pasting into the field, then that's what you pasted into the field.

Is this what you refer to as Hook?
https://hookproductivity.com/

I've only glanced at it, and it seems it is designed to paste links into applications that support embedded links. Filemaker does not - at least not in a text field. I would guess that the clipboard contains both the "rendered" version and the URL in different formats, and when pasting into Filemaker the former gets selected. You can use AppleScript or the BaseElements plugin to verify this.

 

Link to comment
Share on other sites

Yes, you have correctly identified the app.

Sorry, I'm not sure I understand what you mean about verifying. Before I posted, I tested it by pasting into BBEdit, resulting in <hook://file/DOFUUff5c?p=SGFyZGluZy9GaWxlcw==&n=H1%20project%20outline%2Eooutline>. The only context where I've seen two versions of a link is when I pull in an HTML email as plain text. I just pasted into Mail, and got only the hook link just like in BBEdit. Now I've pasted into a Script Editor document with the same result. Is that what you meant by "verify" or do I need to do something else? (I'm not familiar with the BaseElements plugin.)

I know that it's not a conventional link, and would not have been surprised that FM couldn't open it. But I thought that I would be able to paste the raw text into a text field, even if the string was total gibberish. Your hypothesis that there is a second link sounds reasonable, but I'm not yet able to see evidence of it.

 

Perhaps I should clarify that, even if FM will not open the link, I can use a combination of AppleScript and Keyboard Maestro to open it. So, I don't need for FM to open the link, but I *do* need to be able to paste the link into FM without modification.

Link to comment
Share on other sites

3 minutes ago, -dp- said:

Your hypothesis that there is a second link sounds reasonable, but I'm not yet able to see evidence of it.

Well, that's exactly what I meant by "verifying". If you have the BaseElements plugin installed, you can use the BE_ClipboardFormats function to see what formats the current clipboard contains, and then the BE_ClipboardGetText function to view the content of each format. You can do a similar thing using AppleScript and very likely some other application.

Note that when you copy the text from here:

<hook://file/DOFUUff5c?p=SGFyZGluZy9GaWxlcw==&n=H1%20project%20outline%2Eooutline>

and paste it into Filemaker, you get exactly what you expect. So clearly when you paste your original link, the clipboard contents are different.

 

Link to comment
Share on other sites

This topic is 688 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.