Problem filling and selecting with Paths.jsx

I copied the Paths.jsx from Adobe Photoshop CS5 Scripting reference Javascript, p. 141.  It works OK.  It is a path which is the outline of an ice cream cone and caressing it with the current foreground color.

I then tried to fill in the path and who doesn't.  I tried the 3 methods by using the following additional codes and changing from false to true:

Fill the path

fillColor = new SolidColor

fillColor.rgb.red = 255

fillColor.rgb.green = 0

fillColor.rgb.blue = 0

try {

   if (false) {

/ / It works and gives a gray fill, which is neither the

              // color of foreground and background

/ / Only the ice cream cone is selected and filled

myPathItem.fillPath)

   } else if(false) {

/ / With a specified color, it does not work

myPathItem.fillPath (fillColor)

       } else if(true) {

/ / This is a selection of the PathItem, he selects and fills

/ / Only the ice cream cone is selected and filled

myPathItem.makeSelection (0, fake, SelectionType.REPLACE)

selRef = app.activeDocument.selection;

selRef.fill (fillColor, ColorBlendMode.NORMAL)

}

} catch(ex) {

MSG = "fill path error: \n" + ex.message

alert (true msg, "Exception",);

}

They do as say the comments.  None of them not what I expected.  For the second way, the error message is:

General Photoshop error occurred.  Maybe this feature is not available in this version of Photoshop

-Could not complete the command because of a program error.

    1. I do not understand why only the part of the cream of the cone is filled or selected (the third table).  I can manually make a selection from the path to the PS and it also only selects the part of the ice cream.  All lines are scratched.  Only the upper part is filled or selected.

    2. FillPath does not work why?

I can provide the script if necessary.  I'm an experienced programmer but new Photoshop scripts.  Is this a bug or I do something wrong?

Thanks for any help.

It is not a bug. The path that you created has 3 open subpaths with two lines. Barrier does not work on open lines. It will fill the arches open and/or closed paths.

One way to fill the cone would be to create as a point three closed the path instead of only two lines.

Tags: Photoshop

