// Copyright 2002 Matt Sandstršm/Too Much Too Soon // This script is freeware, meaning you may copy and // distribute it free of charge, as long as it's kept intact, // including this message. Feel free to use the code as // inspiration for your own scripts, but don't steal. // Email me at mattias@beauty.se if you have any questions. // Thank you. Have fun. generator "Typewriter", 120 group "Too Much Too Soon" AlphaType(kblack) input nl, "# of letters", slider, 1, 1, 100; input thetext, "Text", Text, "typewriter" textheight 4; input fontname, "Font", FontList, "", "thetext"; input fontsize, "Size", slider, 22, 8, 100 detent 22; input center, "Origin", point, 0, 0.3; input fontcolor, "Font Color", color, 255, 255, 255, 255; code float a, d, w, h; point centeroftw, framesize, twbox[4]; string ot; resetText; fontcolor.a = 255; dimensionsof(dest, framesize.x, framesize.y); fontsize /= 320/framesize.x; setTextFont(fontname); setTextSize(fontsize); setTextjustify(kleftjustify); charsof(thetext,0,Integer(nl),ot) centeroftw = framesize; centeroftw *= center; measurestringplain(ot, w, h, a, d, aspectof(dest)); makerect(twbox, centeroftw.x, centeroftw.y, w, a); drawstringplain(ot, twbox, dest, fontcolor, aspectof(dest));