Send to clipboard the selected text in the browser, the source URL and the current date and time

Almost every day I find something interesting in a web site which I usually copy and paste it inside a wiki page. Moreover, I insert the URL of the web page and the current time and date. An example is the following:

AppleScript’s “big advantage” over other scripting languages (which, frankly are much better to use for most tasks) is that it can automate the action of other applications on your Mac (as long as the developer has provided an AppleScript dictionary). (http://stackoverflow.com/questions/1317497/what-is-applescript-and-what-is-it-used-for/1317498#1317498 – [[2013-02-22]], 12:56)

I enclose the date in double brackets because that way a link is created to the page with the title “2013-02-22″ in which I keep my journal for the specific day. An additional bonus created from the link to the specific date is that when I visit the wiki page of that date, I can see a list of all of the pages that have a link to that page. This list is a good indicator of the subjects that I dealt with that day! This list is created by the following DynamicPageList query: {{#dpl: linksto = 2013-02-22 }}



Naturally, I wanted to automate the whole process so I created one bookmarklet for Firefox and one AppleScript for Google Chrome. The only difference between the two is that the AppleScript sends all the data automatically to clipboard while in Firefox the data will be shown in a separate window and then you need to press control + C and close the widow by pressing either Ok or Cancel.

The AppleScript is the following:

Click here to open the source code in AppleScript Editor

The bookmarklet is the following:

Leave a Reply