<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6520941908238556891</id><updated>2024-09-21T16:22:02.409+03:00</updated><category term="all my posts"/><category term="AppleScript"/><category term="Skim"/><category term="DevonThink"/><category term="MediaWiki"/><category term="hyperlink"/><category term="BibDesk"/><category term="LaTeX"/><category term="TextMate"/><category term="Adobe Acrobat Pro"/><category term="AutoBookmark"/><category term="PDF"/><category term="Windows"/><category term="the big picture"/><category term="updated"/><category term="BetterTouchTool"/><category term="Finder"/><category term="IPhone"/><category term="Mac"/><category term="MindMeister"/><category term="for downloading"/><category term="iPad"/><category term="mind map"/><category term="notes"/><category term="video"/><category term="virtual machine"/><category term="Calibre"/><category term="FastScripts"/><category term="MAMP"/><category term="Mac mini"/><category term="MacBook Pro"/><category term="Mind Manager"/><category term="QuicKeys"/><category term="Semantic MediaWiki"/><category term="audio"/><category term="hypermedia"/><category term="updated II"/><title type='text'>A Digital Workflow for Academic Research</title><subtitle type='html'>Tools for Knowledge and Knowledge for Tools - http://www.johnsidi.com</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>johnsidi</name><uri>http://www.blogger.com/profile/10292312520284034067</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-4665635892280451934</id><published>2011-09-06T21:05:00.009+03:00</published><updated>2022-02-22T14:00:05.884+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><title type='text'>This is my last post in Blogger. </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
The web address of my new blog is:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.johnsidi.com/&quot;&gt;http://www.johnsidi.com&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/4665635892280451934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/4665635892280451934?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4665635892280451934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4665635892280451934'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/09/httpwwworganognosicom.html' title='This is my last post in Blogger. '/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-8769455282811019314</id><published>2011-06-24T11:38:00.000+03:00</published><updated>2011-06-24T11:38:24.008+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="BibDesk"/><category scheme="http://www.blogger.com/atom/ns#" term="DevonThink"/><title type='text'>Send DEVONthink tags to BibDesk as keywords</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Continuing in the same spirit as in &lt;a href=&quot;http://organognosi.blogspot.com/2011/06/convert-devonthink-tags-to-mediawiki.html&quot;&gt;the previous post&lt;/a&gt;, I wrote an AppleScript for sending DEVONthink tags to BibDesk. Only one item should be selected in DEVONthink and BibDesk. No duplicate keywords are created in BibDesk.&lt;br /&gt;
&lt;br /&gt;
The AppleScript code is the following:&lt;br /&gt;
&lt;blockquote&gt; tell application &quot;BibDesk&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; --only one item should be selected in BibDesk&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set thePub to the selection of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set keywordsPub to keywords of (item 1 in thePub)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set old_delimiters to AppleScript&#39;s text item delimiters&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; --the space inside quotes is very important!&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set AppleScript&#39;s text item delimiters to &quot;, &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set keywordsPubList to text items of keywordsPub&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set AppleScript&#39;s text item delimiters to old_delimiters&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
end tell&lt;br /&gt;
&lt;br /&gt;
tell application &quot;DEVONthink Pro&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set thisSelection to the selection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if thisSelection is {} then error &quot;Please select something&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (length of thisSelection) is greater than 1 then error &quot;Please select only one item&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set thisItem to (item 1 of thisSelection)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set tagsItem to tags of thisItem&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with x from 1 to the count of tagsItem&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set positionOfDuplicate to list_position(item x of tagsItem, keywordsPubList) of me&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if positionOfDuplicate is 0 then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set keywordsPub to keywordsPub &amp;amp; &quot;, &quot; &amp;amp; item x of tagsItem&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set keywordsPub to keywordsPub&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
end tell&lt;br /&gt;
tell application &quot;BibDesk&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if the first character of keywordsPub is &quot;,&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set keywordsPub to text 3 thru -1 of keywordsPub as text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set keywords of (item 1 in the thePub) to keywordsPub&lt;br /&gt;
end tell&lt;br /&gt;
&lt;br /&gt;
--subroutine from &quot;AppleScript 1-2-3&quot; p.567 for checking for duplicates&lt;br /&gt;
on list_position(this_item, this_list)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with i from 1 to the count of this_list&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if item i of this_list is this_item then return i&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0&lt;br /&gt;
end list_position&lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/8769455282811019314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/8769455282811019314?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/8769455282811019314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/8769455282811019314'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/06/send-devonthink-tags-to-bibdesk-as.html' title='Send DEVONthink tags to BibDesk as keywords'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-4033110366598096216</id><published>2011-06-18T20:59:00.001+03:00</published><updated>2011-06-24T12:10:52.778+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="DevonThink"/><category scheme="http://www.blogger.com/atom/ns#" term="MediaWiki"/><title type='text'>Convert DEVONthink tags to MediaWiki categories</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;DEVONthink has a quite efficient tagging capability. Especially, the autocomplete feature of the tag bar, at the lower part of a DEVONthink window, saves me a lot of time and provides increased consistency in my tags. &lt;br /&gt;
&lt;br /&gt;
Moreover, I maintain a separate page in my wiki for each book or paper that I have read. There I write all my notes and thoughts about each source. MediaWiki&#39;s name for tag is category and the required markup code for it is the following:&lt;br /&gt;
&lt;blockquote&gt;[[Category:tagName]]&amp;nbsp; &lt;/blockquote&gt;As I did not want to insert manually the tags for each source twice I wrote an AppleScript, which converts DEVONthink tags to MediaWiki categories. One item should be selected in DEVONthink before executing the script. The result is sent to the clipboard.&lt;br /&gt;
&lt;br /&gt;
The AppleScript code is the following:&lt;br /&gt;
&lt;blockquote&gt;--2011-06-18&lt;br /&gt;
--http://organognosi.blogspot.com&lt;br /&gt;
&lt;br /&gt;
tell application &quot;DEVONthink Pro&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set thisSelection to the selection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if thisSelection is {} then error &quot;Please select something&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (length of thisSelection) is greater than 1 then error &quot;Please select only one item&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set newCategories to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with thisItem in thisSelection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set tagsItem to tags of thisItem&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with eachTag in tagsItem&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set tagForCategory to eachTag&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if tagForCategory is in {&quot;Linked with MediaWiki&quot;} then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set newCategories to newCategories&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set newCategories to &quot;[[category:&quot; &amp;amp; tagForCategory &amp;amp; &quot;]] &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to (the clipboard) &amp;amp; newCategories&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
end tell&lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/4033110366598096216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/4033110366598096216?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4033110366598096216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4033110366598096216'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/06/convert-devonthink-tags-to-mediawiki.html' title='Convert DEVONthink tags to MediaWiki categories'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-1908968917903158157</id><published>2011-06-10T21:57:00.001+03:00</published><updated>2011-06-10T22:33:35.027+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="MediaWiki"/><category scheme="http://www.blogger.com/atom/ns#" term="notes"/><category scheme="http://www.blogger.com/atom/ns#" term="Skim"/><title type='text'>Export Skim notes according to their highlight colors</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Adam Cronkright mentioned, in a thread &lt;a href=&quot;http://sourceforge.net/mailarchive/message.php?msg_id=27596299&quot;&gt;in the Skim forum&lt;/a&gt;, that he uses different colors for highlighting various sections of a PDF, which have a common characteristic (e.g. author&#39;s points he agrees with, points he disagrees with, good phrases...). His problem is that he would like to have an efficient way to organize these different categories of notes and Skim&#39;s present features does not help him much to this end.&lt;br /&gt;
&lt;br /&gt;
I think that a way to solve this problem is to use a specialized app for note management and an AppleScript, which exports Skim notes according to their color. So I found a reason to write an additional AppleScript or actually two!&lt;br /&gt;
&lt;br /&gt;
The first is a simplified version, which has only one prerequisite for execution. Particularly, you need to use one or more of the following colors: ice, honey drew, flora, lemon, cantaloupe, silver, which are shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG4GNCzHm6or9j7B2GZ1Wkmfsht0HGHrFXKmxLAvKu-Q6kde700-Vn5ey5kMhr8Gh4i826fsLiMPu8AVvve_EeAFSteJDnmf4zHG5wBPbNdi8qCt5YJt2bToUxf25B60I6vRccOrqkwZNL/s1600/Favorite+Colors.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;67&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG4GNCzHm6or9j7B2GZ1Wkmfsht0HGHrFXKmxLAvKu-Q6kde700-Vn5ey5kMhr8Gh4i826fsLiMPu8AVvve_EeAFSteJDnmf4zHG5wBPbNdi8qCt5YJt2bToUxf25B60I6vRccOrqkwZNL/s200/Favorite+Colors.JPG&quot; width=&quot;200&quot; /&gt;&lt;/a&gt; &lt;/div&gt;&lt;br /&gt;
You can change a color in the Favorite Colors by dragging a new color  from the Color Panel (Tools&amp;gt; Show Colors) and drop it on the Favorite Colors toolbar item.  Hold down the Option key to add a new color. You can remove a color from  the Favorite Colors by dragging it to the Trash &lt;a href=&quot;http://sourceforge.net/apps/mediawiki/skim-app/index.php?title=Tips_and_Tricks#Changing_Colors&quot;&gt;(from Tips and Tricks &lt;/a&gt;page in Skim&#39;s wiki).&lt;br /&gt;
&lt;br /&gt;
Each color in Skim is represented as a list of four numbers (red, green, blue, alpha). The fourth number is constant (65535). For example, the ice color is represented by the list&amp;nbsp; {26214, 65535, 65535, 65535}. So you can change the hardwired colors in the scripts if you know the corresponding RGB (red, green, blue) code in 16-bit format for your preferred colors. Then you can add it in in the chooseColor subroutine (see the AppleScript below).&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
When you execute the script the following windows will open consecutively:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXGmVNd_dWrt4pccJgy_KJphyphenhyphenw9v1EhZGooDZ3EivEWE-qJmHPNsBkq3aMXqXQT3K8gq_8gCDFnmsPAL2bKFgaWOPa2rg5ugfo_H5tAitpDROiwb9shzBATNRrLXg1CZxGJ_N4Af6kDW-Y/s1600/Choose+colors.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXGmVNd_dWrt4pccJgy_KJphyphenhyphenw9v1EhZGooDZ3EivEWE-qJmHPNsBkq3aMXqXQT3K8gq_8gCDFnmsPAL2bKFgaWOPa2rg5ugfo_H5tAitpDROiwb9shzBATNRrLXg1CZxGJ_N4Af6kDW-Y/s1600/Choose+colors.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
You can choose more than one colors by pressing cmd + click.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjMYr7_DwR7nSKQnlimYvrTMfxCbVYU0onKqsOIL2BAQfAB7K9Ic5Ezsk1z2nsz4XGrJvW4_33D4OKH5aSJxIO7tRBAVLyNeTC0sl7l87Khf6YQZYBF27phSXgUvr1Kyk47u5dgRwxa33M/s1600/Notes.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;105&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjMYr7_DwR7nSKQnlimYvrTMfxCbVYU0onKqsOIL2BAQfAB7K9Ic5Ezsk1z2nsz4XGrJvW4_33D4OKH5aSJxIO7tRBAVLyNeTC0sl7l87Khf6YQZYBF27phSXgUvr1Kyk47u5dgRwxa33M/s320/Notes.JPG&quot; width=&quot;320&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;If you choose &quot;Some&quot; then you will be asked to give the range of pages from which the notes will be extracted.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1CyFEMTSZ5vm7L9M1Yp_bdbAHRqA8mEFA2-VgeuMHLCXNmlWabsVMaIWuNNHVUsbYsaT_rt5ZAfeqGxW6s1w6tajpUiECp3Mo31Sv7hoN1wYD18jfwVa1rpo3wrXMiP2dwznaNtbFrkhA/s1600/Last+page.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;129&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1CyFEMTSZ5vm7L9M1Yp_bdbAHRqA8mEFA2-VgeuMHLCXNmlWabsVMaIWuNNHVUsbYsaT_rt5ZAfeqGxW6s1w6tajpUiECp3Mo31Sv7hoN1wYD18jfwVa1rpo3wrXMiP2dwznaNtbFrkhA/s320/Last+page.JPG&quot; width=&quot;320&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&amp;nbsp;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0W69NklcM3-Ue4EAWfhkDR7C8ye214QmU4WcbXZ1TFGn_mpVQZRy4TAuASokjn0fdoVTs2be2jyonD0A1K8PER6JuLf-xcJ4bm7RMLNU4Q022oHZcoMlfIVbPI2wsxHrDyVHZ6GKU6oZk/s1600/First+page.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;125&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0W69NklcM3-Ue4EAWfhkDR7C8ye214QmU4WcbXZ1TFGn_mpVQZRy4TAuASokjn0fdoVTs2be2jyonD0A1K8PER6JuLf-xcJ4bm7RMLNU4Q022oHZcoMlfIVbPI2wsxHrDyVHZ6GKU6oZk/s320/First+page.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The result is sent to the clipboard. The code is the following:&lt;br /&gt;
&lt;blockquote&gt;--2011-06-10&lt;br /&gt;
--http://organognosi.blogspot.com/&lt;br /&gt;
tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfPages to count pages of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; activate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set myColorCodes to my chooseColor()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; display dialog &quot;Do you want to export all the notes or some of them?&quot; buttons {&quot;All&quot;, &quot;Some&quot;} default button 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set answer to button returned of the result&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if answer is &quot;All&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set firstPage to &quot;1&quot; as number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set lastPage to numberOfPages&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to &quot;Skim notes&quot; &amp;amp; return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; display dialog &quot;Give the number of the first page.&quot; default answer &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set firstPage to text returned of the result as number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; display dialog &quot;Give the number of the last page&quot; default answer &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set lastPage to text returned of the result as number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with currentPage from firstPage to lastPage&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pageNotes to notes of page currentPage of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exportPageNotes(pageNotes, currentPage, myColorCodes) of me&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
end tell&lt;br /&gt;
&lt;br /&gt;
on exportPageNotes(listOfNotes, pageForProcessing, myColorCodes)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set currentPDFpage to pageForProcessing&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with coloredNote in listOfNotes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with i from 1 to the count of myColorCodes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if color of coloredNote is item i of myColorCodes then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set noteText to get text for coloredNote&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to (the clipboard) &amp;amp; noteText &amp;amp; return &amp;amp; return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
end exportPageNotes&lt;br /&gt;
&lt;br /&gt;
on chooseColor()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set selectedColors to (choose from list {&quot;ice&quot;, &quot;honey drew&quot;, &quot;flora&quot;, &quot;lemon&quot;, &quot;cantaloupe&quot;, &quot;silver&quot;} with prompt (&quot;Choose the color of notes for exporting (you can select multiple colors):&quot;) default items {&quot;lemon&quot;} with multiple selections allowed)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set colorCodes to {}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set noteColor to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with noteCol in selectedColors&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set noteColor to noteCol as text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if noteColor is &quot;ice&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {26214, 65535, 65535, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if noteColor is &quot;honey drew&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {52428, 65535, 26214, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if noteColor is &quot;flora&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {26214, 65535, 26214, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if noteColor is &quot;lemon&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {65535, 65535, 2, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if noteColor is &quot;cantaloupe&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {65535, 52428, 26214, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if noteColor is &quot;silver&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {52428, 52428, 52428, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return colorCodes&lt;br /&gt;
end chooseColor&lt;/blockquote&gt;&lt;br /&gt;
The second AppleScript is that which I use and is quite more complicated. As you &lt;a href=&quot;http://organognosi.blogspot.com/2011/02/tools-of-trade.html&quot;&gt;may know&lt;/a&gt;, my preferred program for managing notes is MediaWiki so the  AppleScript&#39;s result is customized for import in a MediaWiki page.&lt;br /&gt;
&lt;br /&gt;
Some additional features of this AppleScript are the following:&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;a hyperlink to the exact PDF page is created for each exported note&lt;/li&gt;
&lt;li&gt;the annotation&#39;s date and time are added at the end of each exported note&lt;/li&gt;
&lt;li&gt;the notes from each page are separated by a line&amp;nbsp;&lt;/li&gt;
&lt;li&gt;the extended text of the note is exported as well&lt;/li&gt;
&lt;li&gt;the first five notes of the first page are not exported&lt;/li&gt;
&lt;li&gt;the &lt;a href=&quot;http://organognosi.blogspot.com/2011/04/go-to-written-page-number-of-pdf.html&quot;&gt;written page numbers&lt;/a&gt; should be given in the dialog windows&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
If you want to use this AppleScript you need firstly to create the five Skim notes in the first PDF page as I describe in my post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/03/how-to-create-correctly-skim-notes.html&quot;&gt;How to create correctly the Skim  notes which have the DEVONthink links, when you have already annotated  the first page of the PDF document&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
The code is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;--2011-06-10 &lt;br /&gt;
--http://organognosi.blogspot.com/&lt;br /&gt;
tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfNote5 to (get text for note 5 of page 1 of document 1) as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set pdfTitle to get (extended text of note 4) of page 1 of document 1 as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfPages to count pages of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; activate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set myColorCodes to my chooseColor() --εκτός των loops πρέπει να βρίσκεται, μια φορά το θέτεις&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; display dialog &quot;Do you want to export all the notes or only some of them?&quot; buttons {&quot;All&quot;, &quot;Some&quot;} default button 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set answer to button returned of the result&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if answer is &quot;All&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set firstPage to &quot;1&quot; as number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set lastPage to numberOfPages&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to &quot;===Skim notes===&quot; &amp;amp; return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; display dialog &quot;Give me the written number of the first page.&quot; default answer &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set firstPageWritten to text returned of the result as number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set firstPage to firstPageWritten - numberOfNote5 as number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; display dialog &quot;Give me the written numbers of the last page&quot; default answer &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set lastPageWritten to text returned of the result as number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set lastPage to lastPageWritten - numberOfNote5 as number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to (the clipboard) &amp;amp; &quot;Notes from \&quot;[[@&quot; &amp;amp; pdfTitle &amp;amp; &quot;]]\&quot; (pages &quot; &amp;amp; firstPage &amp;amp; &quot; - &quot; &amp;amp; lastPage &amp;amp; &quot;) &amp;lt;br /&amp;gt;&quot; &amp;amp; return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with currentPage from firstPage to lastPage&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; --special provision for page 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if currentPage is 1 then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pageNotes to notes of page 1 of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set notesAfter5 to items 6 thru -1 of pageNotes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exportPageNotes(notesAfter5, currentPage, myColorCodes) of me&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pageNotes to notes of page currentPage of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exportPageNotes(pageNotes, currentPage, myColorCodes) of me&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
end tell&lt;br /&gt;
&lt;br /&gt;
on exportPageNotes(listOfNotes, pageForProcessing, myColorCodes)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfNote5 to (get text for note 5 of page 1 of document 1) as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pdfTitle to get (extended text of note 4) of page 1 of document 1 as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfPageNotes to count notes of page pageForProcessing of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set theWrittenPage to pageForProcessing + numberOfNote5 as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pdfDevonThinkLink to (get text for note 4 of page 1 of document 1) as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pdfDevonThinkLinkWihtoutZero to (text 1 thru ((length of pdfDevonThinkLink) - 1) of pdfDevonThinkLink) as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with coloredNote in listOfNotes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with i from 1 to the count of myColorCodes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if color of coloredNote is item i of myColorCodes then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pdfText to get text for coloredNote&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pdfText2 to get extended text of coloredNote as text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set fullNoteText to pdfText &amp;amp; &quot; &quot; &amp;amp; pdfText2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set annotationDate to modification date of coloredNote as text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pageForDevonThinkLink to pageForProcessing - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; --for use with MediaWiki semantic annotations &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set firstCharacter to get the character 1 of fullNoteText&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if firstCharacter = &quot;[&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set endofNote to &quot;]]]&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set endofNote to &quot;]&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set textAfterFullNoteText to &quot;[&quot; &amp;amp; pdfDevonThinkLinkWihtoutZero &amp;amp; pageForDevonThinkLink &amp;amp; &quot; p. &quot; &amp;amp; theWrittenPage &amp;amp; endofNote &amp;amp; &quot; &amp;lt;small&amp;gt;(&quot; &amp;amp; annotationDate &amp;amp; &quot;)&amp;lt;/small&amp;gt;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set textForTextMate to fullNoteText &amp;amp; &quot; &quot; &amp;amp; textAfterFullNoteText&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set textForTextMate2 to replaceText(textForTextMate, &quot;missing value&quot;, &quot;&quot;) of me&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set textForTextMate3 to replaceText(textForTextMate2, &quot; ()&quot;, &quot;&quot;) of me&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to (the clipboard) &amp;amp; textForTextMate3 &amp;amp; return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set theSeperationLine to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with coloredNote in listOfNotes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if numberOfPageNotes &amp;gt; 0 then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with i from 1 to the count of myColorCodes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (color of coloredNote is item i of myColorCodes) then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set theSeperationLine to &quot;----&quot; &amp;amp; return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; exit repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to (the clipboard) &amp;amp; theSeperationLine&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
end exportPageNotes&lt;br /&gt;
&lt;br /&gt;
on replaceText(thisText, searchString, replacementString)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set AppleScript&#39;s text item delimiters to the searchString&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set the itemList to every text item of thisText&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set AppleScript&#39;s text item delimiters to the replacementString&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set thisText to the itemList as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set AppleScript&#39;s text item delimiters to {&quot;&quot;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return thisText&lt;br /&gt;
end replaceText&lt;br /&gt;
&lt;br /&gt;
on chooseColor()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set selectedColors to (choose from list {&quot;ice&quot;, &quot;honey drew&quot;, &quot;flora&quot;, &quot;lemon&quot;, &quot;cantaloupe&quot;, &quot;silver&quot;} with prompt (&quot;Choose the color of notes for exporting (you can select multiple colors):&quot;) default items {&quot;lemon&quot;} with multiple selections allowed)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; --selectedColors is a list of lists&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set colorCodes to {}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set noteColor to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with noteCol in selectedColors&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set noteColor to noteCol as text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if noteColor is &quot;ice&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {26214, 65535, 65535, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if noteColor is &quot;honey drew&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {52428, 65535, 26214, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if noteColor is &quot;flora&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {26214, 65535, 26214, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if noteColor is &quot;lemon&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {65535, 65535, 2, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if noteColor is &quot;cantaloupe&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {65535, 52428, 26214, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if noteColor is &quot;silver&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set end of colorCodes to {52428, 52428, 52428, 65535}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return colorCodes&lt;br /&gt;
end chooseColor&lt;/blockquote&gt;&lt;br /&gt;
I hope this AppleScript will help Adam! Anyway, your post was an inspiration for me. Finally, I would like to thank Martin who informed me about it. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/1908968917903158157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/1908968917903158157?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/1908968917903158157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/1908968917903158157'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/06/export-skim-notes-according-to-their.html' title='Export Skim notes according to their highlight colors'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG4GNCzHm6or9j7B2GZ1Wkmfsht0HGHrFXKmxLAvKu-Q6kde700-Vn5ey5kMhr8Gh4i826fsLiMPu8AVvve_EeAFSteJDnmf4zHG5wBPbNdi8qCt5YJt2bToUxf25B60I6vRccOrqkwZNL/s72-c/Favorite+Colors.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-8086109719294571377</id><published>2011-06-05T17:10:00.001+03:00</published><updated>2011-06-05T17:25:17.793+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="DevonThink"/><title type='text'>Add tags to many DEVONthink items at the same time</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In DEVONthink, when two or more items have exactly the same tags, new tags can be added to them using the tag bar at the lower part of a DEVONthink window. But when their tags are different the message &quot;Multiple Selection&quot; appears in the bar and you cannot edit it. With the following AppleScript you can add multiple tags even to these items.&lt;br /&gt;
&lt;blockquote&gt;--2011-06-05 &lt;br /&gt;
--http://organognosi.blogspot.com/&lt;br /&gt;
&lt;br /&gt;
display dialog &quot;Enter tags to add (separated by commas):&quot; default answer &quot;&quot;&lt;br /&gt;
set newTags to text returned of the result&lt;br /&gt;
&lt;br /&gt;
set old_delimiters to AppleScript&#39;s text item delimiters&lt;br /&gt;
set AppleScript&#39;s text item delimiters to &quot;,&quot;&lt;br /&gt;
set tagList to text items of newTags&lt;br /&gt;
set AppleScript&#39;s text item delimiters to old_delimiters&lt;br /&gt;
&lt;br /&gt;
tell application id &quot;com.devon-technologies.thinkpro2&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set these_items to the selection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if these_items is {} then error &quot;Please select some contents.&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with this_item in these_items&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set tags of this_item to (tags of this_item) &amp;amp; tagList&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end try&lt;br /&gt;
end tell&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/8086109719294571377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/8086109719294571377?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/8086109719294571377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/8086109719294571377'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/06/add-tags-to-many-devonthink-items-at.html' title='Add tags to many DEVONthink items at the same time'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-4698671536782051558</id><published>2011-06-01T10:19:00.001+03:00</published><updated>2011-06-01T10:20:56.510+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="BibDesk"/><title type='text'>Add keywords to many entries of BibDesk at the same time</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;The following AppleScript performs the above function:&lt;br /&gt;
&lt;blockquote&gt;tell application &quot;BibDesk&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set theSelection to the selection of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; display dialog &quot;Give the new keywords separated by commas:&quot; default answer &quot;&quot; buttons {&quot;Cancel&quot;, &quot;OK&quot;} default button 2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set the newKeywords to the text returned of the result&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with thePub in theSelection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set oldKeywords to keywords of thePub&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if oldKeywords is &quot;&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set keywords of thePub to newKeywords&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set keywords of thePub to keywords of thePub &amp;amp; &quot;, &quot; &amp;amp; newKeywords&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
end tell&lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/4698671536782051558/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/4698671536782051558?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4698671536782051558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4698671536782051558'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/06/add-keywords-to-many-entries-of-bibdesk.html' title='Add keywords to many entries of BibDesk at the same time'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-7272972704374949660</id><published>2011-05-31T19:41:00.000+03:00</published><updated>2011-05-31T19:41:01.863+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="hyperlink"/><category scheme="http://www.blogger.com/atom/ns#" term="MediaWiki"/><title type='text'>Create MediaWiki links to local folders and files without any extension!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In my previous post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/05/embed-applescripts-in-mediawiki-page.html&quot;&gt;Embed AppleScripts in a MediaWiki page&lt;/a&gt;&quot;, I showed how an AppleScript, embedded in a HTML link, can be inserted in a MediaWiki page. A way that I use this MediaWiki feature is by creating links to local files and folders. Moreover, after executing the AppleScript, the files open with their assigned applications. Finally as you can see in the same post, the whole link syntax is quite complicated so I wrote an AppleScript, which creates automatically all the required code for the selected files and folders in Finder. The names of them should be in Latin characters. &lt;br /&gt;
&lt;br /&gt;
The AppleScript code is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;--2011-05-31&lt;br /&gt;
--http://organognosi.blogspot.com&lt;br /&gt;
&lt;br /&gt;
tell application &quot;Finder&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set selectedItems to the selection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if selectedItems is {} then error &quot;Please select some contents.&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with selectedItem in selectedItems&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set selectedItem to selectedItem as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set encodedText to my encode_URL_string(selectedItem)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set embeddedAppleScript to &quot;&amp;lt;html&amp;gt;&quot; &amp;amp; return &amp;amp; &quot;&amp;lt;a href=\&quot;&quot; &amp;amp; &quot;apple&quot; &amp;amp; &quot;script&quot; &amp;amp; &quot;://com.apple.scripteditor?action=new&amp;amp;script= tell%20application%20%22Finder%22%0D&lt;br /&gt;
%09open%20(alias%20%22&quot; &amp;amp; encodedText &amp;amp; &quot;%22)%0D&quot; &amp;amp; return &amp;amp; &quot;end%20tell\&quot;l&amp;gt;&quot; &amp;amp; selectedItem &amp;amp; &quot;&amp;lt;/a&amp;gt;&quot; &amp;amp; return &amp;amp; &quot;&amp;lt;/html&amp;gt;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to (the clipboard) &amp;amp; embeddedAppleScript &amp;amp; &quot;&amp;lt;br/&amp;gt;&quot; &amp;amp; return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
end tell&lt;br /&gt;
&lt;br /&gt;
--Text handlers from Apple to encode the selectedItem string&lt;br /&gt;
property allowed_URL_chars : (characters of &quot;$-_.+!*&#39;(),1234567890abcdefghijklmnopqrstuvwxyz&quot;)&lt;br /&gt;
on encode_URL_string(this_item)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set character_list to (characters of this_item)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with i from 1 to number of items in character_list&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set this_char to item i of character_list&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if this_char is not in allowed_URL_chars then set item i of character_list to my encode_URL_char(this_char)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return character_list as string&lt;br /&gt;
end encode_URL_string&lt;br /&gt;
&lt;br /&gt;
property hex_list : (characters of &quot;0123456789ABCDEF&quot;)&lt;br /&gt;
on encode_URL_char(this_char)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set ASCII_num to (ASCII number this_char)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set x to item ((ASCII_num div 16) + 1) of hex_list&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set y to item ((ASCII_num mod 16) + 1) of hex_list&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return (&quot;%&quot; &amp;amp; x &amp;amp; y) as string&lt;br /&gt;
end encode_URL_char&lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/7272972704374949660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/7272972704374949660?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/7272972704374949660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/7272972704374949660'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/05/create-mediawiki-links-to-local-folders.html' title='Create MediaWiki links to local folders and files without any extension!'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-2752116024542331516</id><published>2011-05-29T17:31:00.004+03:00</published><updated>2011-06-01T10:38:19.305+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="hyperlink"/><category scheme="http://www.blogger.com/atom/ns#" term="MediaWiki"/><title type='text'>Embed AppleScripts in a MediaWiki page</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;You can embed an AppleScript in a MediaWiki page if you insert the script as the URL in a proper HTML link. Particularly, the &lt;a href=&quot;http://www.w3schools.com/HTML/html_links.asp&quot;&gt;HTML link syntax&lt;/a&gt; looks like this:&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;a href=&quot;URL&quot;&amp;gt;Link text&amp;lt;/a&amp;gt; &lt;/blockquote&gt;The AppleScript code should be converted in a format which is compatible with HTML URLs. For example, each space in the script should be replaced by the string %20, each tab by %09 and each enter by %0D. Moreover, the &quot;applescript://&quot; URL scheme will be used and the whole link should be within &amp;lt;html&amp;gt;, &amp;lt;/html&amp;gt; tags.&amp;nbsp;&amp;nbsp; Fortunately the whole conversion can be done automatically by an AppleScript or using the freeware &lt;a href=&quot;http://homepage.mac.com/tkurita/scriptfactory/software/ScriptEditor/AppleScriptHTML/en/index.html&quot;&gt;AppleScriptHTML&lt;/a&gt; app. &lt;br /&gt;
&lt;br /&gt;
Finally, &lt;a href=&quot;http://www.mediawiki.org/wiki/Manual:$wgRawHtml&quot;&gt;raw HTML code&lt;/a&gt; is not allowed by default in a public wiki for security reasons but if you maintain a private wiki you can permit it by setting&lt;br /&gt;
&lt;blockquote&gt;&lt;code&gt;$wgRawHtml = true;&lt;/code&gt;&lt;/blockquote&gt;in the LocalSettings.php file.&lt;br /&gt;
&lt;br /&gt;
For example, suppose you want to embed the following AppleScript&lt;br /&gt;
&lt;blockquote&gt;tell application &quot;Finder&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; open (alias &quot;MBSystem:Users:MB:Downloads:&quot;)&lt;br /&gt;
end tell &lt;/blockquote&gt;which opens the &quot;Downloads&quot; folder in a Finder window. Then, you should write the following code in a MediaWiki page:&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;a href=&quot;applescript://com.apple.scripteditor?action=new&amp;amp;script= tell%20application%20%22Finder%22%0D&lt;br /&gt;
%09open%20(alias%20%22MBSystem%3AUsers%3AMB%3ADownloads%3A%22)%0D&lt;br /&gt;
end%20tell&quot;l&amp;gt;MBSystem:Users:MB:Downloads:&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/blockquote&gt;and you will see the link, after saving the page.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQGJb0KAGOT5zzfRRzfs-qbTDTe3_Pij9YFG29RaN5GdPVaGxLdXo_hknGnh6oudbtrg4MMjXXDPTDRud7_g6dgPaNa0OXSoBDsEBlfJn3pm6qIm_5L3bjOSrZMYqkS8hbEaK-XPpcFKtc/s1600/AppleScrpt+in+MediaWiki.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQGJb0KAGOT5zzfRRzfs-qbTDTe3_Pij9YFG29RaN5GdPVaGxLdXo_hknGnh6oudbtrg4MMjXXDPTDRud7_g6dgPaNa0OXSoBDsEBlfJn3pm6qIm_5L3bjOSrZMYqkS8hbEaK-XPpcFKtc/s400/AppleScrpt+in+MediaWiki.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOCAUZzbhWC3YIYJqTgFHobhuy8iAmTe6AA1OJGLJHHbkP2K0iA68Qb9fxLdfXjULJXCXKjLmqtvhcxn46Z8RCsUsOp1Z9bL5uM60WW_nvT6r9X4SHKLSUnLE-5u8l5VgB5feor9kORxFY/s1600/AppleScript+in+a+HTML+link.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Afterwards, every time you click the link an AppleScript editor window opens with the AppleScript code inside it, as is shown in the next image. &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVzIUkYhXJKt5aQtTZACvCE71v4uyvaDGGG-C30sa21R5SHcB-aquIh2pmJl1lPFQW44dd3gurjgi10R9rUnKsvnRr7mX1RquLgHP_lq4400Vd52pDajCbFkbz96yVuOPvX-S2eAzovGno/s1600/AppleScript+in+Editor.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVzIUkYhXJKt5aQtTZACvCE71v4uyvaDGGG-C30sa21R5SHcB-aquIh2pmJl1lPFQW44dd3gurjgi10R9rUnKsvnRr7mX1RquLgHP_lq4400Vd52pDajCbFkbz96yVuOPvX-S2eAzovGno/s400/AppleScript+in+Editor.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/blockquote&gt;Now, you may press cmd + R (executes the script), cmd + W (closes the window) and cmd + D (without saving)! &lt;br /&gt;
&lt;br /&gt;
In my next post, I will present how you can create automatically HTML links to local files and folders, with AppleScript code inside them, which can be embedded in a MediaWiki page. &lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/2752116024542331516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/2752116024542331516?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2752116024542331516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2752116024542331516'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/05/embed-applescripts-in-mediawiki-page.html' title='Embed AppleScripts in a MediaWiki page'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQGJb0KAGOT5zzfRRzfs-qbTDTe3_Pij9YFG29RaN5GdPVaGxLdXo_hknGnh6oudbtrg4MMjXXDPTDRud7_g6dgPaNa0OXSoBDsEBlfJn3pm6qIm_5L3bjOSrZMYqkS8hbEaK-XPpcFKtc/s72-c/AppleScrpt+in+MediaWiki.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-8001751518677689743</id><published>2011-05-20T17:25:00.001+03:00</published><updated>2011-05-20T17:27:24.249+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Skim"/><title type='text'>Sync PDF page numbers between Skim&#39;s snapshot window and main window.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;A quite useful feature of Skim is that &quot;you can take &quot;snapshots&quot; of important sections (like the bibliography section) of a PDF document, to keep them on your screen for easy reference. This way you don&#39;t have to leaf back to the section every time you want to see it&quot; (Skim help file).&lt;br /&gt;
&lt;br /&gt;
But the snapshot windows are just for viewing the material. For example, you cannot highlight or select text in them. In order to make annotating of these pages easier I wrote an AppleScript, which instantly shows you in the main window, the current page in the snapshot window. When you finish annotating this page you can go back to the previous page by using the cmd + [ shortkey or by triggering the corresponding gesture (I use the &quot;three finger left&quot; gesture for this task). &lt;br /&gt;
&lt;br /&gt;
If you use more than one snapshot windows from the same document, after selecting the page that you want to annotate in one of them, you need to click one time all the remaining snapshots windows, before running the AppleScript. &lt;br /&gt;
&lt;br /&gt;
The AppleScript code is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;--2011-05-20 &lt;br /&gt;
--http://organognosi.blogspot.com&lt;br /&gt;
&lt;br /&gt;
set nameSnapshot to &quot;&quot;&lt;br /&gt;
tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set frontNameDocument to name of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set windowsNames to get the name of windows&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with x from 1 to count of items of windowsNames&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set windowName to item x of windowsNames&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if windowName contains frontNameDocument &amp;amp; &quot; —&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set nameSnapshot to windowName&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set position to offset of &quot;—&quot; in nameSnapshot&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set AppleScript&#39;s text item delimiters to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set stg_numberPage to characters (position + 7) thru -1 of nameSnapshot as text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberPage to stg_numberPage as number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; go document 1 to page numberPage of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
end tell&lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/8001751518677689743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/8001751518677689743?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/8001751518677689743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/8001751518677689743'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/05/sync-pdf-page-numbers-between-skims.html' title='Sync PDF page numbers between Skim&#39;s snapshot window and main window.'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-528772777634065668</id><published>2011-05-17T20:52:00.003+03:00</published><updated>2011-05-23T09:11:16.200+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Finder"/><category scheme="http://www.blogger.com/atom/ns#" term="MediaWiki"/><category scheme="http://www.blogger.com/atom/ns#" term="updated"/><title type='text'>Recreate the folder and file hierarchy in text form compatible with MediaWiki syntax</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Let&#39;s say we have the following folder and file structure and we would like to pass it as text in a MediaWiki page.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP4TKaHJR84pVEHroN25O6VpvmudhKs17BBawjPxYJVBEOBxjg4u0PBHsOI_6HJBTbEGVAplLgNq7FJL_OMwFnKCrGReWcKizYPnme77yJWkuGePrCa04hvk8fv0TmBZ-X_Ym174jE7Pmc/s1600/Folder+structure.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;378&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP4TKaHJR84pVEHroN25O6VpvmudhKs17BBawjPxYJVBEOBxjg4u0PBHsOI_6HJBTbEGVAplLgNq7FJL_OMwFnKCrGReWcKizYPnme77yJWkuGePrCa04hvk8fv0TmBZ-X_Ym174jE7Pmc/s400/Folder+structure.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;With the AppleScript of this post you can create automatically the necessary text, which is for our example the following:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;===DevonThink scripts===&lt;br /&gt;
Number of files: 0&amp;lt;pre&amp;gt;/MBSystem/Users/MB/Downloads/DevonThink scripts/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Camino====&lt;br /&gt;
Number of files: 3&amp;lt;pre&amp;gt;/MBSystem/Users/MB/Downloads/DevonThink scripts/Camino/&amp;lt;/pre&amp;gt;&lt;br /&gt;
Add PDF document to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add link to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add web document to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====DEVONagent====&lt;br /&gt;
Number of files: 11&amp;lt;pre&amp;gt;/MBSystem/Users/MB/Downloads/DevonThink scripts/DEVONagent/&amp;lt;/pre&amp;gt;&lt;br /&gt;
Add PDF document to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add abstracts to DEVONthink Pro.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add linked images to DEVONthink&#39;s downloads.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add linked images to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add links to DEVONthink&#39;s downloads.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add links to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add page to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add selection to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add tabs to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add text to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add web document to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Firefox====&lt;br /&gt;
Number of files: 3&amp;lt;pre&amp;gt;/MBSystem/Users/MB/Downloads/DevonThink scripts/Firefox/&amp;lt;/pre&amp;gt;&lt;br /&gt;
Add PDF document to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add link to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
Add web document to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====endo====&lt;br /&gt;
Number of files: 1&amp;lt;pre&amp;gt;/MBSystem/Users/MB/Downloads/DevonThink scripts/endo/&amp;lt;/pre&amp;gt;&lt;br /&gt;
Add news to DEVONthink.scpt&amp;lt;br/&amp;gt;&lt;/blockquote&gt;As you can see the folder hierarchy is recreated as a hierarchy of MediaWiki sections. Also the number of files in each folder and its path are added under the name of the corresponding section. If you choose to apply this AppleScript in a folder structure with thousands of files there will no be any problem but it will take a long time to finish.&amp;nbsp; The result is sent to the clipboard. &lt;br /&gt;
&lt;br /&gt;
The AppleScript code is the following:&lt;br /&gt;
&lt;blockquote&gt;set folderContents to show_folder_hierarchy(choose folder, &quot;=&quot;) of me&lt;br /&gt;
&lt;br /&gt;
set the clipboard to folderContents&lt;br /&gt;
--this subroutine is an expansion of an example from the book Learn AppleScript - The Comprehensive Guide to Scripting on Mac OS X (p. 485-486)&lt;br /&gt;
on show_folder_hierarchy(the_folder, the_indent)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; --process this folder&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;Finder&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set folderContents to get files of the_folder&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfFiles to count items of folderContents&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set folderName to the_folder as alias&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set folderNamePOSIX to get the POSIX path of folderName&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set folderPATH to &quot;&amp;lt;pre&amp;gt;&quot; &amp;amp; folderNamePOSIX &amp;amp; &quot;&amp;lt;/pre&amp;gt;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set fileNames to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with currentFile from 1 to numberOfFiles&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set fileNames to fileNames &amp;amp; name of item currentFile of folderContents &amp;amp; &quot;&amp;lt;br/&amp;gt;&quot; &amp;amp; return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the_result to the_indent &amp;amp; &quot;==&quot; &amp;amp; name of the_folder &amp;amp; &quot;==&quot; &amp;amp; the_indent &amp;amp; return &amp;amp; &quot;Number of files: &quot; &amp;amp; numberOfFiles &amp;amp; folderPATH &amp;amp; return &amp;amp; fileNames &amp;amp; return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; --process each sub-folder in turn&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;Finder&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with sub_folder_ref in (get every folder of the_folder)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the_result to the_result &amp;amp; my show_folder_hierarchy(contents of sub_folder_ref, the_indent &amp;amp; &quot;=&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return the_result&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
end show_folder_hierarchy&lt;/blockquote&gt;2011-05-20 I updated the code which creates the POSIX paths of the folders. &amp;nbsp; &lt;br /&gt;
&lt;blockquote&gt;&amp;nbsp; &lt;/blockquote&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/528772777634065668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/528772777634065668?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/528772777634065668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/528772777634065668'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/05/recreate-folder-and-file-hierarchy-in.html' title='Recreate the folder and file hierarchy in text form compatible with MediaWiki syntax'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP4TKaHJR84pVEHroN25O6VpvmudhKs17BBawjPxYJVBEOBxjg4u0PBHsOI_6HJBTbEGVAplLgNq7FJL_OMwFnKCrGReWcKizYPnme77yJWkuGePrCa04hvk8fv0TmBZ-X_Ym174jE7Pmc/s72-c/Folder+structure.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-2564567934971168000</id><published>2011-05-01T18:53:00.001+03:00</published><updated>2011-05-15T15:11:28.348+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Skim"/><title type='text'>Delete the duplicate Skim notes</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;With the following AppleScript you can delete the Skim notes which have exactly the same text in each page of a PDF file. &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;--2011-05-01 &lt;br /&gt;
-- http://organognosi.blogspot.com&lt;br /&gt;
&lt;br /&gt;
tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; --the following code deletes the note text which is repeated one or more times in a PDF page &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfMyPages to count pages of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with currentPage from 1 to numberOfMyPages&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfPageNotes to count notes of page currentPage of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set textOfCurrentPageNotes to text of notes of page currentPage of document 1 as list&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with currentNoteNumber from 1 to numberOfPageNotes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set noteText to (get text for note currentNoteNumber of page currentPage of document 1) as text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set offsetPositionsOfDuplicates to list_positions(textOfCurrentPageNotes, noteText, true) of me&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the numberOfDuplicates to length of offsetPositionsOfDuplicates&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with noteForTextDeletion from 2 to numberOfDuplicates&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set noteNumber to item noteForTextDeletion of offsetPositionsOfDuplicates&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delete text of note noteNumber of page currentPage of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; --the following code deletes the empty notes&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfMyPages to count pages of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfAlltheNotes to count notes of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set indexesOfEmptyNotes to {}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with currentNote from 1 to numberOfAlltheNotes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set noteText to (get text for note currentNote of document 1) as text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if noteText is &quot;&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the end of the indexesOfEmptyNotes to currentNote as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set ABC to the length of indexesOfEmptyNotes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with x from 1 to ABC&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set indexNote to item x of indexesOfEmptyNotes as number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set indexNote to indexNote - x + 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delete note indexNote of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
end tell&lt;br /&gt;
&lt;br /&gt;
--the following subroutine is from Soghoian&#39;s AppleScript 1-2-3 book (p. 569)&lt;br /&gt;
on list_positions(this_list, this_item, list_all)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set the offsetlist to {}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with i from 1 to the count of this_list&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if item i of this_list is this_item then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set the end of the offsetlist to i&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if list_all is false then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return item 1 of offset_list&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if list_all is false and offsetlist is {} then return 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return the offsetlist&lt;br /&gt;
end list_positions&lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/2564567934971168000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/2564567934971168000?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2564567934971168000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2564567934971168000'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/05/delete-duplicate-skim-notes.html' title='Delete the duplicate Skim notes'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-1194939731201900860</id><published>2011-04-22T00:26:00.001+03:00</published><updated>2011-05-15T15:10:47.483+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Skim"/><title type='text'>Count the words of a PDF file from Skim</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Here is a small AppleScript for counting the words of a PDF file from Skim.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set PDFwords to 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfMyPages to count pages of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with currentPage from 1 to numberOfMyPages&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfPageWords to count words of page currentPage of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set PDFwords to PDFwords + numberOfPageWords&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; display dialog &quot;Number of words: &quot; &amp;amp; PDFwords buttons {&quot;Cancel&quot;, &quot;OK&quot;} default button 2&lt;br /&gt;
end tell&lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/1194939731201900860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/1194939731201900860?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/1194939731201900860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/1194939731201900860'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/04/count-words-of-pdf-file-from-skim.html' title='Count the words of a PDF file from Skim'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-993291975418270221</id><published>2011-04-09T21:56:00.002+03:00</published><updated>2011-04-10T12:28:51.221+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="audio"/><category scheme="http://www.blogger.com/atom/ns#" term="hypermedia"/><category scheme="http://www.blogger.com/atom/ns#" term="iPad"/><category scheme="http://www.blogger.com/atom/ns#" term="IPhone"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="notes"/><title type='text'>How to create hypermedia notes during your lectures!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;There are some apps, which combine the features of a note taking and a voice recording app but in a very distinctive way. Specifically, they have the ability to continuously synchronize the recorded audio with your notes. As a result, each word acts as a link to the time point of the recorded audio at which it was written! Obviously this makes navigating a long lecture fast and easy and after a while you will start to appreciate the power of another kind of link!&lt;br /&gt;
&lt;br /&gt;
Currently, I use &quot;&lt;a href=&quot;http://luminantsoftware.com/iphone/audionote.html&quot;&gt;AudioNote&lt;/a&gt;&quot; for taking my &lt;a href=&quot;http://en.wikipedia.org/wiki/Hypermedia&quot;&gt;hypermedia&lt;/a&gt; notes mainly because there is a version of it both for iOS and Mac OS X. Consequently, I can read my notes and hear the synced audio in all my platforms. An other app with a somewhat more polished interface and richer organizational abilities is &quot;&lt;a href=&quot;http://www.gingerlabs.com/cont/notability.php&quot;&gt;Notability&lt;/a&gt;&quot; but you can you use it only in your iPhone or your iPad. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/993291975418270221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/993291975418270221?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/993291975418270221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/993291975418270221'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/04/how-to-create-hypermedia-notes-during.html' title='How to create hypermedia notes during your lectures!'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-4756073218819782758</id><published>2011-04-05T16:32:00.005+03:00</published><updated>2011-04-05T17:22:01.864+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="hyperlink"/><category scheme="http://www.blogger.com/atom/ns#" term="LaTeX"/><category scheme="http://www.blogger.com/atom/ns#" term="MediaWiki"/><category scheme="http://www.blogger.com/atom/ns#" term="Skim"/><category scheme="http://www.blogger.com/atom/ns#" term="TextMate"/><category scheme="http://www.blogger.com/atom/ns#" term="video"/><title type='text'>Automated creation of references with hyperlinks from Skim</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
In the post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/03/automated-creation-of-latex-compatible.html&quot;&gt;Automated creation of a LaTeX compatible citation only from Skim! (with hyperlink included)&lt;/a&gt;&quot; there is an AppleScript which creates a LaTeX reference in TextMate for the PDF file that you currently read in Skim. Now I will present an expanded and improved version of that AppleScript. Specifically the new AppleScript takes advantage of all my standardized notes in the first page of a PDF document.&lt;br /&gt;
&lt;br /&gt;
These notes can be created automatically from the AppleScript in the post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/03/how-to-create-correctly-skim-notes.html&quot;&gt;How to create correctly the Skim notes which have the DEVONthink links, when you have already annotated the first page of the PDF document&lt;/a&gt;&quot;. Moreover you can find more information about these notes in my posts &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/02/devonthink-links-in-skim-notes.html&quot;&gt;How to put DevonThink links in Skim notes&lt;/a&gt;&quot; and &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/04/latin-page-numbers-arabic-page-numbers.html&quot;&gt;Latin page numbers, Arabic page numbers and the fifth Skim note&lt;/a&gt;&quot;.&lt;br /&gt;
&lt;br /&gt;
The references and hyperlinks that can be created from my new AppleScript are the following and correspond to the notes one through four:&lt;br /&gt;
&lt;br /&gt;
1. A LaTeX reference to the exact PDF page which can be inserted in a MediaWiki page without any modifications or problems. Moreover, the necessary code for the creation of MediaWiki link is also included. An example is the following:&lt;br /&gt;
&lt;blockquote class=&quot;&quot;&gt;&amp;nbsp;(&amp;lt;rawtex&amp;gt;\cite{Deconstructing-the-Laws-of-Logic-Clark-2008a}&amp;lt;/rawtex&amp;gt;:  [x-devonthink-item://CDEC17B7-1EEE-42E1-B8C9-86A24C172BF3?page=2 27])&lt;/blockquote&gt;A prerequisite for the use of this reference is to have installed and properly customized the &lt;a href=&quot;http://www.mediawiki.org/wiki/Extension:Wiki2LaTeX&quot;&gt;Wiki2LaTeX&lt;/a&gt; MediaWiki extension. I will write more about this and its importance in a future post.&lt;br /&gt;
&lt;br /&gt;
2. A LaTeX reference that can be inserted in a text file together with the proper LaTeX code for the creation of the corresponding hyperlink. An example is the following:&lt;br /&gt;
&lt;blockquote&gt;(\cite{Deconstructing-the-Laws-of-Logic-Clark-2008a}:  \href{x-devonthink-item://CDEC17B7-1EEE-42E1-B8C9-86A24C172BF3?page=2}{27})&lt;/blockquote&gt;3. A MediaWIki internal link to the wiki page of the source, followed by an external link to the PDF file itself. An example is the following:&lt;br /&gt;
&lt;blockquote&gt;([[Deconstructing the Laws of Logic - Clark]]: [x-devonthink-item://CDEC17B7-1EEE-42E1-B8C9-86A24C172BF3?page=2 27])&amp;nbsp;  &lt;/blockquote&gt;&lt;blockquote class=&quot;&quot;&gt;&lt;/blockquote&gt;4. A DEVONthink url &lt;br /&gt;
&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;
How to use this AppleScript&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
You should run the AppleScript when you read a PDF file in Skim and you want to make a reference to the current page. Additionally, a TextMate file should be opened. After the execution you can select from a menu which kind of reference you would like to be created. All the necessary numbers for the hyperlinks and the references are automatically created with the help of &lt;a href=&quot;http://organognosi.blogspot.com/2011/04/latin-page-numbers-arabic-page-numbers.html&quot;&gt;the fifth note&lt;/a&gt;. You can see this AppleScript in action in the following video:&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;object width=&quot;480&quot; height=&quot;320&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/oGJ6f1SL5k4?hl=en&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/oGJ6f1SL5k4?hl=en&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;480&quot; height=&quot;320&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The AppleScript code is the following:&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;--2011-04-05&lt;br /&gt;
--http://organognosi.blogspot.com&lt;br /&gt;
&lt;br /&gt;
tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; activate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberOfNote5 to (get text for note 5 of page 1 of document 1) as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set RefType to my chooseRefType({&quot;Latex for MediaWiki&quot;, &quot;Latex&quot;, &quot;MediaWiki&quot;, &quot;DEVONthink link&quot;})&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if RefType is 0 then return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; tell document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set currentPageNumber to get index of current page&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set currentPageNumberText to currentPageNumber as text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pageDevonThinkNumber to currentPageNumber - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set pageDevonThinkNumberText to pageDevonThinkNumber as text&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DevonThinkLink to get text of note RefType of page 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set theRealPage to currentPageNumber + numberOfNote5 as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;TextMate&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; activate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if RefType is 1 then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DevonThinkLink&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;System Events&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 123&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 123&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert pageDevonThinkNumberText &amp;amp; &quot; &quot; &amp;amp; theRealPage&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;System Events&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 124&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 124&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if RefType is 2 then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DevonThinkLink&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;System Events&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 123&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 123&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 123&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 123&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert pageDevonThinkNumberText&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;System Events&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 124&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 124&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert theRealPage&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;System Events&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 124&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 124&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if RefType is 3 then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DevonThinkLink&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;System Events&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 123&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 123&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert pageDevonThinkNumberText &amp;amp; &quot; &quot; &amp;amp; theRealPage&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;System Events&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 124&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 124&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if RefType is 4 then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DevonThinkLink&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;System Events&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; key code 51&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert pageDevonThinkNumberText&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
end tell&lt;br /&gt;
&lt;br /&gt;
on chooseRefType(typeList)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set theResult to choose from list typeList with prompt &quot;Reference type:&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if theResult is false then return 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set refTypeNumber to theResult as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if refTypeNumber is &quot;Latex for MediaWiki&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if refTypeNumber is &quot;Latex&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return 2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if refTypeNumber is &quot;MediaWiki&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return 3&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; else if refTypeNumber is &quot;DEVONthink link&quot; then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return 4&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return RefType&lt;br /&gt;
end chooseRefType&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/4756073218819782758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/4756073218819782758?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4756073218819782758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4756073218819782758'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/04/automated-creation-of-references-with.html' title='Automated creation of references with hyperlinks from Skim'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-4092015397689990546</id><published>2011-04-02T11:47:00.001+03:00</published><updated>2011-04-04T15:31:32.169+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Skim"/><title type='text'>Go to the written page number of a PDF document</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In my previous post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/04/latin-page-numbers-arabic-page-numbers.html&quot;&gt;Latin page numbers, Arabic page numbers and the fifth Skim note&lt;/a&gt;&quot; I described the logic behind the number in the fifth note. Now we can use this information in order to go to the written page number of a PDF document without doing any calculations. This proves quite convenient especially in the case of academic papers in which the written numbers are totally out of sync with the page numbers which are given by Skim.&lt;br /&gt;
&lt;br /&gt;
The AppleScript which performs this function is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;--2011-04-02 &lt;br /&gt;
--http://organognosi.blogspot.com&lt;br /&gt;
&lt;br /&gt;
tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; display dialog &quot;Give the written page number:&quot; default answer &quot;&quot; buttons {&quot;Cancel&quot;, &quot;OK&quot;} default button 2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set writtenNumber to text returned of the result as integer&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberNote5 to (get text for note 5 of page 1 of document 1)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set numberInThePDF to writtenNumber - numberNote5&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; go document 1 to page numberInThePDF of document 1&lt;br /&gt;
end tell&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/4092015397689990546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/4092015397689990546?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4092015397689990546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4092015397689990546'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/04/go-to-written-page-number-of-pdf.html' title='Go to the written page number of a PDF document'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-117117762470948370</id><published>2011-04-01T13:33:00.004+03:00</published><updated>2011-04-04T15:31:05.335+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="PDF"/><category scheme="http://www.blogger.com/atom/ns#" term="Skim"/><title type='text'>Latin page numbers, Arabic page numbers and the fifth Skim note</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I have observed that my ebooks and papers which are in PDF format can be separated in one of the following three groups according to the relation between the page numbers that are given by Skim and the correspoding written numbers in the potentially printed PDF pages.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
The first group contains the PDF files in which these two numbers coincide for any given page.&amp;nbsp; In this case there is just the number zero in the fifth note in the first PDF page. This is the simplest case and an example of such a document is shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGYKIXOLPC6T1K2DcbVV6QzPNBm2UtB9L_KjERXjwkN6uXTCQeQ17ZhE4bnucZWQw6RaoPgCpkFg6MQ2YrvDz01xt4EBbuJRfJqmf-1rQ7wM043xBS7Fo2VEIWWicavnojAYQU0gk5MN4y/s1600/Notes+2+-+only+with+arabic+numbers.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;383&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGYKIXOLPC6T1K2DcbVV6QzPNBm2UtB9L_KjERXjwkN6uXTCQeQ17ZhE4bnucZWQw6RaoPgCpkFg6MQ2YrvDz01xt4EBbuJRfJqmf-1rQ7wM043xBS7Fo2VEIWWicavnojAYQU0gk5MN4y/s400/Notes+2+-+only+with+arabic+numbers.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The second group contains ebooks in which Latin numbers are used in a number of pages such as in its table of contents. In this case I put in the fifth note the negative total number of pages that precede the first PDF page with the written Arabic number 1. For example lets say that an ebook has its cover in the first PDF page, followed by six pages with Latin numbers. As a result the first PDF page with the Arabic number 1 is the eighth PDF page and the number -7 is written in the fifth note. In the following image you can see a page from the aforementioned ebook. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVP-XR1mVgyDjgxRuvmDjchiQqLIBbJv0QNYdr5GOU9Vc0niZCAshWgxAzX9Ndq_nIxoqBBlUw-uY3FKZJ89UFWa6SHSwVt2okiPTIbk0OVAkbk6fivkm48XbZP4cy2AhuLmMXLMGYeGrk/s1600/Notes+3+-+with+latin+numbers.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVP-XR1mVgyDjgxRuvmDjchiQqLIBbJv0QNYdr5GOU9Vc0niZCAshWgxAzX9Ndq_nIxoqBBlUw-uY3FKZJ89UFWa6SHSwVt2okiPTIbk0OVAkbk6fivkm48XbZP4cy2AhuLmMXLMGYeGrk/s400/Notes+3+-+with+latin+numbers.jpg&quot; width=&quot;327&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
By the way I do not find any value in the use of Latin numbers in electronic documents. To the contrary it makes the navigation of PDF files more difficult and cumbersome. One way to solve this problem is to move all the pages with Latin numbers and the cover at the end of the file. However, if you create these notes in your PDF files there is an alternative way of overcoming the problems which are caused by this relic of publishing tradition. &lt;br /&gt;
&lt;br /&gt;
Finally the third group contains papers from academic journals in which the written page numbers are totally out of sync with the page numbers which are given by Skim. In this case I put in the fifth note the written number in the first PDF page decreased by one. An example of such a document is shown in the following image.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU4wfG96z-QbCWbUolN1cuGzPxktWWTXarS0qOTeaWjnyOpyv4Eyy6Lpy7FKnHvN6irDkpsPkGQEtiyTHMDt2WtjHADAidaXgN9gnubiHD9inS9r0psk-vLuN9V2zrFYXrF9rgLAhu97FV/s1600/Notes+1+-+in+paper.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU4wfG96z-QbCWbUolN1cuGzPxktWWTXarS0qOTeaWjnyOpyv4Eyy6Lpy7FKnHvN6irDkpsPkGQEtiyTHMDt2WtjHADAidaXgN9gnubiHD9inS9r0psk-vLuN9V2zrFYXrF9rgLAhu97FV/s400/Notes+1+-+in+paper.jpg&quot; width=&quot;396&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
If there is an extra page with journal and paper information at the start of the document then you should substract by two. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMDK2WUjwdbtoehEWYP_qfqEOWTCLH_W64zWDvtQt03kvZFxErLdB4ec4I_pfqfk_3aGSpbahuHJWkIOPH-mYd2ZFMmJUEDGfppuYIVeYwkAWZr0OTBheuZpJNByzQkhopWWYNqhyZzN9H/s1600/Note+-+Paper+with+journal+cover.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMDK2WUjwdbtoehEWYP_qfqEOWTCLH_W64zWDvtQt03kvZFxErLdB4ec4I_pfqfk_3aGSpbahuHJWkIOPH-mYd2ZFMmJUEDGfppuYIVeYwkAWZr0OTBheuZpJNByzQkhopWWYNqhyZzN9H/s400/Note+-+Paper+with+journal+cover.JPG&quot; width=&quot;328&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In my next posts I will present what can be achieved with the help of the fifth note.&amp;nbsp; &lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/117117762470948370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/117117762470948370?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/117117762470948370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/117117762470948370'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/04/latin-page-numbers-arabic-page-numbers.html' title='Latin page numbers, Arabic page numbers and the fifth Skim note'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGYKIXOLPC6T1K2DcbVV6QzPNBm2UtB9L_KjERXjwkN6uXTCQeQ17ZhE4bnucZWQw6RaoPgCpkFg6MQ2YrvDz01xt4EBbuJRfJqmf-1rQ7wM043xBS7Fo2VEIWWicavnojAYQU0gk5MN4y/s72-c/Notes+2+-+only+with+arabic+numbers.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-4948653113047587908</id><published>2011-03-25T18:33:00.009+02:00</published><updated>2011-04-04T15:30:43.723+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="DevonThink"/><category scheme="http://www.blogger.com/atom/ns#" term="Skim"/><title type='text'>How to create correctly the Skim notes which have the DEVONthink links, when you have already annotated the first page of the PDF document</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In my post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/02/devonthink-links-in-skim-notes.html&quot;&gt;How to put DevonThink links in Skim notes&lt;/a&gt;&quot; I described how you can create to a PDF file a number of Skim notes with various versions of references to itself. These notes are created in the first page of the document and an example of them is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhks-FtKQpJKW16K4snRisve0ToBvEC7aPewDn5iXooNrsCmHDSO036Z1GkSQNsXXLI1GuBeN_2ME9t34L4cKNWG5vpl7Yyh4xcCxBNZ4hTTHOb8dlktUoT6w5f4PTEyhqnAM-ifa2ZXa87/s1600/Skim+notes+1-5.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;50&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhks-FtKQpJKW16K4snRisve0ToBvEC7aPewDn5iXooNrsCmHDSO036Z1GkSQNsXXLI1GuBeN_2ME9t34L4cKNWG5vpl7Yyh4xcCxBNZ4hTTHOb8dlktUoT6w5f4PTEyhqnAM-ifa2ZXa87/s400/Skim+notes+1-5.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In my post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/03/automated-creation-of-latex-compatible.html&quot;&gt;Automated creation of a LaTeX compatible citation only from Skim! (with hyperlink included)&lt;/a&gt;&quot; I write that &quot;it is required that you create these notes when there are no annotations in the first page of the PDF file. Otherwise these four notes will take another index number and you will need to adjust accordingly the AppleScript&quot;.&lt;br /&gt;
&lt;br /&gt;
Now it is time to overcome this limitation!&lt;br /&gt;
&lt;br /&gt;
Specifically, I wrote an AppleScript which temporarily removes all your annotations from your PDF file, then creates the desirable notes with the correct index numbers and at the end reinserts your annotations. You should run this script when you have selected one or more PDF files from a DEVONthink database. &lt;br /&gt;
&lt;br /&gt;
The AppleScript code is the following:&lt;br /&gt;
&lt;blockquote&gt;--2011-03-25 &lt;br /&gt;
--http://organognosi.blogspot.com&lt;br /&gt;
&lt;br /&gt;
tell application id &quot;com.devon-technologies.thinkpro2&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set these_items to the selection&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if these_items is {} then error &quot;Please select some contents.&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with this_item in these_items&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set RecordLink to the reference URL of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DevonThinkLink to RecordLink &amp;amp; &quot;?page=0&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set PdfPath to get the path of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set PdfName to the name of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; open PdfPath&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set docPath to path of front document&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set notesPath to text 1 thru -5 of docPath &amp;amp; &quot; (notes).skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; save front document&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; save front document in notesPath as &quot;Skim notes&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delete notes of front document&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell page 1 of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; make note with properties {type:anchored note, bounds:{523, 820, 540, 820}, text:&quot;(&amp;lt;rawtex&amp;gt;&amp;lt;/rawtex&amp;gt;: [&quot; &amp;amp; RecordLink &amp;amp; &quot;?page=])&quot;, extended text:DevonThinkLink}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 0.1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; make note with properties {type:anchored note, bounds:{523, 800, 540, 800}, text:&quot;(: \\href{&quot; &amp;amp; RecordLink &amp;amp; &quot;?page=}{})&quot;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 0.1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; make note with properties {type:anchored note, bounds:{523, 780, 540, 780}, text:&quot;([[&quot; &amp;amp; PdfName &amp;amp; &quot;]]: [&quot; &amp;amp; RecordLink &amp;amp; &quot;?page=])&quot;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 0.1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; make note with properties {type:anchored note, bounds:{523, 760, 540, 760}, text:DevonThinkLink, extended text:PdfName}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; delay 0.1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; make note with properties {type:anchored note, bounds:{523, 760, 540, 760}, text:&quot;0&quot;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; read notes front document from notesPath without replacing&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
end tell&lt;/blockquote&gt;&lt;br /&gt;
2011-04-02&lt;br /&gt;
Moreover, this AppleScript creates a fifth Skim note in the first PDF page with the default value zero. For more information about this note see my post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/04/latin-page-numbers-arabic-page-numbers.html&quot;&gt;Latin page numbers, Arabic page numbers and the fifth Skim note&lt;/a&gt;&quot;. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/4948653113047587908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/4948653113047587908?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4948653113047587908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/4948653113047587908'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/03/how-to-create-correctly-skim-notes.html' title='How to create correctly the Skim notes which have the DEVONthink links, when you have already annotated the first page of the PDF document'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhks-FtKQpJKW16K4snRisve0ToBvEC7aPewDn5iXooNrsCmHDSO036Z1GkSQNsXXLI1GuBeN_2ME9t34L4cKNWG5vpl7Yyh4xcCxBNZ4hTTHOb8dlktUoT6w5f4PTEyhqnAM-ifa2ZXa87/s72-c/Skim+notes+1-5.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-7429324145706272489</id><published>2011-03-24T11:17:00.004+02:00</published><updated>2011-04-04T15:30:24.835+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="DevonThink"/><category scheme="http://www.blogger.com/atom/ns#" term="Finder"/><category scheme="http://www.blogger.com/atom/ns#" term="Skim"/><title type='text'>How to reveal the front Skim PDF document in Finder and in DEVONthink</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;You can use the following AppleScript to reveal the front Skim PDF document in Finder:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set FilePath to get the file of front document&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;Finder&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; activate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; reveal FilePath&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
end tell&lt;/blockquote&gt;You can use the following AppleScript to reveal the front Skim PDF document in DEVONthink:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set the xDEVONthinkLink to (get text for note 4 of document 1) as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set customUUID to text 21 thru -8 of xDEVONthinkLink as string&lt;br /&gt;
end tell&lt;br /&gt;
&lt;br /&gt;
tell application &quot;DEVONthink Pro&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; activate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; tell database &quot;MySources&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set myPDF to get record with uuid customUUID&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; open tab for record myPDF&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;System Events&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell process &quot;DEVONthink Pro&quot; to click menu item &quot;Reveal&quot; of menu 1 of menu bar item &quot;Data&quot; of menu bar 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; close document window 1&lt;br /&gt;
end tell &lt;/blockquote&gt;In order for the last AppleScript to work properly, you need to have the DEVONthink URL in the fourth Skim note of the first page of the PDF in the following form:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;x-devonthink-item://648847AF-4714-4328-916C-6169A6389124?page=0 &lt;/blockquote&gt;&lt;br /&gt;
In my post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/02/devonthink-links-in-skim-notes.html&quot;&gt;How to put DevonThink links in Skim note&lt;/a&gt;&quot; I describe how this can be done automatically.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Moreover you need to adjust appropriately the name of the DEVONthink database&amp;nbsp; in the line:&lt;br /&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tell database &quot;MySources&quot;&amp;nbsp; &lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/7429324145706272489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/7429324145706272489?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/7429324145706272489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/7429324145706272489'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/03/how-to-reveal-front-skim-pdf-document.html' title='How to reveal the front Skim PDF document in Finder and in DEVONthink'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-3878782608432716373</id><published>2011-03-17T19:39:00.007+02:00</published><updated>2011-04-04T15:29:51.938+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="hyperlink"/><category scheme="http://www.blogger.com/atom/ns#" term="mind map"/><category scheme="http://www.blogger.com/atom/ns#" term="MindMeister"/><category scheme="http://www.blogger.com/atom/ns#" term="the big picture"/><title type='text'>The roadmap of my blog on-line in MindMeister</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Yesterday, I found a new on-line mind mapping tool, named &lt;a href=&quot;http://www.mindmeister.com/&quot;&gt;MindMeister&lt;/a&gt; and &lt;a href=&quot;http://www.mindmeister.com/87581420/kinds-of-hyperlinks&quot;&gt;I uploaded there the mind map&lt;/a&gt; about the various kinds of links that I use in my workflow. Moreover it is now embedded in the original post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/02/web-of-links.html&quot;&gt;A road map for my blog - The many faces of links&lt;/a&gt;&quot; and you can navigate it also from here. I think it deserves a second post in this, greatly improved and interactive form! &lt;/div&gt;&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; height=&quot;600&quot; scrolling=&quot;no&quot; src=&quot;http://www.mindmeister.com/maps/public_map_shell/87581420/hyperlinks?width=470&amp;amp;height=600&amp;amp;zoom=0&quot; style=&quot;overflow: hidden;&quot; width=&quot;470&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;div&gt;&lt;script type=&quot;text/javascript&quot;&gt;
  var _gaq = _gaq || [];
  _gaq.push([&#39;_setAccount&#39;, &#39;UA-21370412-1&#39;]);
  _gaq.push([&#39;_trackPageview&#39;]);

  (function() {
    var ga = document.createElement(&#39;script&#39;); ga.type = &#39;text/javascript&#39;; ga.async = true;
    ga.src = (&#39;https:&#39; == document.location.protocol ? &#39;https://ssl&#39; : &#39;http://www&#39;) + &#39;.google-analytics.com/ga.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/3878782608432716373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/3878782608432716373?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/3878782608432716373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/3878782608432716373'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/03/roadmap-of-my-blog-on-line-in.html' title='The roadmap of my blog on-line in MindMeister'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-1083289144855102390</id><published>2011-03-17T12:10:00.007+02:00</published><updated>2011-04-04T15:29:29.580+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="BetterTouchTool"/><category scheme="http://www.blogger.com/atom/ns#" term="FastScripts"/><title type='text'>How to easily assign shortkeys and gestures to AppleScripts</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In my daily workflow I use a significant number of AppleScripts, as you will have understoond from my previous posts :-). So it is handy for me to assign shortkeys to some of them. For this purpose I use the &lt;a href=&quot;http://www.red-sweater.com/fastscripts/&quot;&gt;FastScripts&lt;/a&gt; utility.&amp;nbsp; Although it is not a commercial app, it gives you for free up to 10 keyboard shortcuts.&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
After the previous assignments you are able to trigger the execution of AppleScripts using customized gesture definitions with the help of &lt;a href=&quot;http://www.boastr.de/&quot;&gt;BetterTouchTool&lt;/a&gt; app. &lt;br /&gt;
&lt;br /&gt;
In the following screenshot you can see some of my Skim gestures:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMAHlo8R2CQl5p-Vb6nN5k_kcC-iDtSukv5D4JzfFV9mY4eie-qMTDJ-nIGe0NsotF7282z-dPXGM7AaGtV9aZjkc3LTuqIleIcAQ6KSfn_Xmgg8Dh15wkSY9PZ5Kb1CUwE8m4E1QOqnnJ/s1600/Skim+gestures.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;340&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMAHlo8R2CQl5p-Vb6nN5k_kcC-iDtSukv5D4JzfFV9mY4eie-qMTDJ-nIGe0NsotF7282z-dPXGM7AaGtV9aZjkc3LTuqIleIcAQ6KSfn_Xmgg8Dh15wkSY9PZ5Kb1CUwE8m4E1QOqnnJ/s400/Skim+gestures.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;script type=&quot;text/javascript&quot;&gt;

  var _gaq = _gaq || [];
  _gaq.push([&#39;_setAccount&#39;, &#39;UA-21370412-1&#39;]);
  _gaq.push([&#39;_trackPageview&#39;]);

  (function() {
    var ga = doument.createElement(&#39;script&#39;); ga.type = &#39;text/javascript&#39;; ga.async = true;
    ga.src = (&#39;https:&#39; == document.location.protocol ? &#39;https://ssl&#39; : &#39;http://www&#39;) + &#39;.google-analytics.com/ga.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(ga, s);
  })();

&lt;/script&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/1083289144855102390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/1083289144855102390?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/1083289144855102390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/1083289144855102390'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/03/how-to-easily-assign-shortkeys-and.html' title='How to easily assign shortkeys and gestures to AppleScripts'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMAHlo8R2CQl5p-Vb6nN5k_kcC-iDtSukv5D4JzfFV9mY4eie-qMTDJ-nIGe0NsotF7282z-dPXGM7AaGtV9aZjkc3LTuqIleIcAQ6KSfn_Xmgg8Dh15wkSY9PZ5Kb1CUwE8m4E1QOqnnJ/s72-c/Skim+gestures.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-2671054956107332442</id><published>2011-03-17T11:20:00.006+02:00</published><updated>2011-04-04T15:29:02.793+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adobe Acrobat Pro"/><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AutoBookmark"/><category scheme="http://www.blogger.com/atom/ns#" term="hyperlink"/><category scheme="http://www.blogger.com/atom/ns#" term="PDF"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>How to automatically embed hyperlinks into citations and bibliographical entries of a downloaded PDF document! Part III</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In the last post of this series I present how the embedding of hyperlinks is made in a sample PDF file. A prerequisite for the following actions it to have already created one or more link dictionaries (if you do not know how, read &lt;a href=&quot;http://organognosi.blogspot.com/2011/03/how-to-automatically-embed-hyperlinks.html&quot;&gt;part II for detailed instructions&lt;/a&gt; and &lt;a href=&quot;http://organognosi.blogspot.com/2011/03/how-to-convert-citations-and.html&quot;&gt;part I for more general related information&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
Let&#39;s say that you have the PDF file opened in Skim. Then you should open it in Adobe Acrobat Pro in your Windows virtual machine. To make things faster you can have the Windows formatted path of this file in your clipboard by executing the AppleScript which I wrote in my post:  &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/03/convert-mac-style-path-to-windows-style.html&quot;&gt;How to convert a Mac-Unix style path to a Windows style path from Skim&quot;. &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
In the following sreenshots you can see the required steps: &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSe3MdeO1XqregsbmVUdUoOBoWvBAx6UKDLTp0u1mZBXP4WGvbPOZ36Qf1JWs5cvidCcsufKRxccptBWNRQtA55IGjYjD1eTSFGrelVR5ZlvYQAsbgWPte_A018Cb7v0ykkrLr_NFtckaa/s1600/Embed+hyperlinks+1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;337&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSe3MdeO1XqregsbmVUdUoOBoWvBAx6UKDLTp0u1mZBXP4WGvbPOZ36Qf1JWs5cvidCcsufKRxccptBWNRQtA55IGjYjD1eTSFGrelVR5ZlvYQAsbgWPte_A018Cb7v0ykkrLr_NFtckaa/s400/Embed+hyperlinks+1.JPG&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEzJvwJLPSooSKXEXmnJjCDvktslMypbdt_jl3qbip2-vvjPKcI3g3PsFcu_D-ISfsgvbG-8ixFlGX3XH5OpMIuCEaJiTOBeyca_s2bFZEOSQ9hocspfe8Zoan24PUEDEJV8irXsTj5y00/s1600/Create+Dictionary+0.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;128&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEzJvwJLPSooSKXEXmnJjCDvktslMypbdt_jl3qbip2-vvjPKcI3g3PsFcu_D-ISfsgvbG-8ixFlGX3XH5OpMIuCEaJiTOBeyca_s2bFZEOSQ9hocspfe8Zoan24PUEDEJV8irXsTj5y00/s400/Create+Dictionary+0.JPG&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib-iZGHA937syuQxnE1zLyjg2v1Hiu2vanrt8UODqgEiXam5v9LKxZAVgxRtybEQYSx5Iy_uRNgHprUKaw5o3nqVqO91p0dyBwM1W5EuINsavtgAAlVf5UAw5wmJhllSRyOFTBQyi6ivKK/s1600/Embed+hyperlinks2.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib-iZGHA937syuQxnE1zLyjg2v1Hiu2vanrt8UODqgEiXam5v9LKxZAVgxRtybEQYSx5Iy_uRNgHprUKaw5o3nqVqO91p0dyBwM1W5EuINsavtgAAlVf5UAw5wmJhllSRyOFTBQyi6ivKK/s400/Embed+hyperlinks2.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&amp;nbsp; &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;script type=&quot;text/javascript&quot;&gt;

  var _gaq = _gaq || [];
  _gaq.push([&#39;_setAccount&#39;, &#39;UA-21370412-1&#39;]);
  _gaq.push([&#39;_trackPageview&#39;]);

  (function() {
    var ga = document.createElement(&#39;script&#39;); ga.type = &#39;text/javascript&#39;; ga.async = true;
    ga.src = (&#39;https:&#39; == document.location.protocol ? &#39;https://ssl&#39; : &#39;http://www&#39;) + &#39;.google-analytics.com/ga.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(ga, s);
  })();

&lt;/script&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/2671054956107332442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/2671054956107332442?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2671054956107332442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2671054956107332442'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/03/how-to-automatically-embed-hyperlinks_17.html' title='How to automatically embed hyperlinks into citations and bibliographical entries of a downloaded PDF document! Part III'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSe3MdeO1XqregsbmVUdUoOBoWvBAx6UKDLTp0u1mZBXP4WGvbPOZ36Qf1JWs5cvidCcsufKRxccptBWNRQtA55IGjYjD1eTSFGrelVR5ZlvYQAsbgWPte_A018Cb7v0ykkrLr_NFtckaa/s72-c/Embed+hyperlinks+1.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-2304150800347945737</id><published>2011-03-11T15:06:00.005+02:00</published><updated>2011-04-04T15:28:38.736+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adobe Acrobat Pro"/><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="AutoBookmark"/><category scheme="http://www.blogger.com/atom/ns#" term="BibDesk"/><category scheme="http://www.blogger.com/atom/ns#" term="DevonThink"/><category scheme="http://www.blogger.com/atom/ns#" term="hyperlink"/><category scheme="http://www.blogger.com/atom/ns#" term="PDF"/><category scheme="http://www.blogger.com/atom/ns#" term="TextMate"/><category scheme="http://www.blogger.com/atom/ns#" term="virtual machine"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>How to automatically embed hyperlinks into citations and bibliographical entries of a downloaded PDF document! Part II</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;How to create the dictionaries&lt;br /&gt;
&lt;br /&gt;
Firstly your ebooks and epapers should be inside inside a DevonThink  database. Moreover each source should have its respective record in BibDesk. The  &quot;local URL&quot; field of each record should have the DevonThink URL of the  source. If you do not know how to do this you can read my post &quot;&lt;a href=&quot;http://organognosi.blogspot.com/2011/03/how-to-connect-pdf-file-inside.html&quot;&gt;How to  connect a PDF file inside DevonThink with its record in BibDesk&lt;/a&gt;&quot;.  Finally you should select the records in BibDesk which will constitute  the records of the dictionary and you should have one TextMate txt file  open. Now you are ready to execute either the AppleScript for the  creation of the link dictionary with the titles or for the second kind  of dictionary.&lt;br /&gt;
&lt;br /&gt;
The AppleScript code for the link dictionary with the titles is the following:&lt;br /&gt;
&lt;blockquote&gt;--2011-03-11&lt;br /&gt;
--http://organognosi.blogspot.com &lt;/blockquote&gt;&lt;blockquote&gt;--Works with AutoBookmark 3.7 &lt;/blockquote&gt;&lt;blockquote&gt;tell application &quot;BibDesk&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set these_items to the selection of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if these_items is {} then error &quot;Please select some contents.&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with this_item in these_items&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DevonThinkLink to the linked URL 1 of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set PDfTitle to the value of the field &quot;Title&quot; of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set keywords of this_item to keywords of this_item &amp;amp; &quot;,&quot; &amp;amp; &quot; title link&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DictionaryLinkEntry to PDfTitle &amp;amp; tab &amp;amp; &quot;uri:&quot; &amp;amp; DevonThinkLink &amp;amp; &quot;&lt;br /&gt;
&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;TextMate&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; activate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DictionaryLinkEntry&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
end tell&lt;/blockquote&gt;&lt;br /&gt;
A sample from the text which can be created is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMD8iBynJ663JwQ4xcGhisG3kEfVtosAQoUOWBrSE7xWeVGNBWKJNFobWu2NIE-HGrH4sxb9tXqm2Fcc2QEObTzZEbGHdcDw4BUHvQA4Ki3qA_nws_AZwQUBhhx-0nSVbCSa6-8Wf1BR0U/s1600/Titles+Link+Dictionary.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;21&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMD8iBynJ663JwQ4xcGhisG3kEfVtosAQoUOWBrSE7xWeVGNBWKJNFobWu2NIE-HGrH4sxb9tXqm2Fcc2QEObTzZEbGHdcDw4BUHvQA4Ki3qA_nws_AZwQUBhhx-0nSVbCSa6-8Wf1BR0U/s400/Titles+Link+Dictionary.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The AppleScript code for the link dictionary with author-year compinations is the following: &lt;br /&gt;
&lt;blockquote&gt;--2011-03-11&lt;br /&gt;
--http://organognosi.blogspot.com&lt;br /&gt;
&lt;br /&gt;
tell application &quot;BibDesk&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set these_items to the selection of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if these_items is {} then error &quot;Please select some contents.&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; repeat with this_item in these_items&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set AuthorLink to the last name of the first author of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set firstNameLink to the first name of the first author of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set AbbrNormName to abbreviated normalized name of the first author of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set YearLink to the publication year of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DevonThinkLink1 to the linked URL 1 of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DictionaryLinkEntry to AuthorLink &amp;amp; &quot; &quot; &amp;amp; YearLink &amp;amp; tab &amp;amp; &quot;uri:&quot; &amp;amp; DevonThinkLink1 &amp;amp; &quot;&lt;br /&gt;
&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DictionaryLinkEntry2 to AuthorLink &amp;amp; &quot; (&quot; &amp;amp; YearLink &amp;amp; tab &amp;amp; &quot;uri:&quot; &amp;amp; DevonThinkLink1 &amp;amp; &quot;&lt;br /&gt;
&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DictionaryLinkEntry3 to AuthorLink &amp;amp; &quot; [&quot; &amp;amp; YearLink &amp;amp; tab &amp;amp; &quot;uri:&quot; &amp;amp; DevonThinkLink1 &amp;amp; &quot;&lt;br /&gt;
&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DictionaryLinkEntry4 to AuthorLink &amp;amp; &quot;, &quot; &amp;amp; firstNameLink &amp;amp; &quot; (&quot; &amp;amp; YearLink &amp;amp; tab &amp;amp; &quot;uri:&quot; &amp;amp; DevonThinkLink1 &amp;amp; &quot;&lt;br /&gt;
&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DictionaryLinkEntry5 to AbbrNormName &amp;amp; &quot; &quot; &amp;amp; YearLink &amp;amp; tab &amp;amp; &quot;uri:&quot; &amp;amp; DevonThinkLink1 &amp;amp; &quot;&lt;br /&gt;
&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set DictionaryLinkEntry6 to AbbrNormName &amp;amp; &quot; (&quot; &amp;amp; YearLink &amp;amp; tab &amp;amp; &quot;uri:&quot; &amp;amp; DevonThinkLink1 &amp;amp; &quot;&lt;br /&gt;
&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tell application &quot;TextMate&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; activate&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DictionaryLinkEntry&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DictionaryLinkEntry2&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DictionaryLinkEntry3&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DictionaryLinkEntry4&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DictionaryLinkEntry5&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; insert DictionaryLinkEntry6&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; end try&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; end repeat&lt;br /&gt;
end tell&lt;/blockquote&gt;A sample from the text which can be created is shown below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixIzsM_MEWM_IZ2-PXZVFFIW9EC06p4uBUZZuoyj9Ab9sgOoQv0I6s2ZiqQIhMczv_BGa7Wl6WLx1ihCz2Z99FymptmnD8qZ4HHTlovZPXNuRy6LbP3v3I44j9TfRm2cIO8KPM0K90YNVf/s1600/Author+Link+Dictionary.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;113&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixIzsM_MEWM_IZ2-PXZVFFIW9EC06p4uBUZZuoyj9Ab9sgOoQv0I6s2ZiqQIhMczv_BGa7Wl6WLx1ihCz2Z99FymptmnD8qZ4HHTlovZPXNuRy6LbP3v3I44j9TfRm2cIO8KPM0K90YNVf/s400/Author+Link+Dictionary.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now you are ready to go to Adobe Acrobat Pro and use the AutoBookmark plug-in. In the following screen shots you can see the detailed steps in order to create the new dictionaries.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEzJvwJLPSooSKXEXmnJjCDvktslMypbdt_jl3qbip2-vvjPKcI3g3PsFcu_D-ISfsgvbG-8ixFlGX3XH5OpMIuCEaJiTOBeyca_s2bFZEOSQ9hocspfe8Zoan24PUEDEJV8irXsTj5y00/s1600/Create+Dictionary+0.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;128&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEzJvwJLPSooSKXEXmnJjCDvktslMypbdt_jl3qbip2-vvjPKcI3g3PsFcu_D-ISfsgvbG-8ixFlGX3XH5OpMIuCEaJiTOBeyca_s2bFZEOSQ9hocspfe8Zoan24PUEDEJV8irXsTj5y00/s400/Create+Dictionary+0.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ8XIHurpy4LUpdJtonuzyGWyaU40Q1Mk2vQLLcPXWDihVIa4_LZfpYH0ilJaG4ssR_17gffxSKJb1kr2_r_ddGE_ttql-obDFjdtd0oBVI727W4Atw3Ta17st3LwCjt968JYX3ozoXVX0/s1600/Create+Dictionary+1.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;311&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ8XIHurpy4LUpdJtonuzyGWyaU40Q1Mk2vQLLcPXWDihVIa4_LZfpYH0ilJaG4ssR_17gffxSKJb1kr2_r_ddGE_ttql-obDFjdtd0oBVI727W4Atw3Ta17st3LwCjt968JYX3ozoXVX0/s400/Create+Dictionary+1.JPG&quot; width=&quot;400&quot; /&gt;li&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAez8IzIbSItcbaJtt8lguA-KSXTGPO4PeoDJv5gqKeyheWbzYBDWlsKkH35-Jzz6ljc78hcUyWJfMnAGShsS0gkzrZILupNX4iBACxq_d4Khxee-jsBuhRVDaBC5Mszygadc1_Baq0zsj/s1600/Create+Dictionary+3.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;356&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAez8IzIbSItcbaJtt8lguA-KSXTGPO4PeoDJv5gqKeyheWbzYBDWlsKkH35-Jzz6ljc78hcUyWJfMnAGShsS0gkzrZILupNX4iBACxq_d4Khxee-jsBuhRVDaBC5Mszygadc1_Baq0zsj/s400/Create+Dictionary+3.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk3AxTgPRy9p6s6l_5KpwYIFsxtlIBRBr6BR_EdySKeG6oKUwNBV6h8JpvH_g3JaHx0AW4i1-PTRmzmb7dEB3CzXsRdPImVo4_ga3eI2BkH9e6oxsNkqEtz1CMaVoRl4hT3FBsphuKF08s/s1600/Create+Dictionary+4b.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;302&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk3AxTgPRy9p6s6l_5KpwYIFsxtlIBRBr6BR_EdySKeG6oKUwNBV6h8JpvH_g3JaHx0AW4i1-PTRmzmb7dEB3CzXsRdPImVo4_ga3eI2BkH9e6oxsNkqEtz1CMaVoRl4hT3FBsphuKF08s/s400/Create+Dictionary+4b.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;In this step you should select the txt file which was created by one of the two AppleScripts&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNu5d-ItR6GaHoLLcDp_zdvPKFf8ezxUuV2f773ByvKrlcyY-uMTo42zcyYi8b4CNdSHSAh8dF6ytR12Wr9zWY22cx7JlFmqmZauLc7IK3ju0mJjpPSh1EcGySN76vnAUJ6ZBdq9niQdpG/s1600/Create+Dictionary+5.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;302&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNu5d-ItR6GaHoLLcDp_zdvPKFf8ezxUuV2f773ByvKrlcyY-uMTo42zcyYi8b4CNdSHSAh8dF6ytR12Wr9zWY22cx7JlFmqmZauLc7IK3ju0mJjpPSh1EcGySN76vnAUJ6ZBdq9niQdpG/s400/Create+Dictionary+5.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvJw5FvJSMVNbEas50v7DFDRX7pcbrEVXpjVyBQWCOCYlxe1TIMrc1_HDSfY2wojsajP161EbQBEt-7hT400ScxjYN-NiowzzY_3EtLLnTNsJ3ric1MzTXlGcte4mvSvTyAgu9qm4V8ehR/s1600/Create+dictionary+4.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/div&gt;Now your link dictionary is ready.&lt;/div&gt;&lt;script type=&quot;text/javascript&quot;&gt;
  var _gaq = _gaq || [];
  _gaq.push([&#39;_setAccount&#39;, &#39;UA-21370412-1&#39;]);
  _gaq.push([&#39;_trackPageview&#39;]);

  (function() {
    var ga = document.createElement(&#39;script&#39;); ga.type = &#39;text/javascript&#39;; ga.async = true;
    ga.src = (&#39;https:&#39; == document.location.protocol ? &#39;https://ssl&#39; : &#39;http://www&#39;) + &#39;.google-analytics.com/ga.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/2304150800347945737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/2304150800347945737?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2304150800347945737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2304150800347945737'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/03/how-to-automatically-embed-hyperlinks.html' title='How to automatically embed hyperlinks into citations and bibliographical entries of a downloaded PDF document! Part II'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMD8iBynJ663JwQ4xcGhisG3kEfVtosAQoUOWBrSE7xWeVGNBWKJNFobWu2NIE-HGrH4sxb9tXqm2Fcc2QEObTzZEbGHdcDw4BUHvQA4Ki3qA_nws_AZwQUBhhx-0nSVbCSa6-8Wf1BR0U/s72-c/Titles+Link+Dictionary.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-9087995983949395522</id><published>2011-03-11T01:16:00.012+02:00</published><updated>2011-04-04T15:28:14.195+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adobe Acrobat Pro"/><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AutoBookmark"/><category scheme="http://www.blogger.com/atom/ns#" term="BibDesk"/><category scheme="http://www.blogger.com/atom/ns#" term="DevonThink"/><category scheme="http://www.blogger.com/atom/ns#" term="hyperlink"/><category scheme="http://www.blogger.com/atom/ns#" term="PDF"/><category scheme="http://www.blogger.com/atom/ns#" term="TextMate"/><category scheme="http://www.blogger.com/atom/ns#" term="virtual machine"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>How to automatically embed hyperlinks into citations and bibliographical entries of a downloaded PDF document! Part I</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Nowadays, it is possible for a researcher to amass a huge number of electronic papers and books about his specialized area of interest. Naturally there are a lot of cross-references between these sources. The usual way of managing these files is the creation of a bibliographical database in one of the numerous relative programs like &lt;a href=&quot;http://www.endnote.com/&quot;&gt;EndNote&lt;/a&gt;, &lt;a href=&quot;http://www.mekentosj.com/papers/&quot;&gt;Papers&lt;/a&gt;, &lt;a href=&quot;http://jabref.sourceforge.net/&quot;&gt;JabRef&lt;/a&gt; and &lt;a href=&quot;http://bibdesk.sourceforge.net/&quot;&gt;BibDesk&lt;/a&gt;. In this post I will try to present an exciting new way of &quot;managing&quot; your files which in a way makes managing them obsolete!&lt;br /&gt;
&lt;br /&gt;
Specifically I created a workflow for embedding DevonThink hyperlinks into the very citations and bibliography entries of a PDF file. As a result when you want to read a cited paper or book you do not need to go to your bibliography manager program or even worse to the folder hierarchy of your hard drive in order to find the file. Instead you can just click the citation or the title or the author of the bibliography entry and the respective PDF file opens instantly! The magic of &lt;a href=&quot;http://www.devon-technologies.com/products/devonthink/&quot;&gt;DevonThink&lt;/a&gt; hyperlinks in action!&lt;br /&gt;
&lt;br /&gt;
The required tools/programs for this dream to come true are the following: &lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;a href=&quot;http://www.adobe.com/products/acrobatpro.html&quot;&gt;Adobe Acrobat Pro &lt;/a&gt;for Windows&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.evermap.com/autobookmark.asp&quot;&gt;AutoBookmark plug-in&lt;/a&gt; for Adobe Acrobat Pro&lt;/li&gt;
&lt;li&gt;A Windows virtual machine&amp;nbsp;&lt;/li&gt;
&lt;li&gt;DevonThink &lt;/li&gt;
&lt;li&gt;BibDesk&lt;/li&gt;
&lt;li&gt;TextMate&lt;/li&gt;
&lt;li&gt;Link dictionaries&lt;/li&gt;
&lt;li&gt;The AppleScripts for creating automatically the link dictionaries from BibDesk&lt;/li&gt;
&lt;/ol&gt;More details about the workflow&lt;br /&gt;
&lt;br /&gt;
AutoBookmark searches page text for occurrences of specific words or phrases and generates links annotations according to the user specifications. Link dictionary is a collection of search terms (words, phrases and etc.) and corresponding link actions. When it finds a search term from a dictionary it automatically creates a link annotation using a link action that is associated with it. Each search term should be unique within a link dictionary (excerpt from AutoBookmark help file). So you need to have an appropriate link dictionary so as the hyperlinks to the sources to be created automatically by AutoBookmark.&lt;br /&gt;
&lt;br /&gt;
For our case I consider optimal the use of two different dictionaries each with its own advantages and disadvantages. The first contains&amp;nbsp; various possible forms of author-year citations e.g. Clark 2008, Clark (2008, Clark Stephen (2008, Clark S. 2008, Clark S. (2008. The advantage of this dictionary is that the matches are almost 100% unique. However the probability of the match is somewhat small because of the high variability in the way that the citations are made. The second contains the source titles. Now the situation is the complete opposite because you can very easily have false positive matches if the title is too generic but there is no case of a missing match if the title is adequately complex.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
In my &lt;a href=&quot;http://organognosi.blogspot.com/2011/03/how-to-automatically-embed-hyperlinks.html&quot;&gt;next post&lt;/a&gt; I will describe how you can create the link dictionaries from your Mac. &lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;script type=&quot;text/javascript&quot;&gt;
  var _gaq = _gaq || [];
  _gaq.push([&#39;_setAccount&#39;, &#39;UA-21370412-1&#39;]);
  _gaq.push([&#39;_trackPageview&#39;]);

  (function() {
    var ga = document.createElement(&#39;script&#39;); ga.type = &#39;text/javascript&#39;; ga.async = true;
    ga.src = (&#39;https:&#39; == document.location.protocol ? &#39;https://ssl&#39; : &#39;http://www&#39;) + &#39;.google-analytics.com/ga.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(ga, s);
  })();
&lt;/script&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/9087995983949395522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/9087995983949395522?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/9087995983949395522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/9087995983949395522'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/03/how-to-convert-citations-and.html' title='How to automatically embed hyperlinks into citations and bibliographical entries of a downloaded PDF document! Part I'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-2840545201380821053</id><published>2011-03-09T12:41:00.004+02:00</published><updated>2011-04-04T15:27:47.082+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="Skim"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>How to convert a Mac-Unix style path to a Windows style path from Skim</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Sometimes, I want to open a PDF file in my Windows virtual machine. To make things faster I wrote an AppleScript which converts the PDF file path of the front Skim window to its proper Windows style and then the converted path is sent to the clipboard. &lt;br /&gt;
As a result, all I have to do after the conversion is to paste the new path to the &quot;File&quot; field of the &quot;Open&quot; window in Adobe Acrobat Pro in Windows. &lt;br /&gt;
&lt;br /&gt;
In order for this AppleScript to work properly, you need to customize the variable &quot;WinPath&quot; with the name and the drive letter of your hard drive. &lt;br /&gt;
&lt;br /&gt;
The AppleScript code is the following:&lt;br /&gt;
&lt;blockquote&gt;tell application &quot;Skim&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set FilePath to get the path of front document&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set my text item delimiters to &quot;/&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set FilePath to text items of FilePath&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set my text item delimiters to &quot;\\&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set FilePath to (FilePath as text)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set WinPath to &quot;Z:\\MBProSystem&quot; &amp;amp; FilePath&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set the clipboard to WinPath&lt;br /&gt;
end tell &lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/2840545201380821053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/2840545201380821053?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2840545201380821053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2840545201380821053'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/03/convert-mac-style-path-to-windows-style.html' title='How to convert a Mac-Unix style path to a Windows style path from Skim'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6520941908238556891.post-2674412600258455366</id><published>2011-03-08T20:29:00.005+02:00</published><updated>2011-04-04T15:27:22.226+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all my posts"/><category scheme="http://www.blogger.com/atom/ns#" term="AppleScript"/><category scheme="http://www.blogger.com/atom/ns#" term="BibDesk"/><category scheme="http://www.blogger.com/atom/ns#" term="DevonThink"/><title type='text'>How to connect a PDF file inside DevonThink with its record in BibDesk</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I use &lt;a href=&quot;http://bibdesk.sourceforge.net/&quot;&gt;BibDesk&lt;/a&gt; to manage and create my bibliographies but all my read and annotated PDF files are inside DevonThink. So I wanted an easy and fast way to connect the PDF files with their respective records in BibDesk. Technically I wanted to populate the &quot;local URL&quot; and &quot;local File&quot; columns of BibDesk. Consequently I wrote an AppleScript which does this job :-).&lt;br /&gt;
&lt;br /&gt;
Moreover this AppleScript assigns the tag/keyword &quot;Linked with  DevonThink&quot; to the record in which is applied. In order for this script  to work properly you just have to select one PDF file in DevonThink and  its respective bibliography record in BibDesk. &lt;br /&gt;
&lt;br /&gt;
The AppleScript code is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&amp;nbsp;--2011-03-08&lt;br /&gt;
--http://organognosi.blogspot.com&lt;br /&gt;
--the script works only for one PDF file per time&lt;br /&gt;
&lt;br /&gt;
tell application &quot;DEVONthink Pro&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;set this_item to the content record of think window 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;set RecordLink to the reference URL of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;set DevonThinkLink to RecordLink &amp;amp; &quot;?page=0&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;set PdfPath to get the path of this_item&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;set PdfPath to (POSIX file PdfPath) as alias&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;tell application &quot;BibDesk&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;activate&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;set these_items to the selection of document 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;repeat with theBook in these_items&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;add DevonThinkLink to linked URL of theBook&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;add PdfPath to linked files of theBook&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;set currentKeywords to get keywords of theBook as string&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (currentKeywords is not &quot;&quot;) then&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;set delimiter to &quot;, &quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;set delimiter to &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;end if&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;set keywords of theBook to (keywords of theBook &amp;amp; delimiter &amp;amp; &quot;Linked with DevonThink&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;end repeat&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;end tell&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
end tell&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;script type=&quot;text/javascript&quot;&gt;

  var _gaq = _gaq || [];
  _gaq.push([&#39;_setAccount&#39;, &#39;UA-21370412-1&#39;]);
  _gaq.push([&#39;_trackPageview&#39;]);

  (function() {
    var ga = document.createElement(&#39;script&#39;); ga.type = &#39;text/javascript&#39;; ga.async = true;
    ga.src = (&#39;https:&#39; == document.location.protocol ? &#39;https://ssl&#39; : &#39;http://www&#39;) + &#39;.google-analytics.com/ga.js&#39;;
    var s = document.getElementsByTagName(&#39;script&#39;)[0]; s.parentNode.insertBefore(ga, s);
  })();

&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://organognosi.blogspot.com/feeds/2674412600258455366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6520941908238556891/2674412600258455366?isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2674412600258455366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6520941908238556891/posts/default/2674412600258455366'/><link rel='alternate' type='text/html' href='http://organognosi.blogspot.com/2011/03/how-to-connect-pdf-file-inside.html' title='How to connect a PDF file inside DevonThink with its record in BibDesk'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>