Photoshop Script for Saving Image
Suppose I want to create a photoshop script that will save the current document according to specifically-defined settings in the code itself. How might I go about doing this? For example, suppose I want this script to automatically save the current document as a .jpg file in such a way that my script can specify not only the file name, but also all of the parameters that would normally appear in the "JPEG Options" dialogue box.

I have no idea how I would access these properties within my script. Would somebody please be able to provide some sample code that would save the current document as well as link to a resource that would explain how to modify these types of parameters via the script code? Thank you.
