Changing display resolutions

I’m a complete newbie to AS and I need a very simple script to change my display’s resolution, setting it, say to 1024 X 768.

Two questions:

  1. Can anyone on the forum oblige me with a few line of script?
  2. Where can I look up the basics on syntax, scripting System Preferences and Apple Events?