# DEVONthink script

**URL:** https://discourse.hookproductivity.com/t/devonthink-script/1242
**Category:** Discussion & Help
**Created:** [February 13, 2020, 9:50pm UTC](https://discourse.hookproductivity.com/t/devonthink-script/1242 "2020-02-13T21:50:23Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![canadasteven](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/c/9dc877/32.png) [@canadasteven](https://discourse.hookproductivity.com/u/canadasteven)
#### Post date: [February 13, 2020, 9:50pm UTC](https://discourse.hookproductivity.com/t/devonthink-script/1242/1 "2020-02-13T21:50:23Z")

</div>

In order for DEVONthink to display clickable links, the new document needs to be markdown  
[link to devonthink forum](https://discourse.devontechnologies.com/t/x-callback-url-how-to-create-clickable-link-inside-dttg-to-external-app-in-this-case-drafts-on-ipad-iphone/53666)

So I modified the script in Hook to change the type:txt to type:markdown

Question: how can I copy the markdown link within this script (not using the shortcuts), and THEN paste this in the main body of the new document? [I know I can do this manually, but it takes many steps,

1. open hook,
2. then command M which copies the markdown link,
3. then I open hook again, choose new DEVONthink file using my modified script, run it,
4. open the devonthink file and
5. paste in the body

I have also tried to add:  
tell application “System Events” to key code 9 using command down  
which should be paste from clipboard  
[cool list of Mac system events](https://eastmanreference.com/complete-list-of-applescript-key-codes)  
this did not work

---

_[View the full topic](https://discourse.hookproductivity.com/t/devonthink-script/1242)._
