if(not uses.contain("ps = Photoshop")) sys.add_use('ps = Photoshop') blk_init.println('if (Type.GetTypeFromProgID("Photoshop.Application", null, false) == null) {').inc() .println('MessageBox.Show("Adobe Photoshop is not installed", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);') .println('Environment.Exit(1);') .dec().println('}') // adds assembly if(this.props("VersionCS").value == '5.0') sys.add_assembly('Interop.Photoshop', 'Interop.Photoshop.dll', 'assembly\\AdobeCS5.0\\') elseif(this.props("VersionCS").value == '5.5') sys.add_assembly('Interop.Photoshop', 'Interop.Photoshop.dll', 'assembly\\AdobeCS5.5\\') elseif(this.props("VersionCS").value == '6.0') sys.add_assembly('Interop.Photoshop', 'Interop.Photoshop.dll', 'assembly\\AdobeCS6.0\\') end end