[AS] Pasting into Quick Mask

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

w2ed

[AS] Pasting into Quick Mask

Post by w2ed »

have a little dilemma: My app, that I am creating in RB, is going to create the graphics and pass them into the clipboard, where the script takes over and pastes the graphic into a specific place on a page. The problem: The graphic RB is creating won't paste both the graphic and the mask at the same time - when it attempts to do this, it only sends a white rectangle the size and shape of the image, but with nothing on it.

Been working out the dilemma over the weekend, and I may have a solution: If I send the mask seperately, then paste it into the quick mask, via script, I can then have the script delete the excess afterwards. It will work for any shape, and best of all, it will allow me to send images with white or light colored backgrounds and maintain the shape. (Otherwise, I could just multiply the layer - and not get the results I am looking for.)

So the question is this: how do I call on a an alpha channel on the scripting side? Since the quick mask is technically an alpha channel utilized - as the name implies - for quickly masking areas, etc, it makes sense to create - and delete, when we're done with it - an alpha channel for doing this.

Thanks

Wayne C. Winquist

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Mike Hale

[AS] Pasting into Quick Mask

Post by Mike Hale »

Entering and exiting quickmask mode is recorded by scriptlistner. You could make a short JS script to to that which you could then call with you AS script
w2ed

[AS] Pasting into Quick Mask

Post by w2ed »

That would be a great option if I was doing this in either AppleScript Studio or 100% Javascript, but since it will be compiled into the RB App, there's no guarantee the app will call on it properly once compiled. I'd prefer sticking in AS, if at all possible. Thanks though - it may be my only option.

Wayne C. Winquist
Mike Hale

[AS] Pasting into Quick Mask

Post by Mike Hale »

Another option you could try if the JS script doesn't work in RB is making an action that goes into QM, pastes the clipboard, exits QM, then makes the layer mask.

do action might work better than do javascript in this case if JS doesn't work well with RB
w2ed

[AS] Pasting into Quick Mask

Post by w2ed »

OK, I've done work with Actions before, and I would like to avoid that - or any other external - as much as possible.

Let's break it down like this:

#1. How do you create a channel in AppleScript?

#2. How do you load a selection from a layer in AS?

#3. How do you paste onto a channel in AS?

The rest I can already do. Let's try to avoid Javascript or actions, please.

Thanks.

Wayne C. Winquist
w2ed

[AS] Pasting into Quick Mask

Post by w2ed »

Scratch #1 - had the statement right, but I had it in the wrong spot.

Scratch #3 as well - too simple.

Still need #2, though. Also need a way to get from the alpha to the component - somehow, the command I used to use in CS doesn't want to work, inspite of no direction of change in the scripting guides. Thanks again.

Wayne C. Winquist
w2ed

[AS] Pasting into Quick Mask

Post by w2ed »

Scratch 2 as well - I got done what I needed it to do.

#1, as I stated before, was the same as I had (have script on another machine, so bear with me.) I had it in a different section of the script that was designated for CS1. (Just wait until I go into testing for that! Yippie!)

#2 was diirectly from the book.

#3 was even simpler than I thought it would be. All of the demos in the scripting guides only show how to do it for a layer, not for a channel. So, you tell it to paste into the channel you want to paste into of that document, it does it.

I'll try to post code, since it was simple, next time I come on. Sorry I couldn't this time. Thanks though.

Wayne C. Winquist
Mike Hale

[AS] Pasting into Quick Mask

Post by Mike Hale »

Wayne,

You were able to make a layer mask using just AS? Would you post the code that does that?

I have been unable to convert a alpha channel to a layer mask without using the Action Manager. I can't do anything with a layer mask without using the Action Manager.

Thanks,
Mike
Guest

[AS] Pasting into Quick Mask

Post by Guest »

No layer masks. I only created the alpha channel to transfer the shape I wanted cut out of the image previously posted.

It's for work. we can't utilize Alpha Channels when we create PDF's, otherwise our plates show the Alpha mixed in. (5 channels blended down to four, which creates a big mess.) The Alpha has to be created to make the selection that cuts away from the image, then removed again. No layer masks.

In case you're wondering why we just don't export to PDF, every time I approach the subject, I get a no. Rather than fight them, let them have their way. Simpler that way.

Wayne C. Winquist.
w2ed

[AS] Pasting into Quick Mask

Post by w2ed »

Now how in the ____ did I do that? thought I was logged in. Sorry about that.

WCW