Similar Questions

  • Define the pattern fill and gradient with color

    Hi all!

    This is my first post in the forum of fireworks. Also, this is the first time I'm using Fireworks 8. It's a bit like Photoshop and Photoshop, I can do a fill with a custom pattern by creating a template and do a 'use as motive' and selecting this model and do a fill with it using the bucket fill and then by selecting the model, and fill with a gradient (such as blue-white)

    I'm trying to do the same thing with Fireworks 8, but I don't know how. First of all, I created the template in a file separated and saved as a PNG image then in Fireworks, bucket filling (not degraded bucket) on model and then click 'Other' and opened upward model that I created and I filled the area that I wanted to. Now, this is the part that I can't figure out how to do. My boss is points spaced with 1 pixel between each point. I want their gradient fill and I can not blend them. Any help? Thank you

    Quote:
    Posted by: ODoyle rules
    Hi all!

    This is my first post in the forum of fireworks. Also, this is the first time I'm using Fireworks 8. It's a bit like Photoshop and Photoshop, I can do a fill with a custom pattern by creating a template and do a 'use as motive' and selecting this model and do a fill with it using the bucket fill and then by selecting the model, and fill with a gradient (such as blue-white)

    I'm trying to do the same thing with Fireworks 8, but I don't know how. First of all, I created the template in a file separated and saved as a PNG image then in Fireworks, bucket filling (not degraded bucket) on model and then click 'Other' and opened upward model that I created and I filled the area that I wanted to. Now, this is the part that I can't figure out how to do. My boss is points spaced with 1 pixel between each point. I want their gradient fill and I can not blend them. Any help? Thank you

    Hi all!

    In fact I just understand how do.

    Once I made the filling inside the Rectangle, I flattened selection, took the magic wand to select and did a reverse selection filled with gradient with the color I wanted and I checked in the properties of the gradient tool marked "selection of filling" and it worked. I don't know if there is an easier way to do it, but that's how I thought of it.

    Thank you

  • Problem Manager multiple selection with system dialog box

    I currently have a problem with the help of system on a manager of multiple selection dialog as the code below works fine:

    multiSelectHandler {
                        status: listView1.selectionList().length + qsTr(" Clients Selected") + Retranslate.onLocaleOrLanguageChanged
                        actions: [
                            DeleteActionItem {
                                id: deleteActionItem
                                onTriggered: {
                                    var selectionList = listView1.selectionList();
                                    var selectedItem = dataModel.data(selectionList);
                                    console.log(selectedItem);
    
                                    for (var i = 0; i < selectionList.length; ++ i) {
                                        _sql.deleteClient(dataModel.data(selectionList[i]).clientID)
                                        dataSource.loadData()
                                    }
                                }
                            }
                        ]
                    }
    

    However, when it is changed to use that a dialogue system, the feature does not work and the console record results:

    selected list: undefined

    selected item: undefined

    multiSelectHandler {
                        status: listView1.selectionList().length + qsTr(" Clients Selected") + Retranslate.onLocaleOrLanguageChanged
                        actions: [
                            DeleteActionItem {
                                id: deleteActionItem
                                onTriggered: {
                                    multiSelectDeleteDialog.show()
                                }
                                attachedObjects: [
                                    SystemDialog {
                                        id: multiSelectDeleteDialog
                                        title: qsTr("Delete Clients") + Retranslate.onLocaleOrLanguageChanged
                                        body: qsTr("Are you sure you want to delete these clients?") + Retranslate.onLocaleOrLanguageChanged
                                        onFinished: {
                                            if (result == 3) {
                                                console.log("Cancelled")
                                            } else {
                                                console.log("Deleted")
                                                var selectionList = listView1.selectionList()
                                                console.log("selected list: " + selectionList)
                                                var selectedItem = dataModel.data(selectionList);
                                                console.log("selected item: " + selectedItem);
    
                                                for (var i = 0; i < selectionList.length; ++ i) {
                                                    _sql.deleteClient(dataModel.data(selectionList[i]).clientID)
                                                    dataSource.loadData()
                                                }
                                            }
                                        }
                                    }
                                ]
                            }
                        ]
                    }
    

    With the help of Roger Leblanc, it works now

    multiSelectHandler {
                        status: listView1.selectionList().length + qsTr(" Clients Selected") + Retranslate.onLocaleOrLanguageChanged
                        actions: [
                            DeleteActionItem {
                                property variant selectionList
                                property variant selectedItem
                                id: deleteActionItem
                                onTriggered: {
                                    deleteActionItem.selectionList = listView1.selectionList()
                                    deleteActionItem.selectedItem = dataModel.data(selectionList);
                                    multiSelectDeleteDialog.show()
                                }
                                attachedObjects: [
                                    SystemDialog {
                                        id: multiSelectDeleteDialog
                                        title: qsTr("Delete Clients") + Retranslate.onLocaleOrLanguageChanged
                                        body: qsTr("Are you sure you want to delete these clients?") + Retranslate.onLocaleOrLanguageChanged
                                        onFinished: {
                                            if (result == 3) {
                                                console.log("Cancelled")
                                            } else {
                                                console.log("Deleted")
    
                                                for (var i = 0; i < deleteActionItem.selectionList.length; ++ i) {
                                                    _sql.deleteClient(dataModel.data(deleteActionItem.selectionList[i]).clientID)
                                                    dataSource.loadData()
                                                }
                                            }
                                        }
                                    }
                                ]
                            }
                        ]
                    }
    
  • How can I remove the gaps when pasting and select with the magic wand?

    Anti-aliasing is turned off however, there are gaps. How can I stop this? This problem occurred recently, as a few days ago, I've been able to copy and paste without gaps.

    I select a part of the image then copy and paste into a new layer in the same position, then I select the inverse of the image newly pasted the selection back to previous and Coptic image, the other party, and paste it into a new layer.

    The gap is between the tank and the plants (see image)

    Screen Shot 2015-09-16 at 6.01.29 pm.png

    Sometimes, these lines appear if you are not 100% like c.pfaffenbichler said, it can also be the way that your graphics card is reading the info, as often, when you flatten layers, the line will disappear. One thing you can do is to develop the selection of 1 px on the layer which will be the bottom. This will give you a bit of overlap.

  • I can't navigate and select with the mouse in some ID dialog boxes

    I recently installed ID CC 9.1X64 on a PC running Windows 7 Professional with SP1.

    The application seems to work OK in regard to most but when some dialog boxes (for example Options of cell Style) pop up I cannot select items or navigate around the area by clicking with the mouse. I have to use the tab and return keys, which is awkward and done things, such as the definition of the outline styles, almost impossible.

    Does anyone have any idea why this might be happening? I had something similar with another application.

    Malcolm

    It is the following: panels and InDesign tools answer not to the clicks of the mouse (Windows 7/Vista)?

  • PathItems selection with a gradient

    Hey guys,.

    I am putting together a script that finds pathItems with gradient color tpyes fill and select them. So far, I got as far as being wheat to go through a document and identify all pathItems with slopes, but I can't find a good weay JUST select them.

    If anyone thinks something that I would be grateful.

    Here's what I have so far.

    #target illustrator
    var doc = app.activeDocument
    ipath(doc)
    
    function ipath(doc){
        for(i=0;doc.pathItems.length>i;i++)
    
    if(doc.pathItems[i].fillColor.typename == 'GradientColor'){
      alert("it's a Gradient")
    
        }
    
    
    
    
    }
    

    You should be able to use the ".selected" property, which is similar to the following example:

    #target illustrator
    var doc = app.activeDocument
    var pL = doc.pathItems.length;
    var pID;
    for (var i = 0, l = pL; i < l; i++) {
        pID = doc.pathItems[i];
        if (pID.fillColor.typename == 'GradientColor') {
            pID.selected = true;
        }
    }
    

    I hope that is useful for your efforts.

  • Problem with the swap fill and stroke

    Hi guys, I am trying to use the brush to draw lines with Illustrator, but I'm having some problems with the button fill.

    The problem is that when I chose a color fill and a stroke color, let's fill: orange and stroke: black, when I apply a coal with the brush, the colour for filling automatically changes none. Change the line color does not occur, because it maintains the same color.

    If the thing is that the fill color changes automatically zero against any color that I select.

    Any suggestion to solve this problem?. Thank you

    Double click on the Brush tool in the tools palette and switch: fill a new brush strokes.

  • Mac OS 10.6.8 - Photoshop CS5.1 after years of perfect use, suddenly I'm unable to select a layer by clicking on the image and select it in the layers palette.  Solve this problem for me and I'll buy you a new car.  With our thanks, David Heidelberge

    Mac OS 10.6.8 - Photoshop CS5.1

    After years of perfect use, suddenly I can't select a layer by clicking on the image and select it in the layers palette.

    Solve this problem for me and I'll buy you a new car.

    With our thanks, David Heidelberger

    Hi David

    Have you checked your settings to automatic selection in the upper left of the workspace?

  • How to fill a column with numbers and maintain when adding or deleting lines?

    So far, I've discovered two ways to fill a column with the number:

    1. Enter '1' in a single cell, '2' in the one below, select both, and then use the yellow dot to drag down - it will do the rest.

    2 create a formula such as 'A2 + 1' and drag also.

    However, in both cases it will work if I manually this continues to do for each newly added line at the bottom. Now, that alone would not be that big of a problem if it wasn't for the fact that I'm working with a table where the lines can be added among other rows in the future.

    Having said that, could someone please tell me how to create a column with a number that will increase automatically? I mean - if I add a new line between line 56 and 57, I want the new line to have a '57"in it, and the" old 57 "would now be"58"and so on." " I don't want to drag the whole column, which can be hundreds if not more than a thousand lines.

    Try to put this in the cells in the column:

    = ROW()

    In the formula, you can add or subtract a number if necessary to get the starting number that you need.

    SG

  • Problems of libraries Java build path. With the help of an external CONTAINER as a library in a BlackBerry app.

    Hello

    I have two codes, the application code and the code of the library.

    The application should use the jar as a library file.

    Application-> App

    Library-> AppLib

    I work with Eclipse and JRE 5.0. I have a problem. I'm trying the AppLib.ja the Java Build Path of the application code, as in a normal Java application. Copy "AppLib.jar" in my project and select Java Build Path libraries does not work. Browser files doen't show me the new file. Therefore, I can select the library project folder as external JAR, but when I test the app on BlackBerry I get an error do not find the module:

    > App starting error: Module 'AppLib' not found

    To export my application for BlackBerry I only select the file "App.alx" with the Desktop Manager. I should also add, somehow, the Jar file?

    What I am doing wrong?

    I think if I could include 'AppLib.jar' because no JAR external to compile the project would be expected for that library properly in the "App.alx" but as I have said, for example, if I put the "AppLib.jar" in the folder "App\ lib\" file path browser version does not show me the file and I can't select it. I can only do so if I select in the AppLib\deliverables\Standard\5.0.0\, but not found problem occurs then.

    Can someone help me?

    I won't put my library code in the application code. It is not very comfortable. And it would be a bit dodgy.

    Thank you very much.

    Greetings.

    ibarrera, that is not the problem.

    First, when copying a file to your project via the OS Explorer, you must refresh the project in Eclipse in order to get visible. otherwise, if the Eclipse do not see, the .jar file is not going to join your project. But I know that's not the problem.

    In the second place, to get this .jar file be included in your project as non-external, you must add as first external, close this wizard properties re-open; Then select the .jar file, you just added and click on "Migrate JAR file" button. Find the .jar file in the project and click Finish.

    This is done, your project will be ready to be built and executed.

    I hope this helps. Good luck to all.

  • Working with paths and Surface Pro 3

    I'm having a real problem trying to select and change the path pointing with pen a Surface Pro 3. It is so hard to grasp the point of control. Does anyone have some tips on how to do this?

    IMO because the surface has a high resolution 216 PPI if you don't not zoom the image's scaling more large then100% will not to target as node and point to paths of control points. Hit the elastic line will still be difficult with the pen of surface 3 pro...  The first accessory I added to my 3 Surface Pro Microsoft Bluetooth comfort mouse, it's much easier to position the mouse cursor and click on the using the pen of Microsoft on the screen to move the cursor located under the glass of the screen and a distance from the pen. by clicking on the pen. With the help of a mouse is much easier for me then using.the Surface Pro 3 pen. In fact to sharpen in my home office I'll use my Wacom Intuos Pro rather than the surface EP pro 3. Keep my work and my finger print off the display.  In fact at home I use Photoshop on my workstation and use my Pro 3 surface as a third and high resolution of display on my workstation. I'll change my picture on my screen of low resolution and have a second point of view high resolution of my image my display surface pro 3.

  • "Without color" problems in the "Fill and Stroke.

    I have problems "without color" in the 'Fill and Stroke' function of Flash CS4 Pro.

    I had been using CS4 for 10 days and it has worked well. Then I tried to experiment with different color combinations (with "no color") to "Fill and Stroke" for a simple button. Suddenly CS4 locked up on me while I was working with the Panel 'color '. A second panel of color appears in the upper left corner and the program did not. All I could do was to complete the task of CS4.

    After that, whenever I created even a simple rectangle, initially that the colors would appear as it is indicated for "Fill and Stroke", but when I chose the object to see its properties, the stroke or fill color box would have a red slash line, indicating a "colorless", and I could not check the color to change using the ink bottle tool Although the other box worked well.

    Reset did not help. So I uninstalled CS4 (and did not keep the preferences), rebooted, and then reinstalled. The problem was still there. Log on as another user did not help. I tried to restore the Windows system before I installed CS4 and resinstalling what and who did not. I now have a dysfunctional CS4 and I don't know what to do about it. Please help me. Thank you.

    Have you updated flash 10.0.2?  Have you played around with a bunch of different selections, objects and so on to see if this box is still wrong?  I think that there is a particular selection (order of selection of things, and so on), where samples of color in one place do not work as expected. However, it should not happen all the time and from what I remember, it was easy enough to work around (I don't know even what it was - so probably not, because it seems difficult to execute in or maybe now fixed).

    Also, make sure you have the selected feature - if you have selected everything, either the fill or STROKE will show no color and Sun depends on the selection.

  • to fill the gaps with value of lead and the delay and make average and the gap between earned

    Thanks in advance

    I have table as below
    ID          TYPE     NUM     NAME     BEG_MP     END_MP     VALUE
    10001103N     3     1190001     WST     0.000     0.220     
    10001103N     3     1190002     WST     0.220     0.440     
    10001103N     3     1190003     WST     0.440     0.820     12800
    10001103N     3     1190003     WST     0.820     1.180     12800
    10001103N     3     1190004     WST     1.180     1.220     
    10001103N     3     1190004     WST     1.220     1.300     
    10001103N     3     1190005     WST     1.300     1.420     14800
    10001103N     3     1190005     WST     1.420     1.550     14800
    10001103N     3     1190006     WST     1.550     2.030     
    10001103N     3     1190006     WST     2.030     2.660     
    10001103N     3     1190007     WST     2.660     2.780     
    What I need is to fill the gaps with value of lead and the delay and make average and the gap between the values
    ID          TYPE     NUM     NAME     BEG_MP     END_MP     VALUE
    10001103N     3     1190001     WST     0.000     0.220     12800 ---> Lag value
    10001103N     3     1190002     WST     0.220     0.440     12800 ---> Lag Value
    10001103N     3     1190003     WST     0.440     0.820     12800
    10001103N     3     1190003     WST     0.820     1.180     12800
    10001103N     3     1190004     WST     1.180     1.220     13800 ---> Avg(12800,14800)
    10001103N     3     1190004     WST     1.220     1.300     13800 ---> Avg(12800,14800)
    10001103N     3     1190005     WST     1.300     1.420     14800
    10001103N     3     1190005     WST     1.420     1.550     14800
    10001103N     3     1190006     WST     1.550     2.030     14800 ---> Lead Value
    10001103N     3     1190006     WST     2.030     2.660     14800 ---> Lead Value
    10001103N     3     1190007     WST     2.660     2.780     14800 ---> Lead Value
    create table AVG_TABLE
    (
      ID     VARCHAR2(20),
      TYPE   NUMBER,
      NUM    NUMBER,
      NAME   VARCHAR2(10),
      VALUE  NUMBER,
      BEG_MP NUMBER(6,3),
      END_MP NUMBER(6,3)
    )
    ;
    
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190001, 'WST', null, 0, .22);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190002, 'WST', null, .22, .44);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190003, 'WST', 12800, .44, .82);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190003, 'WST', 12800, .82, 1.18);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190004, 'WST', null, 1.18, 1.22);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190004, 'WST', null, 1.22, 1.3);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190005, 'WST', 14800, 1.3, 1.42);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190005, 'WST', 14800, 1.42, 1.55);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190006, 'WST', null, 1.55, 2.03);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190006, 'WST', null, 2.03, 2.66);
    insert into AVG_TABLE (ID, TYPE, NUM, NAME, VALUE, BEG_MP, END_MP)
    values ('10001103N', 3, 1190007, 'WST', null, 2.66, 2.78);
    commit;

    Hello

    Use LEAD and LAG when you know exactly how far is the target line (for example, if you know the desired value is on the next row).
    If you don't know exactly how far is the target line, then FIRST_VALUE and LAST_VALUE are more likely to be useful.

    WITH     got_neighbors     AS
    (
         SELECT     avg_table.*
         ,     LAST_VALUE (value IGNORE NULLS) OVER (ORDER BY beg_mp)          AS prev_value
         ,     LAST_VALUE (value IGNORE NULLS) OVER (ORDER BY beg_mp DESC)     AS next_value
         FROM     avg_table
    )
    SELECT       id, type, num, name, beg_mp, end_mp
    ,       COALESCE ( value
                 , ( NVL (prev_value, next_value)
                   + NVL (next_value, prev_value)
                   ) / 2
                 )     AS value
    FROM       got_neighbors
    ORDER BY  beg_mp to f
    ;
    

    Riedelme is correct: LAG LEAD (as well as FIRST_VALUE and LAST_VALUE) can return only the values that are there (or that you give as default values). This means that you can not solve this problem with these functions alone; you need something else (as NVL, above) to provide value when the function does not find it.

  • I filled my printer with an hp1200 cartridgeworld cartridge and now the printer always says "check printer cartridge? any ideas help please

    I filled my printer with an hp1200 cartridgeworld cartridge and now the printer always says "check printer cartridge? any ideas help please, PS is not the first time I used these cartridges, but this is the first time I had no problem

    Hello

    Follow these steps and check if that helps:

    Method 1:
    Try to run the printer Troubleshooter and check that if it helps, here is the link:
    http://Windows.Microsoft.com/en-us/Windows7/open-the-printer-Troubleshooter

    Method 2:
    Try to run the below fixit and check if this may help:
    http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-print

    It will be useful.

  • Problem with Win 7 64 bit OS and itunes with the corefoundation.dll?

    I am running Win 7 64 bit OS. When you try to run iTunes I get error message: the program cannot start because corefoundation.dll is missing. Try to reinstall to see if that solves this problem.
    is there a problem with itunes and Win 7 64 bit? or by reinstalling the dll file fix?

    Uninstall and reinstall hopefully should solve your problem.

    MobileMe: "CoreFoundation.dll was not found" or "Apple Application Support is missing" alert
    http://support.Apple.com/kb/TS2211

    How to fix Corefoundation.dll errors
    http://www.dll-error-fixes.com/resolve-corefoundationdll-missing-errors/

    Have you tried right-clicking on the program.exe Setup and selecting "Run As Administrator" option?

    Have you tried to clean your Temp folder, you can do this by typing folder in the Start Menu RUN box.  This will open your Temp folder, there, you can remove all Windows will allow you to do.

Maybe you are looking for

  • Migration wizard failed

    I tried to upgrade Yosemite to El Capitan, but failed. If the local bank staff did a clean install for me. Prior to this, internal hard drive for my Mac has been saved using Time Machine, on an encrypted external hard drive. However, Time Machine is

  • HP 15-ac020na

    Please help, I switch on the laptop, it says administrator or password once I tried 3 times the code I have is 63324160

  • I need to make a new account on my mac but I dun have the owner password... (Old Tower of mac of my cousin)

    I received a tour of apple of my cousin. Information on the mac says it's a 10.5.8 version. I need to make a new account for me, but I need to know the password of my cousin, who I don't know. Is there a way to make a new account without needing a pa

  • Scanner HP PSC 2410

    How can I get my HP PSC 2410 All in One to scan 2 originals in a scan?

  • SCAM or Virus posing as Dell SupportAssist?

    This morning I had a popup indicating that it is Dell SupportAssist, with an "alert" that there was a problem with my PC. I did a quick check on the WEB that SupportAssist is a legitimate and observed program ago installed (or updated) 2 days, on the