Fireworks Automation: Applying a Stroke (Brush) to a Path That Doesn't Have One

I've tried setting various brush properties to apply a stroke
to an existing path that doesn't have one, but so far nothing
works. My code looks like this (it's contained within a while
loop):
currentselection[0].pathAttributes.brush.feedback="brush"
or:
currentselection[0].pathAttributes.brush.diameter=1
Everything I've tried produces an error. Can anyone point me
in the right direction?
Bill Gregg

Thanks for the suggestion. I think I've solved my problem
using the setBrushNColor method.
I'm relying heavily on the sample scripts that accompany
Fireworks. I've put 'em all into one text file and I search it. And
sometimes I google a method or property name and see what turns up
(usually not much). So if I can't turn up a specific example of how
a method is used, sometimes I can't figure out how to use it. I
think I tried using setBrush, but couldn't get the parameters
right. So finally I fell back on using the "Copy Steps" command in
the history palette. Using that, I got:
fw.getDocumentDOM().setBrushNColor({alphaRemap:"none",
angle:0, antiAliased:true, aspect:100, blackness:0,
category:"bc_Pencil", concentration:100, dashOffSize1:2,
dashOffSize2:2, dashOffSize3:2, dashOnSize1:8, dashOnSize2:1,
dashOnSize3:1, diameter:1, feedback:"brush", flowRate:0,
maxCount:15, minSize:1, name:"bn_1-Pixel Anti-Aliased",
numDashes:0, shape:"circle", softenMode:"bell curve", softness:0,
spacing:15, textureBlend:0, textureEdge:0,
tipColoringMode:"random", tipCount:1, tipSpacing:0,
tipSpacingMode:"random", type:"simple" }, "#000000");
Apparently none of the parameters are optional--it gives an
error if I try to pare down the list. Not very elegant, but it gets
the job done.
And after a while I figured out that some of the commands I
wanted to use could not be targeted to anything but the selection,
so I've started filling arrays with lists of items I want to
change, then applying the command--just like you're doing in the
sample you sent. That technique is working well so far.
As for the multiple-paragraph text boxes, I've just kicked
that problem down the road a bit. I realized that that in the files
we'll be dealing with, there probably won't be that many
multiple-paragraph text boxes. I'll have to work on it eventually,
but it's dropped down the to-do list for now. Thanks for the
suggestion--it'll be my starting point when I get back to that
problem.
What kinds of things are you trying to do with JavaScript in
Fireworks?
Bill Gregg

