Read the various MDX Tutorials
For scripting help goto this site. There is also a tutorial about dialogs.