how to parse a string

I need to return different parts of a text string based on position in the string

for example I want to return the 3 characters in a string 12 characters long
from position 3 thru 5.

I did it years ago with basic…

any help very appreciated!

set theString to "ABCDEFGHIJKL"
set myChars to (characters 3 thru 5 of theString) as string --> returns "CDE"

j

Although it is now aging rapidly, the AppleScript Language Guide is still an excellent source on the basics of using AppleScript:

http://developer.apple.com/techpubs/macosx/Carbon/interapplicationcomm/AppleScript/AppleScriptLangGuide/index.html

Bill Cheeseman’s interests in AppleScript are also aging, but his website’s tips and scripts are still well worth the read:

http://www.AppleScriptSourceBook.com

MacScripter also has a faq:

http://macscripter.net/faq/

as does the newsgroup alt.comp.lang.applescript:

http://homepage.mac.com/dlivesay/aclafaq.html

you guys know the stuff you just can’t find in books

namely orielly’s “definitive” guide

thanks!