Anonymous
Document is a global object accessible in the JScript document operation.
// create a duplicate
var dup = Document.Duplicate();
// modify the duplicate, for example:
// if the document is a raster image, make the first pixel gray
dup.RasterImage.SetPixel(0, 0, 0, 0, 0xff808080);
// save the modified document into C:\temp using original name
dup.SaveCopyAs("C:\\temp\\"+Document.Name);
// the original document remains unchanged
Find out how Vista icons differ from XP icons.
See how RealWorld Icon Editor handles Vista icons.