To start writing your own Scripts, all you need to do is drive AutoCad from the command line. A good general rule is to put a "-" in front of the commands that you usually use, for example, instead of "LAYER", type "-LAYER" and you get all the options through the command line.
Now, if you make a note of all the commands you are typing and replicate that in NotePad, or some other text only writing app., using a carriage return as "ENTER", you are writing a script! Simply save the text file as a .scr and you're away.
You can add lines of Lisp and other bits and pieces too, but get started with the "macro" style of scripts first, then later on you can throw in some more advanced stuff.
I have attached a couple of scripts for you to take a look at, the bits in brackets is Lisp, a command with an exclamation mark in front is a Lisp variable being used as a command line entry.
Code:
insunits
4
lunits
2
Code:
setvar
texteval
1
-purge
a
*
n
-purge
a
*
n
-purge
a
*
n
lfd
filedia
0
(command "saveas" "2000" "" "y")
filedia
1