func init // checks installation Adobe Photoshop and adds references include("AdobePhotoshop") // initialize instance sys.add_object(this.codename, 'ps.GIFSaveOptions') // initialize properties sys.set_field('Colors') blk_init.println(this.codename, '.Dither = ', sys.get_typed_field('ps.PsDitherType.psNoDither', 'Dither', 14, 'ps.PsDitherType'), ';') if(this.props("Dither").value == 'psDiffusion') sys.set_field('DitherAmount') blk_init.println(this.codename, '.PreserveExactColors = ', sys.get_typed_field('false', 'PreserveExactColors', 104), ';') end blk_init.println(this.codename, '.Forced = ', sys.get_typed_field('ps.PsForcedColors.psNoForced', 'Forced', 14, 'ps.PsForcedColors'), ';') sys.set_typed_field(104, 'Interlaced') sys.set_typed_field(14, 'Matte', '', 'ps.PsMatteType') sys.set_typed_field(14, 'Palette', '', 'ps.PsPaletteType') sys.set_typed_field(104, 'Transparency') // make methods for properties sys._prop_init('Colors', 0, 1, 1) sys._prop_init('Dither', 0, 1, 0) sys._prop_init('DitherAmount', 0, 1, 1) sys._prop_init('Forced', 0, 1, 0) sys._prop_init('Interlaced', 0, 1, 104) sys._prop_init('Matte', 0, 1, 0) sys._prop_init('Palette', 0, 1, 0) sys._prop_init('PreserveExactColors', 0, 1, 104) sys._prop_init('Transparency', 0, 1, 104) end func SaveOptions return(this.codename) end