Similar Messages

  • Is it possible to apply a stroke effect to a Photoshop image in After Effects?

    Hello,
    I've imported an image (a maze) from Photoshop into AE, and I want the image to appear as if it's being drawn in using the Stroke animation.  Is it possible to apply some kind of path along which the image can "fill in"--similar to how you can do this with text?  I didn't see a way to convert the image into a shape layer on which I could apply the Stroke effect, either.
    Thanks to everyone who's been so helpful in these forums--I've gotten a lot of questions answered by y'all!
    meredith

    Followed everything you said up until using the solid as a track matte, where I got a little confused.
    The effect worked more or less how I wanted when I set the starting value of the stroke at 100% and set track matte of my original image to Alpha Inverted.  When I did this, it gave the effect that the solid was disappearing to reveal the original image, if that makes any sense. 
    Is there anyway to adjust the brush shape?  Right now it is a circle, is it possible to change it into a square?  The circle brush gives an awkward edge line as the lines of the image begin to appear with the stroke effect.
    Thanks!

  • PLEASE tell me there is a way to apply automatic strokes using the Pen Tool.

    To apply pencil and brush strokes using the Pen Tool (in Photoshop CC - the version I'm using), I would constantly have to right-click on my path, and on the dialog menu that pops up, select "Stroke Path...," then select which "Tool" (I namely use the Pencil and Brush tools), then hit "OK." And that gets ANNOYING. This is Photoshop CC - which means there should be a way for the Pen Tool to automatically apply the (Pencil/Brush) strokes while I'm creating paths. Illustrator does that - so there should be a way for Photoshop to do that as well. It's a software a majority of artists use; there SHOULD be a way to automatically apply pen strokes. PLEASE tell me there is.

    You can do a shape rather than a plain path, and apply a stroke there. But, just plain vanilla; no fancy brush tips or scatter or anything like that.

  • Maintaining Stroke Weight when changing path to brush stroke

    Is there a way or an option I am missing to convert my regular paths to a path stroked with a brush profile,while maintining the proper stroke width?
    For instance, I have a regular line with a stroke of 5 and then add a brush profile, which then converts the original stroke to whatever the brush was made at.
    Can I change this? I am hoping I am missing something with an option or how I make brushes
    Thanks!

    dasikins,
    When you apply a Brush to a path, the resulting width of the brush will be the basic brush width multiplied by the path Stroke Weight in points.
    Presuming you wish to have a final brush width of 5pt and the basic width is 2.5pt, you will need a path with a Stroke Weght of 2pt because 2*2.5 = 5.
    I wonder whether this is relevant or nonsense.

  • Problem with applying fills & strokes to grouped objects in Illustrator CC

    I have this problem that I deal with everyday & I can't figure out how to fix it.
    I am always struggling with applying fills & strokes (or changing fills & strokes).
    It seems like I always have to ungroup the objects first (even if I never grouped them in the first place), or I have to clear appearance first. Sometimes I have to ungroup several times, even if it is only one object by itself, not grouped with anything else.
    I think It may have something to do with the pathfinder... like the pathfinder is creating groups when I use the divide filter.
    Even when I use the direct selection tool, to select just the object I want, it wont let me apply the fill or stroke that I want.
    Also, it seems like it has several layers of appearance... when I ungroup the object, it changes appearance (the fill or stroke changes).
    Also, if I eyedrop the object to apply its appearance to another object, the "hidden" appearance is the one that gets appled to the new object.
    The closest discussion I could find was about compound paths, but I think this is a different issue, because when I go to compound paths in the menu, it doesn't give me the option to release anythig.
    I have this problem ALL DAY LONG, every day. Please help!!

    Thanks for your reply!
    I see what you are saying, and I think is some cases that could be a helpful trick - but the problem I'm having is slighlty different.
    The object that I want to change doesn't show the actual appearance... it only shows its underlying appearance after ungrouping several times, and then when it is completely ungrouped, it visibly changes to another fill & stroke. This happens even when the object is not grouped with anything... it is just grouped to itself i guess & I am not grouping these items, they just become grouped somehow - I think because of the pathfinder. I often have to ungroup 3-5 times, which is a hassle in iteself... but sometimes I actually need to grouping to keep items togther so I can manage all the ojects & move them around as needed.
    So... the method you are suggesting could possibly solve the issue, except I don't know what the fill & stroke is until I ungroup everything, so I can't create the swatch off to the side to match it. The other thing is, it seems like I would be creating a lot of swatches, since I use lots of different fills & it seems like it would be a lot of extra work.
    Here is an example of 2 objects before using the pathfinder. Please note how the object selected & the fill & stroke boxes all jive:
    Now here are two images after using the pathfinder tool (I added another object to get the problme to happen). Please note how the fill & stroke boxes do not match the objects selected:
    This is what happens when I try to change the fill to green (the fill does not apply):
    I thought it had something to do with compound paths, but as you can see below, the menu doesn't give me an option to release compound paths:
    The final image is what happens after I ungroup the objects:
    I don't understand:
    1) why pathfinder is grouping these objects
    2) why the strokes & fills change & why the fill & stroke boxes don't match the actual fill & stroke.
    3) why I can't change the fill or stroke without ungrouping (even when using the direct selection tool).
    4) why the fill & stroke change again after ungrouping

  • Stroke thumbnail view in brush presets panel in CS6 doesn't represent pressure sensitivity

    Everytime I open photoshop the stroke thumbnail shows up with lost settings.  I can hover my pen over brush presets and press ctrl+F1 and it will change back but when i open up photoshop cs6 it does not show what the brush setting are with the stroke thumnail and I have to do it again. I know how to correct it temporarily but I would like a permanent fix for this as it is quite annoying. I have tried to open it with just my pen from my tablet and it does not help. I am running windows 7. cintiq tablet.

    Hey JJMack!
    Thank you for your response! Unfortunately that doesn't seem to be my issue. I actually think I may be running into a bug with PS6. It seems like the stroke thumbnail preview might not be receiving the information that there is pressure sensitivity turn on my cintiq.
    Here is an example below..
    As you can see here the brush I have selected obviously has pressure sensitivity and PS6 is recognizing that. But for some reason that information is not being communicated to the stroke thumbnail preview.
    What's even weirder is when you go into that brush's presets the preview below shows the stroke thumbnail fine!
    I am wondering if maybe I have some weird preference turned on hidden away somewhere... or if this is an actual bug with the program.
    thanks guys!
    ~gigi

  • Automator: Apply Color Label and Copy to Folder

    I'm trying my hand at Automator, and I need help with one of my workflows (⇪). Basically, it's a service (accessible via right-click) that will apply a color label on an image file, and then copy that image file to a corresponding folder with the same color label. My current version works fine, except for the fact that I had to create seven versions to accommodate all seven colors.
    Is there any way to turn the color into a variable? I want the workflow to prompt me for a color, and then use that choice to run a search for the appropriate folder. I'd rather not hard code the color choice into separate services that all do the same thing.
    Also, the service currently assumes that it will run fast enough before I can deselect the target file. I'm sure it's possible that the folder search could lag out while I select another file, and the service will ultimately copy the newly selected item, rather than the initial target. Is there a way to ensure the service acts on whatever was selected when it was first triggered?
    I don't know AppleScript beyond copying-and-pasting other people's codes, so that limits my automation quite a bit. I don't know how to prompt for a label index choice and then feed the result into a find function. I also don't know how to record the file path of the selected item, and then feed that into the copy function at the end to ensure it doesn't copy the wrong file.

    Typically a list of items is passed to a workflow, so you will usually (depending on what you are doing with the items) need to step through the items in that list. If there is only one destination folder with the target label, you can just search for it, otherwise you will need to specify the destination in some other way.
    The following Service workflow example assumes that there is only one destination folder that has a given label color. It gets the label index of one of the input items and finds a folder with the same index at a specified base location (to limit the search range).
    1) Input items are automatically passed to an application or service, otherwise another action to get FInder Items can be used
    2) *Label Finder Items* (show the action when the workflow runs)
    3) *Run AppleScript* (paste the following script)
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into an Automator 'Run AppleScript' action">
    on run {input, parameters} -- copy to a labelled folder
    This action is designed to follow a "Label Finder Items" action.  It will get the
    first folder of the base folder that has the same label and copy the input items
    to that folder.
    input: a list of Finder items received from a "Label Finder Items" action
    output: a list of Finder items to be passed on to a following action
    set output to {}
    set skippedItems to {} -- this will be a list of skipped items (errors)
    set baseFolder to (((path to pictures folder) as text) & "Shelley:Mary:") as alias -- a place to start looking for the destination folder
    tell application "Finder"
    set theLabel to label index of (the first item of the input) -- just pick one, they should all be the same
    get folders of (entire contents of baseFolder) whose label index is theLabel -- include subfolders
    -- get folders of  baseFolder whose label index is theLabel -- no subfolders
    if the result is not {} then
    set theDestination to the first item of the result
    else -- no folder
    error number -128 -- cancel
    end if
    end tell
    repeat with anItem in the input -- step through each item in the input
    try
    tell application "Finder" to duplicate anItem to theDestination
    set the end of the output to (the result as alias)
    on error number errorNumber -- name already exists, etc
    set errorNumber to "  (" & (errorNumber as text) & ")"
    -- any additional error handling code here
    set the end of skippedItems to (anItem as text) & errorNumber
    end try
    end repeat
    showSkippedAlert for skippedItems
    return the output -- pass the result(s) to the next action
    end run
    to showSkippedAlert for skippedItems
    show an alert dialog for any items skipped, with the option to cancel the rest of the workflow
    parameters - skippedItems [list]: the items skipped
    returns nothing
    if skippedItems is not {} then
    set {alertText, theCount} to {"Error with AppleScript action", count skippedItems}
    if theCount is greater than 1 then
    set theMessage to (theCount as text) & space & " items were skipped:"
    else
    set theMessage to "1 item was skipped:"
    end if
    set {tempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
    set {skippedItems, AppleScript's text item delimiters} to {skippedItems as text, tempTID}
    if button returned of (display alert alertText message (theMessage & return & skippedItems) alternate button "Cancel" default button "OK") is "Cancel" then error number -128
    end if
    return
    end showSkippedAlert
    </pre>

  • [CS5] How to apply outside stroke to (united) objects without covering them?

    Hi guys,
    AI CS5 is brilliant, I love it - that's beyond any doubt. But I found one more issue which I cannot solve...
    I want to apply outside stroke (Align Stroke to Outside) on my just outlined copy but it covers other objects.Take a look at this preview.
    With CS4 I simply outlined and merged objects by using pathfinder. Also new Shape Builder tool won't work because these objects are all separated. Let me know if you have any ideas to solve this issue
    Thanks!

    Well i did not know how you prepared the file so thought you might have the stroke on top.
    Above the fill of the characters
    below the fill at the character level
    edit
    here it as compound paths

  • Applying a stroke to..a line?

    I'm trying to apply a stroke to a line! seems simple enough , right?
    But, in the stroke box, it thinks the line IS the stroke..
    How do I go about applying a stroke border to a line? Or is there another method (not using a line) to get the same effect?
    I'm using CS5.
    Thanks in advance,
    Joe.

    No need to expand.
    You just need some effects here and there and you're done:
    And for the layer (or a group) you need a pathfinder-effect:
    See translations of effects here:
    http://vektorgarten.de/illu-menus.html

  • Apply 3D stroke to a shape layer?

    hi all
    I have some animated paths set up in a 3D scene, using shape layers (I used shape layers to have square capped lines instead of round caps:)
    I wanted to try using 3D stroke, instead, to give a bit of thickness to these lines/paths... but I'm having trouble
    Is it even possible to apply 3D stroke to a shape layer?  When I try it, the path just disappears (story of my life haha)
    cheers
    LML

    The After Effects CC (12.2) update makes creating Bezier paths easier and more obvious.
    option for creating shape layers based on Bezier paths:
    When a shape tool (Rectangle, Rounded Rectangle, Polygon, Star, or Ellipse tool) is active, you can use the new Bezier Path option in the Tools panel to create a new shape based on a Bezier path, as opposed to the default of creating a new shape based on a parametric path. Holding the Alt (Windows) or Option (Mac OS) key while drawing a shape causes the opposite behavior—i.e., if the Bezier Path option is enabled, holding the Alt or Option key causes the shape tool to create a parametric path; if the Bezier Path option is disabled, holding the Alt or Option key causes the shape tool to create a Bezier path.
    command for converting a parametric shape layer path to a Bezier path:
    You can convert a parametric path to a Bezier path after the parametric path has already been created by context-clicking (right-clicking or Control-clicking on Mac OS) the property group for the parametric path (e.g., Rectangle Path 1) and choosing the Convert To Bezier Path command from the context menu. If the parametric path is animated (keyframed), the converted Bezier path is a static path based on the parametric path at the current time; keyframes are lost.
    IMPORTANT: When you use the Convert To Bezier Path command to convert a parametric shape path to a Bezier shape path, the Bezier path that is created does not animate well (i.e., interpolation between paths behaves strangely and unpredictably). This is related to path direction and how transformations are stored. For now, you should not use these converted paths for animated paths (interpolation between paths); but, if you do want to try, you may be able to work around the issues by reversing the path before conversion.

  • Applying multiple strokes with JS

    Does anybody have any idea, how to apply multiple strokes to a path with JavaScript? Assigning strokes width, caps, position in stack (my particular concern)? All i can do at the moment is to apply a single stroke. Thanks in advance!

    I'm writing a script that would generate random stroke appearences on the fly, so using premade graphic styles does not work for me. Your samples work for a single stroke and so far i can't figure out how to apply several of them to the same path. Every next setting overwrites the previos. Can't get, say, two storkes of different width and color applied to the same path.
    yourpath.zOrder (ZOrderMethod.SENDTOBACK); works in the layers stack for moving layers up and down, and i would like to move strokes in appearance tab the same way. Can't figure out how to make it either. Thank you anyway, Carlos!

  • Art brush not following path

    I have an art brush that I created to achieve an offset on an open path.  In some location the brush doesn't follow the path.  I have attached an image.  The narrow pink line is the actual path.  The thicker pink line is the art brush I created for the offset.  You can see at the top of the image what the style is supposed to look like.  Once the path starts curving towards the bottom the path and the brush get out of alignement.  I have tried adding points, which works on other types of brushes, but doesn't seem to work on art brushes.
    Any ideas on how I can fix this?  Thanks.

    It only occurs around certain curves and bends.  Here is other path with the issue.  You might be able to recreate if you draw a shape like this.  Also, I am using CS4.  I don't know if this is a bug that may have been fixed in CS5.  I don't have any effects applied to any of the strokes.  The only items listed in each line of the appearance is the stadard. "Opacity: Default"
    Sometimes if I just redraw the corner using the pencil it will help, but not always. And sometimes adding an extra anchor point at the beginning or end with help, but again not always.  It is very strange and the reason I avoid art brushes if possible.  However, I can't find other way of offsetting a stroke on an open path.

  • How do I create an automator variable for a path that includes a date?

    I like to use Image Capture to scan documents into a hierarchy of folders under my ~/Documents directory that are organized by year and document type.  For example, I have
    ~/Documents/archives/2011
         /Misc
         /Utilities
    and
    ~/Documents/archives/2012
         /Misc
         /Utilities
    for archiving miscellaneous docs and utilities bills. Now, switching folders in Image Capture is annoying so I want to use the Automator support built into that app to direct the scanned images to ~/Documents/archives/<Current Year>/Misc or ~/Documents/archives/<Current Year>/Utilities.  I was able to do this with separate Automator workflows, each with a hard-coded path to the destination folder.  For example,
    What I would like to do is use an Automator variable to dynamically determine ~/Documents/archives/<Current Year>/Misc.  I see variables for Home, Documents, and Current Year.   However, when I try to create a new path variable it only lets me choose a full path to a Finder folder.  How do I combine Documents and Current Year variables with the "archives" and "Misc" folder names to create a new path variable?

    Well now, you went and made me learn something today.  In the Variables Library, under Utilities, is a variable named AppleScript.  You can put a small script into this that evaluates to your path, for example:
    ((((path to documents folder) as text) & "archives:" & (year of (current date)) as text) & ":Utilities") as alias
    If the script evaluates to a proper path, it can be used wherever any other path can - you can experiment by looking at the results of a Get Value of Variable action.

  • How can I get the Fireworks pen tool to disengage from an open path shape (and stay disengaged)!

    I am so frustrated! I can't get the fireworks pen tool to disengage when I am finished creating an open path shape (double clicking the end-point isn't working).  The only way I can disengage the pen tool  is to click on a different tool, BUT ...if I do that (i.e., click on a different tool), and then go back to the pen tool (with the intent to create another open path shape), the pen tool automatically engages the last point of my prior open path shape ... and ... no matter what I do, I can't get the pen tool in Fireworks to stop doing this with my open path shapes.
    If anyone has any helpful advice, it would be much appreciated!
    Thank you!
    (note: I prefer not to have to go back and forth creating open path shapes in Illustrator then bring them into Fireworks, but if all else fails, I suppose I'll have to as a work-around.)

    Have you tried holding the Command key and clicking away from the last point? The Command (⌘) key will bring up the Subselection tool; clicking on the canvas with it will allow you to disengage from the path. Once you release the key, the Pen tool will return and you can begin another path.

  • How can I apply text position attributes (e.g. lower third) to more than one title at a time?

    How can I apply text position attributes (e.g. lower third) to more than one title at a time?

    jhb3243
    What version of Premiere Elements are you using and on what computer operating system is it running?
    In the case of this theoretical lower third to be applied to more than one title at a time
    a. Is there text in the lower third besides a graphic of some kind?
    b. Are all the titles to which this lower third is to be applied all together on the Timeline or scattered?
    If no text in lower third and titles all together, then, with text titles on Video 1 and lower third on Video 2, drag out the lower third to cover the length of the text titles on Video 1.
    I do not find "lower third" title files to be in the same category as certain effects where the Copy and "Paste Attributes" or "Paste Effects and Adjustments" lend themselves so well.
    Let us see what others have to say about all this. I will continue to experiment with what you seek and how you would prefer to get there. I am not optimistic but I will try.
    Thanks.
    ATR

Maybe you are looking for