This script generates an EAN 13 barcode from an ISBN number.
Credit must go to Håkan Lundgren for the basis of the script.
This script must be run in an empty document, as all paths in the document are united during the drawing.
The EAN-13 code must be of the form XXX-X-XX-XXXXXX-X for the text to be generated correctly, though it will still work without the hyphens.
The text spacing will need to be manually adjusted if the Min. barwidth is changed from 1 pt.
I’ve set the font to be Myriad Pro Regular, but you can change this easily in the script.