I am adding similar functionality to my "TeXShop Webpage Helper" so we could embed TeX in links in web pages and PDFs that open in TeX. Imagine having a symbols list in a PDF or favorite snippets and clicking on a link and then having the code inserted into your current document or a new one. You do not have to worry about the encoding because I have already written a TeXShop macro that does all the ugly work: you select some text, run the macro and an encoded URL for the protocol texshop:// is placed in the clipboard. We could write live LaTeX manuals and tutorials for our students. Anyway I am geeked :)
Re: Neat trick: Embedding applescript source code in LaTeX
No more dangerous than downloading software. Also, it does not run the script, it places it in the editor, it is up to you to read it and then decide if it is safe.
Now, that has been a concern of mine when developing "TeXShop Webpage Helper" and I decided that all it should do is allow a hyperlink to scroll around in an existing document (that is all it does right now) and later be able to insert stuff in a new document (in the current selection or a particular place), paste into a new document or into the clipboard. I would not never typeset, so it will not be more dangerous than downloading a TeX file and opening, today.