Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is the script that will do the job. Most of it was written using the <a href="http://blogs.adobe.com/crawlspace/2006/05/installing_and_1.html" rel="nofollow">script listener</a> And yup, the script listener code looks horrible, but after a while you can put snipets of the script listener code and turn them into functions. Which is what I've done. You didn't specify how big the image was so this script works on one that is 100 pixels by 100 pixels and will flip the selected layer. The magic numbers which specify the co-ordinates are used tin the select this line of code. Change that for your own needs.</p> <p>If you are interested in learning how to code for photoshop then I suggest you use (and learn) javaScript. Oh and have a look at the script listener. Have fun.</p> <pre><code>//Set the preference to be pixels app.preferences.rulerUnits = Units.PIXELS; // Call the source document var srcDoc = app.activeDocument; // make sure we don't have anything selected first srcDoc.selection.deselect() // call the two selected areas selectThis(33, 0, 33, 67, 33, 67, 100, 67); // flip the selection horizontally flipEm() // function SELECT THIS(top, left, right, bottom) // -------------------------------------------------------- function selectThis(top1, left1, right1, bottom1, top2, left2, right2, bottom2) { // ======================================================= var id8699 = charIDToTypeID( "setd" ); var desc1781 = new ActionDescriptor(); var id8700 = charIDToTypeID( "null" ); var ref1346 = new ActionReference(); var id8701 = charIDToTypeID( "Chnl" ); var id8702 = charIDToTypeID( "fsel" ); ref1346.putProperty( id8701, id8702 ); desc1781.putReference( id8700, ref1346 ); var id8703 = charIDToTypeID( "T " ); var desc1782 = new ActionDescriptor(); var id8704 = charIDToTypeID( "Top " ); var id8705 = charIDToTypeID( "#Pxl" ); desc1782.putUnitDouble( id8704, id8705, top1 ); var id8706 = charIDToTypeID( "Left" ); var id8707 = charIDToTypeID( "#Pxl" ); desc1782.putUnitDouble( id8706, id8707, left1 ); var id8708 = charIDToTypeID( "Btom" ); var id8709 = charIDToTypeID( "#Pxl" ); desc1782.putUnitDouble( id8708, id8709, bottom1 ); var id8710 = charIDToTypeID( "Rght" ); var id8711 = charIDToTypeID( "#Pxl" ); desc1782.putUnitDouble( id8710, id8711, right1 ); var id8712 = charIDToTypeID( "Rctn" ); desc1781.putObject( id8703, id8712, desc1782 ); executeAction( id8699, desc1781, DialogModes.NO ); // ======================================================= var id8779 = charIDToTypeID( "AddT" ); var desc1795 = new ActionDescriptor(); var id8780 = charIDToTypeID( "null" ); var ref1356 = new ActionReference(); var id8781 = charIDToTypeID( "Chnl" ); var id8782 = charIDToTypeID( "fsel" ); ref1356.putProperty( id8781, id8782 ); desc1795.putReference( id8780, ref1356 ); var id8783 = charIDToTypeID( "T " ); var desc1796 = new ActionDescriptor(); var id8784 = charIDToTypeID( "Top " ); var id8785 = charIDToTypeID( "#Pxl" ); desc1796.putUnitDouble( id8784, id8785, top2 ); var id8786 = charIDToTypeID( "Left" ); var id8787 = charIDToTypeID( "#Pxl" ); desc1796.putUnitDouble( id8786, id8787, left2 ); var id8788 = charIDToTypeID( "Btom" ); var id8789 = charIDToTypeID( "#Pxl" ); desc1796.putUnitDouble( id8788, id8789, bottom2 ); var id8790 = charIDToTypeID( "Rght" ); var id8791 = charIDToTypeID( "#Pxl" ); desc1796.putUnitDouble( id8790, id8791, right2 ); var id8792 = charIDToTypeID( "Rctn" ); desc1795.putObject( id8783, id8792, desc1796 ); executeAction( id8779, desc1795, DialogModes.NO ); } function flipEm() { //flip horixontal // ======================================================= var id8811 = charIDToTypeID( "Flip" ); var desc1800 = new ActionDescriptor(); var id8812 = charIDToTypeID( "null" ); var ref1359 = new ActionReference(); var id8813 = charIDToTypeID( "Lyr " ); var id8814 = charIDToTypeID( "Ordn" ); var id8815 = charIDToTypeID( "Trgt" ); ref1359.putEnumerated( id8813, id8814, id8815 ); desc1800.putReference( id8812, ref1359 ); var id8816 = charIDToTypeID( "Axis" ); var id8817 = charIDToTypeID( "Ornt" ); var id8818 = charIDToTypeID( "Hrzn" ); desc1800.putEnumerated( id8816, id8817, id8818 ); executeAction( id8811, desc1800, DialogModes.NO ); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

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