Applescripts
- I’ve created a page of Applescript resources.
- Eleven Applescript Tutorials starting with some really basic tutorials to get you started extending to more complicated scripts.
- Convert ChemDraw to TIFF, ChemDraw (now known as ChemBioDraw) has excellent applescript support, this folder action automates the conversion of cdx file to TIFF for publications.
- Convert Applescript to HTML
- Use checkmol to generate a list of functional groups output to csv, requires Open Babel, and Checkmol/Matchmol
- DupCheck applescript droplet that checks for duplicates of a file
- ChemDraw Properties this script takes the selected structure and calculates a variety of chemical properties. Full details are in the Applescript tutorial 3.
- ChemDraw multiple properties this script takes as input a file containing SMILES strings and calculates a variety of chemical properties. Full details are in the Applescript tutorial 4
- Print-clipboard I was recently asked if it was possible to print text on the clipboard without the need to open another application to paste it into. One easy way to do this is to create an applescript.
- Comparing version numbers is not so straightforward since the version number could be 2.10.3 or 2.3.10, fortunately Apple have kindly provided a simple means to compare this type of numeric strings.
- Print Folder Contents, I recently needed a list of all files in a particular folder, actually the folder contained sub-folders also containing files. This tedious task becomes trivial with a couple of UNIX commands and Applescript provides a convenient user interface and the glue between the UNIX commands.
- Copy File to MobileMe and send email, MobileMe is no longer available but this script could be modified to save in other online storage facilities.
- Using Geektool, GeekTool is a Preference Pane (System Preferences module) for Mac OS X. It lets you display various types of information directly on you desktop. The information can be derived from a shell script or using osascript it is possible to call applescripts (or any other OSA language scripts). In this tutorial I'll use a couple of simple commands to create desktop content, and then link to Applescripts to create more complex content.
- Start lmgrid license manager, I've found that on some occasions the server quits (perhaps after updates) and needs to be restarted. However since it is something I don't need to do regularly I always spend a while working out the exact syntax. So I created this short Applescript to restart the server.
- Extract a Safari Extension archive, With Safari 5 one of the most interesting new features is the support for Extensions, One of the best ways to learn how to create extensions is to examine other peoples creations, then this Applescript will help you do this.
- Search eMolecules from ChemBioDraw, I use eMolecules much of the time however I'd prefer not to have to learn a new chemical drawing package for every online database. Fortunately most of the sites will accept a SMILES string as the query and most of the desktop drawing packages can generate a SMILES string. This Applescript uses ChemBioDraw (aka ChemDraw) to generate the SMILES string of the selected structure,and then encodes and constructs the URL to run a search of eMolecules.
- Rule of 7 script, I regularly have to profile collections of compounds, these may be from commercial suppliers or could be a virtual library created for a MedChem project. Whilst many people have their own ideas of what are the most important physicochemical properties the seven generated by this script seem to cover almost all requests.
- Applescript and curl, in the days of Mac OS 8.6 Apple provided basic internet functions using a component called URL Access, this was made available to scripts using a small applications called URL Access Scripting. Around the time that Mac OS X became available I changed all my scripts to use curl instead of URL Access Scripting.
- Scripting the script Editor, If you control-click (or right click) on the script editor window you get a menu listing all the script editor scripts that are available. Many of these are part of the standard install whilst others might be installed by specific applications.
- cdx to png script, I was recently asked if I could help with a script to convert ChemBioDraw .cdx files to .png, whilst you can open the file in ChemBioDraw and then choose "Save As" and then choose "PNG" from the drop-down menu this is rather laborious if you have a folder of files your want to convert. This script automates this task.
- Delete Restore folders for certain applications, One of the new features in Lion is the ability of applications to resume activity at the point an application was quit. This means that when you reopen an application it will open and display all the documents you were editing in the state when you quit the application. This is obviously very useful but there are times when you may not want confidential documents automatically opened and displayed when you open an application.
- Scripting the Organic Chemistry Reference Resolver an invaluable web service that takes as input a text reference to a published article in a variety of formats and then finds and displays the corresponding publication. This applescript uses as input either text that has been copied to the clipboard or the text the user has typed into a text box, it submits the request to the web service and displays the result in the web browser.
- Scripting the Chemical Identifier resolver, The name to structure feature in ChemBioDraw is very useful but is pretty much limited to systematic names and certainly does not support other chemical identifiers like CAS Numbers. There are a number of online services that do support these sort of functions but you end up having to cut and paste from different web sites. This is where the Chemical Identifier Resolver script comes into play.
- Scripting the Chemical Identifier resolver 2, In the previous applescript we used ChemBioDraw to render a structure generated by the Chemical Identifier Resolver, I was asked if it would be possible to do the same thing for other drawing packages such as MarvinSketch? The answer is yes but because MarvinSketch does not have applescript support we have to do it slightly differently. Rather than using scripting commands we script system events to evoke the “Paste” command.
- Safari Extension Report, Generate a report of installed and enabled Safari extensions.
- Mail Chemical Structures Generate an email containing chemical structure in SMILES, CDX and PNG format
- Copy file to Dropbox and email link Copy a ChemBioDraw file to your Dropbox Public folder and email a link to it.
- Dropshadows A script to add drop shadows using ImageMagick
- SendtoMOE script Using ChemBioDraw as the 2D sketcher for MOE
- Export Notes to Evernote A service to automate export notes to Evernote
- This script is on the Chemscripts website ChemDraw and Word compound numbering on Mac In a report/thesis with hundreds of structures use this script to automatically update compound numbers.
- Searching un1Chem a script to search unichem from ChemBioDraw
- Export as Mol file a script to export the selected structure from ChemBioDraw and save it in mol file format
- generate Augmented Reality files from JMol
- Multi SMILES to Chemdraw files convert a file containing multiple SMILES strings to individual ChemDraw files.
- Update Multi SMILES to Chemdraw files convert a file containing multiple SMILES strings to individual ChemDraw files using identifier in file.
Last updated 6 July 2019