Script patterns and fills

I need to crop images unto another background. Does photoshop elements 12 have the script patterns and fills.  If not, will I be able to use any other backgrounds from another application, i.e, powerpoint or web images?

From the version number you gave, I'm guess you have Photoshop CC 2014. The full version is 2014.2.2
The Scripted Patterns are under Filter menu > Render
If you are still using Photoshop CC  (14.2.1) then here's where you would access the scripted patterns under Edit > Fill

Similar Messages

  • I am using Photoshop CC2014 15.00.  In the pop-up menu for the Fill command there is a place for Scripted patterns.  Within that part, the tree and the picture frame are grayed. Why?   I've seen demonstrations on how to use the feature but mine doesn't wo

    I am using Photoshop CC2014 15.00.  In the pop-up menu for the Fill command there is a place for Scripted patterns.  Within that part, the tree and the picture frame are grayed.
    Why?   I've seen demonstrations on how to use the feature but mine doesn't work.  I checked the updates and I have the current version.
    Thanks.      LM

    I am running CC 2014.2.1 and I've updated to Yosemite. Not seeing tree or frame as an option in the menu. Coworker still on Mavericks has it.

  • PS CS6 Scripted Pattern Fill Problem

    Hi,
    Has any one seen this before?
    When i do a normal Fill with Pattern the pattern is the right colour, image (1)
    But if i select Scripted Patterns Image (2) it always comes out with random colours.

    There is also a scripted UI for these scripts http://uebelephoto.com/CS6_Fill.html
    Scripted Fill UI v 1.2 for Photoshop CS6
    This script creates a User Interface for changing the variables in Photoshop CS6's new scripted fills, so the average user does not have to edit Photoshop's fill scripts. There is a readme file included with the zip download that describes the script in more detail and how to use it. This script is free and can be modified for your own use, but it can not be modified for resale.
    This script is a work in progress and there are some bugs with it, which I will attempt to fix as time permits.
    Updated 5/1/2012
    I do not use it nor do I understand its UI

  • Why do I keep getting Error 519: Server interface error" - Server interface error "no component returned from creativewidget' Line: 479 - var test = parent.add('statictext', undefined, text)  when I try to use pattern fill/scripted patterns.  I have unin

    Why do I keep getting Error 519: Server interface error" - Server interface error "no component returned from creativewidget' Line: 479 -> var test = parent.add('statictext', undefined, text)  when I try to use pattern fill/scripted patterns.  I have uninstalled and re-installed PS CC.  I have opened holding down shift to disable third party plug-ins.  I have moved 3rd party plugins to a temp location outside of ps and it still doesn't help.  It worked once, and only once and now won't work at all.

    Unless your Photoshop question has to do with a download/install error, you should ask in Photoshop General Discussion
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Unable to find scripted patterns in edit fill patterns (trees, e.g.)

    Unable to find scripted patterns in edit>fill>patterns (trees, e.g.) as demo'd in Adobe tutorial. Using PS CC 2014 (latest) and Yosemite. My dialog box doesn't match that shown. Any help? Thanks.

    You posted this in the Lightroom forum.  You're more likely to get help if you repost in the Photoshop forum.

  • Photoshop "Fill" Dialog Box is missing "Scripted Pattern" option..

    Photoshop "Fill" Dialog Box (using the most current Creative Cloud) is missing "Scripted Pattern" option which is supposed to be at the very bottom.  Instead, in the middle of the box I have the option to check the word "Script" which brings up only six fill patterns (such as Brick, Sprial, etc).  In the tutorials I see that by using Scripted Patterns (the tree option for one) brings up many, many choices.

    Big changes made in Fill between CC and CC 2014.  CC Fill dialog on top CC2014 Fill dialog bottom. Picture Frame and Tree moved from Fill to Render Filter and new Flame pattern added into render filter grouped with Picture Frame and Tree.

  • The Scripted Pattern Fill for "Tree" is missing - the others are there.  What happened?  Please help.

    When I go to Edit > Fill and choose "Pattern".  I check the "Script: box and click the drop-down arrow.  The following display:  Brick Fill / Cross Weave / Place Along Path / Random Fill / Spiral /
    Symmetry Fill ------ but NOT Tree.
    What is wrong?  I've reset everything - still no Tree.
    Please help.
    Thank you

    Silkrooster - you did the job !   Thank you so very much.
    Of course, this brings me to another question if you don't mind answering.  Is there some place I can look when updates come up in Cloud for me to "update" that I can read about each change?  I see this sort of situation happens often for me and I would like to be able to try to find answers on my own instead of asking each time.  (This way, I'd help myself learn the program too.)  I know you have an online manual - but the content is not alphabetized which makes it very time-consuming to sift through. 
    I am seriously deficient in "tech" type stuff and a simple, alphabetized content somewhere would be so very much help.  Maybe you have it and I just don't know where to look.
    Thanks again for telling me about the Tree pattern being moved.  YEAH !!

  • Script to click on Stroke and Fill and Swap and Default and ...

    Hey gang,
    I have been playing with configurator 3.1.1 where you can make a button on a toolbar and supply it with a script. I am trying to make a custom toolbar for InDesign CS6. It already includes buttons for all the tools, except for (I am shocked to note) Stroke, Fill, Swap, Default, Apply Color, Apply Gradient, Apply None, and possibly Formatting Affects Container and Formatting Affects Type. I don't know how to command these missing 7-9 parts of the toolbox panel.
    My workaround? Use the Configurator Script button, and supply the button with scripting that calls the functional button command. In reading and researching, I found one command: StrokeFillProxyOptions.FILL which presses the Fill Proxy button.
    Alas, I don't have the complete picture. That expression alone does not make the whole clickable script button work. Can you help me write the whole line of script code that would make the button click?
    Best to you,
    Mike Witherell in Maryland

    Hi Michael
    app.selection[0].textFramePreferences.verticalJustification = VerticalJustification.JUSTIFY_ALIGN;
    Is going to work provided you have the text frame selected. If it's not you'll get an ugly error message.
    You can avoid this by
    if (app.documents.length && app.selection.length && app.selection [ 0 ].constructor.name == "TextFrame")
        app.selection[0].textFramePreferences.verticalJustification = VerticalJustification.JUSTIFY_ALIGN;
    if (app.documents.length && app.selection.length && app.selection [ 0 ].hasOwnProperty ( 'baseline' ))
        app.selection[0].parentTextFrames[0].textFramePreferences.verticalJustification = VerticalJustification.JUSTIFY_ALIGN;
    This will work if the frame is selected (first if statement) or if text if selected or if the cursor is by text (second if statement and do nothing (without giving error messages) if the is no selection or document open etc.
    Good Luck
    Trevor

  • Wierd pixelated output from scripted pattern fill

    Hey guys,
    so I've got a problem with Photoshop CC 2014 on Mac OSX 10.9.4  - everytime I try to use the scripted pattern fill I get this really wierd pixelated output from it, rather than a pattern.  This happens whether I'm using the new tree generator, or just a regular scripted pattern - like the random fill.   I've included a screengrab here of what it looks like.  It doesn't matter what settings I use for the fill, but everytime I use it I get this.  It's really wierd, not to mention slowing me down on a couple of jobs I've got on too >_<
    Any ideas?  Has anyone come across anything like this before?
    Thanks in advance!

    I'm not seeing that on Windows

  • Scripted pattern fill broken in last 2014 update?

    Is there something wrong with my last october 2014 update? The scripted scripted pattern fill no longer works as it should...
    Win 7 64 Pro.

    1. It has less items than in earlier version eg no trees
    2. It fills the subject with the "standard" fills not the chosen scripted fill. For instance if I choose bricks I get the bubbles with more or less faint outlines of what could be vaguely recognised as bricks.   

  • Where are the scripted patterns!!!!!!!

    i have the latest version of Photoshop cc. For some reason i cant find the scripted patterns option. I press fill and it is not inside the fill box. PLEASE HELP!!

    Filter menu > Render...
    Gene

  • Pattern and Matching question

    Hey,
    I'm trying to use the pattern and matcher to replace all instances of a website
    address in some html documents as I process them and post them. I'm
    including a sample of some of the HTML below and the code I"m using to
    process it. For some reason it doesn't replace the sites in the underlying
    images and i can't figure out what I'm doing wrong. Please forgive all the
    unused variables, those are relics of another way i may have to do this if i
    can't get the pattern thing to work.
    Josh
         public static void setParameters(File fileName)
              FileReader theReader = null;
              try
                   System.out.println("beginning setparameters guide2)");
                   File fileForProcessing=new File(fileName.getAbsolutePath());
                   //wrap the file in a filereader and buffered reader for maximum processing
                   theReader=new FileReader(fileForProcessing);
                   BufferedReader bufferedReader=new BufferedReader(theReader);
                   //fill in data into the tempquestion variable to be populated
                   //Set the question and answer texts back to default
                   questionText="";
                   answerText="";
                   //Define the question variable as a Stringbuffer so new data can be appended to it
                   StringBuffer endQuestion=new StringBuffer();//Stringbuffer to store all the lines
                   String tempQuestion="";
                   //Define new file with the absolutepath and the filename for use in parsing out question/answer data
                   tempQuestion=bufferedReader.readLine();//reads the nextline of the question
                   String tempAlteredQuestion="";//for temporary alteration of the nextline
                   //while there are more lines append the stringbuffer with the new data to complete the question buffer
                   StringTokenizer tokenizer=new StringTokenizer(tempQuestion, " ");//tokenizer for reading individual words
                   StringBuffer temporaryLine; //reinstantiate temporary line holder each iterration
                   String newToken;   //newToken gets the very next token every iterration?  changed to tokenizer moretokens loop
                   String newTokenTemp;   //reset newTokenTemp to null each iterration
                   String theEndOfIt;  //string to hold everything after .com
                   char[] characters;  //character array to hold the characters that are used to hold the entire link
                   char lastCharChecked;
                   Pattern thePattern=Pattern.compile("src=\"https:////fakesite.com//ics", Pattern.LITERAL);
                   Matcher theMatcher=thePattern.matcher(tempQuestion);
                        while(tempQuestion!=null) //every time the tempquestion reads a newline, make sure you aren't at the end
                             String theReplacedString=theMatcher.replaceAll("https:////fakesite.com//UserGuide/");     
                             //          temporaryLine=new StringBuffer();
                             //add the temporary line after processed back into the end question.
                             endQuestion.append(theReplacedString);                              //temporaryLine.toString());
                             //reset the tempquestion to the newline that is going to be read
                             tempQuestion=bufferedReader.readLine();
                             if(tempQuestion!=null)
                                  theMatcher.reset(tempQuestion);
                             /*newTokenTemp=null;
                             while(tokenizer.hasMoreTokens())
                                  newToken=tokenizer.nextToken(); //get the next token from the line for processing
                                  System.out.println("uhhhhhh");
                                  if(newToken.length()>36)  //if the token is long enough chop it off to compare
                                       newTokenTemp=newToken.substring(0, 36);
                                  if(newTokenTemp.equals("src=\"https://fakesite.com"));//compare against the known image source
                                       theEndOfIt=new String();  //intialize theEndOfIt
                                       characters=new char[newToken.length()];  //set the arraylength to the length of the initial token
                                       characters=newToken.toCharArray();  //point the character array to the actual characters for newToken
                                       lastCharChecked='a';  // the last character that was compared
                                       int x=0; //setup the iterration variable and go from the length of the whole token back till you find the first /
                                       for(x=newToken.length()-1;x>0&&lastCharChecked!='/';x--)
                                            System.out.println(newToken);
                                            //set last char checked to the lsat iterration run
                                            lastCharChecked=characters[x];
                                            //set the end of it to the last char checked and the rest of the chars checked combined
                                            theEndOfIt=Character.toString(lastCharChecked)+theEndOfIt;
                                       //reset the initial newToken value to the cut temporary newToken root + userguide addin, + the end
                                       newToken=newTokenTemp+"//Userguide"+theEndOfIt;
                                  //add in the space aftr the token to the temporary line and the new token, this is where it should be parsed back together
                                  temporaryLine.append(newToken+" ");
                             //add the temporary line after processed back into the end question.
                             endQuestion.append(temporaryLine.toString());
                             //reset the tempquestion to the newline that is going to be read
                             tempQuestion=bufferedReader.readLine();
                             //reset tokenizer to the new temporary question
                             if(tempQuestion!=null)
                             tokenizer=new StringTokenizer(tempQuestion);
                   //Set the answer to the stringbuffer after converting to string
                   answerText=endQuestion.toString();
                   //code to take the filename and replace _ with a space and put that in the question text
                   char theSpace=' ';
                   char theUnderline='_';
                   questionText=(fileName.getName()).replace(theUnderline, theSpace);
              catch(FileNotFoundException exception)
                   if(logger.isLoggable(Level.WARNING))
                   logger.log(Level.WARNING,"The File was Not Found\n"+exception.getMessage()+"\n"+exception.getStackTrace(),exception);
              catch(IOException exception)
                   if(logger.isLoggable(Level.SEVERE))
                   logger.log(Level.SEVERE,exception.getMessage()+"\n"+exception.getStackTrace(),exception);
              finally
                   try
                        if(theReader!=null)
                             theReader.close();
                   catch(Exception e)
    <SCRIPT language=JavaScript1.2 type=text/javascript><!-- if( typeof( kadovInitEffects ) != 'function' ) kadovInitEffects = new Function();if( typeof( kadovInitTrigger ) != 'function' ) kadovInitTrigger = new Function();if( typeof( kadovFilePopupInit ) != 'function' ) kadovFilePopupInit = new Function();if( typeof( kadovTextPopupInit ) != 'function' ) kadovTextPopupInit = new Function(); //--></SCRIPT>
    <H1><IMG class=img_whs1 height=63 src="https://fakesite.com/ics/header4.jpg" width=816 border=0 x-maintain-ratio="TRUE"></H1>
    <H1>Associate Existing Customers</H1>
    <P>blahalbalhblabhlab blabhalha blabahbablablabhlablhalhab.<SPAN style="FONT-WEIGHT: bold"><B><IMG class=img_whs2 height=18 alt="Submit a

    If you use just / it misinterprets it and it ruins
    your " " tags for a string. I don't think so. '/' is not a special character for Java regex, nor for Java String.
    The reason i used
    literal is to try to force it to directly match,
    originally i thought that was the reason it wasn't
    working.That will be no problem because it enforces '.' to be treated as a dot, not as a regex 'any character'.
    Message was edited by:
    hiwa

  • Additional scripted patterns

    Hi all,
    I am the developer of the Deco scripting engine that is used to create scripted patterns in Photoshop CS6. I would like to continue the interesting discussions and exchange of patterns and images that many of you started on the pre-release forum.
    If you go to the following page (link) you can get a brief overview of how to add new scripted patterns to Photoshop CS6.  Check out a few Deco scripts that create boundary patterns. The size of the boundary depends on the width
    of the input pattern – you want a wider boundary, create a wider pattern.
    Feel free to ask me any questions related to pattern scripting.
    Enjoy,
    Radomir

    Hi David, ok, running directly from the scripts this is the error I get;
    Error 2 : RenderAPI is undefined.
    Line 17
    ->var pattern = RenderAPI.getParameter(kps pattern);  //get pattern
    information.
    The other path script I have that works is ' specify varying sizes along path '... author unknown but Paul something rings a bell...here is that script;
    //Script Copyright 2012 by Richard Y. Kain. I am indebted to others who made predecessor
    //scripts that did not have varying copy sizes and varying copy spacing, which I added by
    //rewriting portions and resturcturing the information transferred among the two scripts.
    //This script for Photoshop CS6 displays the dialog window and eventually calls deco fill to
    //execute the script mentioned below.
    //The major feture is that the sizes of the pattern can vary progressively along the path, and
    //the spacing of the copies can be specified. This script invokes the script "Varying Path and Spacing"
    //that is called from the fill dialog to actually render the pattern copies.
    //The scripts should be located in the directory \presets\deco in the CS6 program files context.
    //This script should be invoked from Photoshop through the File>Scripts path
    #target photoshop
    app.bringToFront();
    main();
    function main(){
    var updated=false;
    if(!documents.length) return;
    //The following code (by someone else) constructs an alphabetic list of the patterns known to the fill dialog.
    var file = File(Folder.temp +"/deco.pat");
    if(file.exists) file.remove();
    savePatterns( file );
      file.open("r");
      file.encoding = 'BINARY';
      var str = file.read();
      file.close();
      var patterns=[];
      var rex = /(\x00\w|\x00\d)(\x00\-|\x00\w|\x00\s|\x00\d)\x00\x00\$[-a-z\d]/g;
      while ((result = rex.exec(str)) != null) {
       var sp = result[0].toString().replace(/\x00/g, '').split('$');
       var X = readInt16(str,(result.index(result[0].length)22));
       var Y = readInt16(str,(result.index(result[0].length)18));
        patterns.push([[sp[0]],[sp[1]],[X],[Y]]);     
    patterns=ReturnUniqueSortedList(patterns);
    file.remove();
    //The following code (by someone else, slightly modified by me) displays the dialog about the path fill
    var win = new Window( 'dialog', 'Path Fill' );
    g = win.graphics;
    var myBrush = g.newBrush(g.BrushType.SOLID_COLOR, );
    g.backgroundColor = myBrush;
    win.p1= win.add("panel", undefined, undefined, );
    win.g1 = win.p1.add('group');
    win.g1.orientation = "row";
    win.title = win.g1.add('statictext',undefined,'Path Fill');
    win.title.alignment="fill";
    var g = win.title.graphics;
    g.font = ScriptUI.newFont("Georgia","BOLDITALIC",22);
    win.g5 =win.p1.add('group');
    win.g5.orientation = "row";
    win.g5.alignment='fill';
    win.g5.spacing=10;
    win.g5.st1 = win.g5.add('statictext',undefined,'Spacing of pattern copies (as a percentage of its width): ');
    win.g5.st1.preferredSize=[340,20];
    win.g5.et1 = win.g5.add('edittext',undefined,'50');
    win.g5.et1.preferredSize=[50,20];
    win.g5.et1.onChanging = function() {
      if (this.text.match(/[^\-\.\d]/)) {
        this.text = this.text.replace(/[^\-\.\d]/g, '');
    win.g8 =win.p1.add('group');
    win.g8.orientation = "row";
    win.g8.alignment='fill';
    win.g8.spacing=10;
    win.g8.st1 = win.g8.add('statictext',undefined,'Final pattern size (as a percentage): ');
    win.g8.st1.preferredSize=[340,20];
    win.g8.et1 = win.g8.add('edittext',undefined,'10');
    win.g8.et1.preferredSize=[50,20];
    win.g8.et1.onChanging = function() {
      if (this.text.match(/[^\-\.\d]/)) {
        this.text = this.text.replace(/[^\-\.\d]/g, '');
    win.g10 =win.p1.add('group');
    win.g10.orientation = "row";
    win.g10.alignment='fill';
    win.g10.st1 = win.g10.add('statictext',undefined,'Please select Pattern:');
    win.g10.st1.preferredSize=[340,20];
    win.g10.dd1 = win.g10.add('dropdownlist');
    for(var p in patterns){win.g10.dd1.add('item',patterns[p][0]);}
    win.g10.dd1.selection=0;
    win.g10.dd1.onChange = function(){
    var str = patterns[win.g10.dd1.selection.index][0].toString() + " ( X = " ;
    str += Number(patterns[win.g10.dd1.selection.index][2]) + " Y = ";
    str += Number(patterns[win.g10.dd1.selection.index][3]) + ")";
    //win.g10.dd1.helpTip = str;
    win.g10.dd1.onChange();
    win.g15 =win.p1.add('group');
    win.g15.orientation = "row";
    win.g15.alignment='fill';
    var Blend = ['Normal','Dissolve','-','Darken','Multiply','Color Burn','Linear Burn','Darker Color','-','Lighten','Screen','Color Dodge',
        'Linear Dodge (Add)','Lighter Color','-','Overlay','Soft Light','Hard Light','Vivid Light','Linear Light', 'Pin Light','Hard Mix','-','Difference', 'Exclusion',
        'Subtract','Divide','-','Hue','Saturation','Color','Luminosity'];
    var bMode=['Nrml','Dslv','-','Drkn','Mltp','CBrn','linearBurn','darkerColor','-','Lghn', 'Scrn',
    'CDdg','linearDodge','lighterColor','-','Ovrl','SftL','HrdL','vividLight','linearLight','p inLight','hardMix','-',
    'Dfrn','Xclu','blendSubtraction','blendDivide','-','H   ','Strt','Clr ','Lmns'];
    win.g15.st1 = win.g15.add('statictext',undefined,'Blend Mode:');
    win.g15.st1.preferredSize=[340,20];
    win.g15.dd1 = win.g15.add('dropdownlist',undefined,Blend);
    win.g15.dd1.selection=0;
    win.g20 =win.p1.add('group');
    win.g20.orientation = "row";
    win.g20.alignment='fill';
    win.g20.st1 = win.g20.add('statictext',undefined,'Opacity:');
    win.g20.st1.preferredSize=[340,20];
    win.g20.et1 = win.g20.add('edittext',undefined,'100');
    win.g20.et1.preferredSize=[50,20];
    win.g20.et1.onChanging = function() {
      if (this.text.match(/[^\-\.\d]/)) {
        this.text = this.text.replace(/[^\-\.\d]/g, '');
    var pictureFlag = true          //flag about whether you choose to select patterns by name or by picture
    win.g100 =win.p1.add('group');
    win.g100.orientation = "row";
    win.g100.alignment='center';
    win.g100.bu1 = win.g100.add('button',undefined,'Paint pattern copies');
    win.g100.bu1.preferredSize=[150,30];
    win.g100.bu3 = win.g100.add('button',undefined,'See pattern pictures');
    win.g100.bu3.preferredSize=[150,30];
    win.g100.bu2 = win.g100.add('button',undefined,'Close');
    win.g100.bu2.onClick=function(){
        win.close(0);
    win.g100.bu2.preferredSize=[150,30];
    //Control goes here if the pattern was chosen by name and the button to do it was clicked
    win.g100.bu1.onClick=function(){
    if(win.g5.et1.text == ''){
        alert("Your spacing cannot be blank");
        return;
    if(isNaN(Number(win.g5.et1.text) )){
        alert("Your entry for the spacing is not a number");
        return;
    if (Number(win.g5.et1.text)<10){
        alert("Your spacing must be at least 10%");
        return;
    if(win.g8.et1.text == ''){
        alert("Your final size specification cannot be blank");
        return;
    if(isNaN(Number(win.g8.et1.text) )){
        alert("Your entry for the final size is not a number");
        return;
    win.close(0);
    pictureFlag = false;
    if (updated==true){
    var idslct = charIDToTypeID( "slct" );
        var desc4 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref4 = new ActionReference();
            var idHstS = charIDToTypeID( "HstS" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idPrvs = charIDToTypeID( "Prvs" );
            ref4.putEnumerated( idHstS, idOrdn, idPrvs );
        desc4.putReference( idnull, ref4 );
    executeAction( idslct, desc4, DialogModes.NO );
    updated=true;
    doit(pictureFlag);
    app.refresh()
    }       //end finction for using the patterns by name
    //The followong code is invokied if the user wishes to see the patterns in the fil dialog box before tracing the path
    win.g100.bu3.onClick=function(){
     if(win.g5.et1.text == ''){
        alert("Your spacing cannot be blank");
        return;
    if(isNaN(Number(win.g5.et1.text) )){
        alert("Your entry for the spacing is not a number");
        return;
    if(win.g8.et1.text == ''){
        alert("Your final size specification cannot be blank");
        return;
    if(isNaN(Number(win.g8.et1.text) )){
        alert("Your entry for the final size is not a number");
        return;
    pictureFlag = true;
    win.close(0);
    doit(pictureFlag);
    }       //end finction for using the patterns by pictures - through the fill dialog box
    //This function traces the path and creates a listing of points along the path
    function doit(useFillBoxFlag) {
    // Save the current preferences
    var startRulerUnits = app.preferences.rulerUnits;
    var startTypeUnits = app.preferences.typeUnits;
    var startDisplayDialogs = app.displayDialogs;
    // Set Adobe Photoshop CS6 to use pixels and display no dialogs
    app.preferences.rulerUnits = Units.PIXELS;
    app.preferences.typeUnits = TypeUnits.PIXELS;
    //app.displayDialogs = DialogModes.NO;
    var activePath=activePathIndex()
    if (activePath=-1)activePath=0;
    myPath=activeDocument.pathItems[activePathIndex()].subPathItems[0]; //I'm just calculating the first subpath of the active path
    var scriptEndSize = Number(win.g8.et1.text);   //FInal pattern size ad a percentage
    var spacing =Number(win.g5.et1.text)
    //*Number(patterns[win.g10.dd1.selection.index][2])/100;    // Initial Spacing of points in pixels
    spacedPoints= new Array;    //The position of each of the equally spaced points
    rotations = new Array;       //The rotation of each of the equally spaced points
    copysizes = new Array;      //The sizes of the copies to be places at the points along the path
    //accuracy of calculation... how many straight line segments each curved segment is split into.
    //Note that the granularity is set so that there are about 800 points along the total path, which
    //prevents the arrays that are put into the global environment from overflowing.
    var granularity = Math.floor(800/myPath.pathPoints.length);
    var results = new Array; //points of the straight line segment.... these aren't evenly spaced.
    var pointCount=myPath.pathPoints.length-1;
    //Approximate Path by dividing into straight line segments
    var d = myPath.pathPoints[0].anchor;
    for(var i = 0; i< pointCount; i++)
        var a = d
        var b = myPath.pathPoints[i].leftDirection;
        var c = myPath.pathPoints[i+1].rightDirection;
        var d = myPath.pathPoints[i+1].anchor;  
        for (var j =0; j < granularity; j++)
            var t = j/granularity;
            results[i*granularity + j] = bezier (a, b, c, d, t);
    // Calculate the last path segment if the path is closed.... same code as above
    if(myPath.closed==true){
        var a = myPath.pathPoints[pointCount].anchor
        var b = myPath.pathPoints[pointCount].leftDirection;
        var c = myPath.pathPoints[0].rightDirection;
        var d = myPath.pathPoints[0].anchor;  
        for (var j =0; j < granularity; j++)
            var t = j/granularity;
            results[pointCount*granularity + j] = bezier (a, b, c, d, t);
    //Calculate the length of the curve up to each point
    var segmentLength= new Array;
    segmentLength[0]=0;
    var totalLength=segmentLength[0];
    for(var i = 0; i < results.length-1; i++)
        segmentLength[i1]= segmentLength[i]Math.sqrt(Math.pow(results[i][0]-results[i+1][0],2) + Math.pow(results[i][1]-results[i+1][1],2));
    //set temp vars in memory
    $.setenv("DECOpoints","var points = ["results.toString()"];");
    $.setenv("DECOendsize","var endsize = "scriptEndSize";");
    $.setenv("DECOlengths","var lengths = ["segmentLength.toString()"];");
    $.setenv("DECOspacing","var spacing = "spacing";");
    $.setenv("DECOpathclosed","var pathclosed = "myPath.closed";");
    // Reset the application preferences
    app.preferences.rulerUnits = startRulerUnits;
    app.preferences.typeUnits = startTypeUnits;
    app.displayDialogs = startDisplayDialogs;
    //call fill menu
    var Name = patterns[win.g10.dd1.selection.index][0];
    var PatID = patterns[win.g10.dd1.selection.index][1];
    var BMODE = bMode[win.g15.dd1.selection.index];
    var Opacity = Number(win.g20.et1.text);
    if(Opacity > 100) Opacity = 100;
    if(Opacity < 0) Opacity = 0;
    try{
    decoFill(Name,PatID,BMODE,Opacity,useFillBoxFlag);
    }catch(e){}
    win.center();
    win.show();
    function bezier(a,b,c,d,t)
        var ab,bc,cd,abbc,bccd;
        ab = lerp(a,b,t);
        bc = lerp(b,c,t);
        cd = lerp(c,d,t);
        abbc = lerp(ab,bc,t);
        bccd = lerp(bc,cd,t);
        return lerp(abbc,bccd,t);
    function lerp(a,b,t)
        var x = a[0] + (b[0]-a[0])*t;
        var y = a[1] + (b[1]-a[1])*t;
        return ;   
    function readByte(str, ofs) {
        return str.charCodeAt(ofs);
    function readInt16(str, ofs) {
        return (readByte(str, ofs) << 8) + readByte(str, ofs+1);
    function activePathIndex(){// returns -1 if no path active/selective
       try{
          var ref = new ActionReference();
          ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
          var desc = executeActionGet( ref );
          return  desc.getInteger(charIDToTypeID("TrgP" ));
       }catch(e){}
     function decoFill(Name,PatID,BMODE,Opacity,useFillBoxFlag) {
             if(BMODE.length> 4) {
            var blendMode ="stringIDToTypeID(BMODE);";
            }else{
                var blendMode = "charIDToTypeID(BMODE);";
        var desc16 = new ActionDescriptor();
        desc16.putEnumerated( charIDToTypeID('Usng'), charIDToTypeID('FlCn'), charIDToTypeID('Ptrn') );
            var desc17 = new ActionDescriptor();
            desc17.putString( charIDToTypeID('Nm  '), Name.toString());
            desc17.putString( charIDToTypeID('Idnt'), PatID.toString());
        desc16.putObject( charIDToTypeID('Ptrn'), charIDToTypeID('Ptrn'), desc17 );
        desc16.putPath( stringIDToTypeID('decoScriptFile'), new File( app.path +"/Presets/Deco/Varying Path and Spacing.jsx" ) );
        desc16.putUnitDouble( charIDToTypeID('Opct'), charIDToTypeID('#Prc'), Number(Opacity) );
        desc16.putEnumerated( charIDToTypeID('Md  '), charIDToTypeID('BlnM'), eval(blendMode));
        try{
            if (useFillBoxFlag) {
        executeAction( charIDToTypeID('Fl  '), desc16, DialogModes.ALL )}   //Show the fill dialog box on the way to the path rendering
            else {
        executeAction( charIDToTypeID('Fl  '), desc16, DialogModes.NO )}    //Skip the fill box because the pattern was selected by name,
        }catch(e){return;}
    //The rest of this is fuc\nctions supporting listing pattern names
    function savePatterns( file ) {
        var desc = new ActionDescriptor();
        desc.putPath( charIDToTypeID( "null" ), new File(file) );
            var ref = new ActionReference();
            ref.putProperty( charIDToTypeID( "Prpr" ), charIDToTypeID( "Ptrn" ) );
            ref.putEnumerated( charIDToTypeID( "capp" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
        desc.putReference( charIDToTypeID( "T   " ), ref );
    executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
    //this was written by someone else - note that this method of finding duplicates eliminates long names that differ far to the right
    function ReturnUniqueSortedList(ArrayName){
    var unduped = new Object;
    for (var i = 0; i < ArrayName.length; i++) {  
    unduped[ArrayName[i]] = ArrayName[i];
    var uniques = new Array;for (var k in unduped) {
       uniques.push(unduped[k]);}
    return uniques.sort();
    Anyways, maybe the error message will tell you what I'm doing wrong.

  • Crosshatch Pattern to fill Text Box or polygon shape???

    I often have a need to define a certain area or room of a floor plan as the part we'll be using.
    In the past, I've done this by creating a text box with No Borders, then filling it with a color and 25% opacity.
    Our new attorney says "no colors...use a cross-hatch pattern in the defined area".
    So, my question is, once I've defined the area with a text box or by using the Polygon Tool, how do I fill the space with a crosshatch pattern???
    I've tried creating a small jpg (attached) of the sort of pattern I'd like it to be filled with, but can't figure out how to implement it so it will be used as a fill option.
    Thanks in advance for any help you may provide.
    I'm using Adobe Acrobat Pro, Version 9.2.0.
    Thanks again,
    D Flash
    Durham, NC (usa)

    Michael,
    Thanks for your response (and lawyer humor!).
    I've attached a document showing the type of thing the lawyer's referring to.
    in the attached drawing it shows two spaces we're using, surrounded by a polygon box and "filled" with a slightly opaque color.
    His concern is after much copying, it would always be easier to see the defined area if it was filled with a crosshatch, as opposed to a color.
    Is there a way to do that, perhaps using a custom-made stamp...I tried that with the jpg I provided in my previous post, but the jpg would not "fill" the area, and I was not able to "size" it to fill my space.
    Do you (or anyone else) have any suggestions as to how to accomplish what he's asking of me, using Acrobat????
    Thanks so much,
    Flash

  • Cannot open scripted pattern dialog. Default values will be used.

    Hello everybody!
    After I updated Photoshop to 14.2 I have an issue with Scripted patterns. I can select all of them, but when i click OK this pops up:
    And I can't pick any settings for my scripted patterns.
    My GPU is nVidia GeForce GTX 660 (non-Ti) with 2GB of VRAM. All of the GPU Acceleration features are enabled in Photoshop.
    The issue is the same both on 32bit and 64bit version of Photoshop.
    I'm on Windows 8.1 x64.
    I tried turning of "Use OpenGL" in the Scripted patterns settings file in "Photoshop/Presets/Deco", still doesn't work.
    Thanks in advance for help!

    Hoi Goran,
    Start Photoshop as Administrator, look if this works. For me this did the trick, it was a rights issue....
    Regards,
    Leon

Maybe you are looking for