applescript can control your computer programatically different types of script editing programs...not just script Editor can make real os x applications with applescript studio... can call applescript from perl using osascript applications that are scriptable have dictionaries of nouns and verbs yessss...a raw apple event core\move{ insh:insl{ kobj:obj { form:'name', want:'Mbox', seld:"appleScript", from:'null'( ) }, kpos:'end ' }, ----:obj { form:'indx', want:'cobj', seld:1, from:obj { form:'test', want:'msg ', from:obj { form:'prop', want:'prop', seld:'unBX', from:'null'( ) }, seld:cmpd{ relo:'bgwt', obj1:obj { form:'prop', want:'prop', seld:'subj', from:exmn($$) }, obj2:"applescript" } } } } OSA - open scripting architecture definition of 'script':"A scripting language is intended for use by both professional and nonprofessional programmers. To accommodate non-professional programmers, some aspects of the language may be somewhat less strict." applescript can decompile code author is smartest of all the books i've read so far apple developers are assumably fond of smalltalk wow...compares applescript to lisp! linebreaks end a statement  can continue a line variables declared by 'set' setting variables to local keeps them in the same scope in which they are declared variables default to local properties are same as variables, just different scope applescript has session long memory handlers are like functions handlers can return values handlers can be passed parameters handlers can be run before they are defined script x on myHandler( ) display dialog "Howdy" end myHandler script y myHandler( ) end script run y end script run x -- error i find that i learn best by code examples handlers can be recursive "on numbersOnly(L) if L = {} then return L if {class of item 1 of L} is in {real, integer, number} then return {item 1 of L} & numbersOnly(rest of L) else return numbersOnly(rest of L) end if end numbersOnly numbersOnly({"hey", 1, "ho", 2, 3}) -- {1, 2, 3}" there are basically no rules for setting variables to eash other can load external scripts me = current script random element accessed by 'some' "wonder of wonders, miracle of miracles" reference is like a pointer kind of " set x to 3 set y to a reference to x x = y -- false x + 0 = y + 0 -- true x is not less than y and x is not greater than y -- true " " set x to 10 set y to a reference to x set contents of y to 20 x -- 20 " if statements are called branching infinite loops are easy repeat for loops be efficient with apple events date:"set s to "2/25" set d to date s -- February 25, 2003 12:00:00 AM set d2 to date "10:30" of d -- February 25, 2003 10:30:00 AM set d3 to date "1/24" of d2 -- January 24, 2003 10:30:00 AM" coersion converts datatypes lists are arrays and records ar structs can log errors and commands with 'start log' and 'stop log' there are four letter codes for apple events "The road to AppleScript is strewn with the bodies of programmers who believed what the dictionaries told them. Be skeptical; you'll live longer." scripting additions are bits of compiled code useful for adding on to existing scripts.. "set r to display dialog "Quick! Pick a Pep Boy!" buttons {"Mannie", "Moe", "Jack"}  with icon caution giving up after 3 set favoritePepBoy to button returned of r if favoritePepBoy is "" and gave up of r then set notFastEnough to true set whoIsIt to text returned of (display dialog "What is your name?"  default answer "" buttons {"OK"} default button "OK")" "choose from list {"Mannie", "Moe", "Jack"} with prompt "Pick a Pep Boy:"" GUI scripting can be used with applications w/o dictionaries osascript is do shell script backwards