------ art_55780_5660478.1162132355389
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
# help
I have been trying to get a COM connection to work from ruby to photoshop
Everything works fine until I try and save my image, I cant get the right
syntax for the SaveAs function to work. I've tried reference both the
JavaScript and VB guides for clues but cant get any thing to work
Here is what I'm using at the moment, cant find anything on the net dealing
with ruby and photoshop, so I was wondering if any one out there might have
got it working that is the SaveAs object
require 'win32ole'
cs IN32OLE.new("Photoshop.Application")
jpgopt IN32OLE.new("Photoshop.JPEGSaveOptions")
jpgopt.Quality 2
jpgopt.FormatOptions
jpgopt.Matte
jpgopt.Scans
cs.DisplayDialogs # No dialog when open the raw file.
textColor s.ForegroundColor
textColor.RGB.Red 55
textColor.RGB.Green
textColor.RGB.Blue
docRef s.Documents.Add(300, 200, 72,"My New Document");
newTextLayer ocRef.ArtLayers.Add();
newTextLayer.Kind ;
newTextLayer.TextItem.Contents Hello, World!";
newTextLayer.TextItem.Position 100, 100];
newTextLayer.TextItem.Size 6;
newTextLayer.TextItem.Color extColor;
saveme ctiveDocument
saveme.SaveAs('C:/cells2.jpg', jpgopt, true, Extension.LOWERCASE);
docRef.Close(2)
help
------ art_55780_5660478.1162132355389--