Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use PsDotNet automation components in QM
#3
I don't quite understand the above code. Can you write a few examples?  Smile

For example: Convert the following code to QM code?  Tongue

I think this is very helpful for some friends who are designing.

____________________________________________________________

This only needs to be done once. If Photoshop is already started it will try to attach, otherwise it will start Photoshop and attach.

After initialization you can get the application by using the following code:

var app = PsConnection.Application;

Once you have the application you can do things like the following:

app.BackgroundColor = Color.Black.ToPsSolidColor();
app.ForegroundColor = Color.FromArgb(0, 0, 0, 128).ToPsSolidColor();

// Create a new document
IPsDocument document = app.Documents.Add(1024, 256, 72, "Welcome", EPsDocumentMode.psRGB);
//IPsDocument document = app.ActiveDocument;

//  Add an alpha channel
document.Channels.Add("ExtraChannel", EPsChannelType.psMaskedAreaAlphaChannel);

// Create a new layer
IPsArtLayer cloudLayer = document.ArtLayers.AddNormalLayer("Clouds");

I registered the dll file and prompted an error.   Huh


Attached Files Image(s)
   


Messages In This Thread
RE: How to use PsDotNet automation components in QM - by win - 07-10-2018, 08:01 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)