Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Photoshop is scriptable, and AFAIK gimp is as well. Photoshop has scripting references for vbscript, javascript, and apple(script?) as well as samples buried in the installed folders in PDF format. Check the docs.</p> <p>I cribbed a technique for selecting transparency from a forum post and ported it to vbscript. It creates a temporary Action which then selects the transparency of the current layer in the (passed) current application reference. The basics of opening files, saving files etc is covered in the references.</p> <p>The vbscript sample below will find photoshop, bring it to the front, and then attempt to load the transparency in the currently open document. Obvious Man says that this will fail if you haven't already opened PS and loaded a document, or if your document has no transparency applied. YMMV. </p> <pre><code>Set appRef = CreateObject("Photoshop.Application") appRef.BringToFront loadTransparency appRef function loadTransparency(appRef) dim desc dim ref dim ref1 set desc = CreateObject( "Photoshop.ActionDescriptor" ) set ref = CreateObject( "Photoshop.ActionReference" ) ref.putProperty appRef.charIDToTypeID( "Chnl" ), appRef.charIDToTypeID( "fsel" ) desc.putReference appRef.charIDToTypeID( "null" ), ref set ref1 = CreateObject( "Photoshop.ActionReference" ) ref1.putEnumerated appRef.charIDToTypeID( "Chnl" ), appRef.charIDToTypeID( "Chnl" ), appRef.charIDToTypeID( "Trsp" ) desc.putReference appRef.charIDToTypeID( "T " ), ref1 appRef.ExecuteAction appRef.charIDToTypeID( "setd" ), desc, 3 '3 = no dialogs end function </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload