Apply stroke to text (JS, CS2 or higher)

Hi all,
I'm having some problems applying a 3 points red stroke to a text layer using JS on PS-CS2 (or higher).
I've tried adapting xbyto's script ( http://ps-scripts.com/bb/viewtopic.php?p=2021#2021 ), but to no avail.
Any help is appreciated.
Cheers.

The script in that post is for doing fine grain control of text styles within a text layer. If all you want to do is apply a 3px red stroke to the entire text layer, use a layer style and script listener code. You'll end up with something like this:
function stroke3pxRed() {
  function cTID(s) { return app.charIDToTypeID(s); };
  function sTID(s) { return app.stringIDToTypeID(s); };
    var desc39 = new ActionDescriptor();
        var ref13 = new ActionReference();
        ref13.putProperty( cTID('Prpr'), cTID('Lefx') );
        ref13.putEnumerated( cTID('Lyr '), cTID('Ordn'), cTID('Trgt') );
    desc39.putReference( cTID('null'), ref13 );
        var desc40 = new ActionDescriptor();
        desc40.putUnitDouble( cTID('Scl '), cTID('#Prc'), 100.000000 );
            var desc41 = new ActionDescriptor();
            desc41.putBoolean( cTID('enab'), true );
            desc41.putEnumerated( cTID('Styl'), cTID('FStl'), cTID('OutF') );
            desc41.putEnumerated( cTID('PntT'), cTID('FrFl'), cTID('SClr') );
            desc41.putEnumerated( cTID('Md  '), cTID('BlnM'), cTID('Nrml') );
            desc41.putUnitDouble( cTID('Opct'), cTID('#Prc'), 100.000000 );
            desc41.putUnitDouble( cTID('Sz  '), cTID('#Pxl'), 3.000000 );
                var desc42 = new ActionDescriptor();
                desc42.putDouble( cTID('Rd  '), 255.000000 );
                desc42.putDouble( cTID('Grn '), 0.000000 );
                desc42.putDouble( cTID('Bl  '), 0.000000 );
            desc41.putObject( cTID('Clr '), cTID('RGBC'), desc42 );
        desc40.putObject( cTID('FrFX'), cTID('FrFX'), desc41 );
    desc39.putObject( cTID('T   '), cTID('Lefx'), desc40 );
    executeAction( cTID('setd'), desc39, DialogModes.NO );
-X

Similar Messages

  • Apply stroke to text and object

    Hi,
    A little doubt..I didn´t find the stroke properties to size, kind ans so on..just color border.
    Is there this features in Edge?
    Regards

    Hi,
    Solutions: GreenSock code or css code.
    You write directly css code.
    Or you load GreenSock [TweenLite] using yepnope to write css code via TweenLite

  • In a pages document can I copy a ruler and apply it to text elsewhere in the document

    While working in a pages document can I copy a ruler and apply it to text elsewhere in the document?  I'm using Pages '09, Version 4.1 (923), on a MacBookPro with OS X, version 10.6.8.  I've tried pages help, but I haven't found an answer to this question.

    click in the text you wish to copy from > Menu > Format > Copy Paragraph style > click in the text you wish to copy to > Paste Paragraph Style
    The keyboard shortcuts are option command c and option command v
    You can also Copy/Paste Character Styles.
    Better to create real Styles in the Styles Drawer. Using the above method is slower and will lead to inconsistent styles that you can not universally correct or change.
    Peter

  • Easiest way to add a double stroke to text / or object in  Illustrator 10

    New to the forum and wondered if someone can help me find a solution in adding a double stroke to text or an object? I have illustrator 10 (Mac). Thanks Also, should I be in a different forum section or is this correct?

    Go to window/appearance and add as many strokes and fills you want, and reorder as you need
    here you can see a movie on how it works, no matter the video is in AiCS3, works the same in Ai10.
    http://www.adobe.com/designcenter/video_workshop/
    look under de illustrator product "Using the appearance panel and efects"
    http://marizmendi.googlepages.com/index33

  • Adding stroke to text in Flash CS4?

    But I can't figure this out or find it anywhere.
    How do you add/edit stoke on text in Flash CS4??
    Thanks.

    G.Bob,
    > How do you add/edit stoke on text in Flash CS4??
    The closest you can get to a stroke on text is either to a)
    break apart
    the text into a series of shapes and then use the Ink Bottle
    tool to add
    stokes to those shapes or b) use a very strong Glow filter.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • How to add double stroke to text or an object?

    I have illustrator 10 (MAC). Wondering the easiest way to add a double stroke to text or an object? Also, how can I move the stroke so its not necessarily on the outside of text? Was thinking more of an outline with separation between the two colors on the double stroke. Thanks

    I'm not really an expert in user-land Illustrator so I'm not always up-to-speed on the terminology -- what do you mean by 'double stroke'?
    Assuming you're talking about doing this in code, I *might* be able to help you on this but it's been a couple of years since I used the pre-CS text engine. I'd be more likely to be able to help you if this was CS+, but I can try.
    If you're talking about doing it through the GUI as a user, I'm the last guy you want to ask :)

  • Photoshop CC designs compatible with CS2 or higher?

    I create designs with Photoshop CC which include layers, fonts, clipping masks and graphics (with transparent background). Not complicated at all. But are they 100%compatible with CS2 or higher?

    You can't have the cake and eat it. Layered TIFFs share the same limitations like native PSDs, since all that happens is that redundant data is embedded that can be interpreted by PS, but no other program, and different versions of PS will still only be able to handle this stuff based on what features they have. You can of course always rasterize and flatten layers, but I suppose that defeats the purpose of selling templates. In the end, you will have to do your own testing and verification. Going from CC to CS6 might be okay, but going further back is definitely going to result in loss of editability. You simply can't make everyone happy.
    Mylenium

  • Unable to apply hyperlink to text

    I am new to Muse. Can someone explain to me what I need to do (see attached image). I want to apply hyperlink to text elements and I don't understand how to change the text frame to not require rasterisation. Please help.
    Chris

    The font or typeface you are using in that paragraph where you're trying to make a hyperlink is a system font and not a a "Web Safe Font" or a supported Tyepkit font.
    Unless you use a Web Safe font or install a Muse supported TypeKit font when designing or laying out your web page - Muse will turn these words into images to preserve their appearance ( since not everyone else has that font that you like as above, installed on their computer )  and since they have been turned into images, they can't be used to make hyperlinks.
    Web Safe Fonts:
    http://www.speaking-in-styles.com/web-typography/Web-Safe-Fonts/
    http://www.wpdfd.com/issues/87/knowing_about_web_safe_fonts/
    Typekit Fonts supported for Muse
    http://museinsider.com/how-to-add-typekit-fonts-to-your-muse-site.html
    http://tv.adobe.com/watch/adobe-inspire-magazine/using-typekit-with-adobe-muse/

  • Message, "Hyperlinks applied to a text inside a rasterized frame cannot be exported..."

    I have begun hyperlinking text in my adobe muse site I am currently designing. When I try to hyperlink, I get a message, "Hyperlinks applied to a text inside a rasterized frame cannot be exported..."
    How do I change the text frame to not require rasterization?
    Thanks.
    -Kelly

    Hi Kelly,
    Could you please try some suggestions mentioned in the following posts
    Problem with Muse -- Warning message on preview re: rasterization
    How do I "change the text frame to not require rasterization"? Hyperlink problem
    Do let me know if you have any issue further.

  • Find & Replace the text and apply paragraph style in indesign CS2.

    Hai below script are working in cs4 - cs5.5. i need to run the script in indesign cs2.
    can you please help.
    Main();
    function Main() {
        var foundItem;  
        var doc = app.activeDocument;
        //app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;
    app.findTextPreferences.findWhat = "^p";
           //app.findTextPreferences.appliedParagraphStyle = "head";
        var foundItems = doc.findText();
        for (var i = 0; i < foundItems.length; i++) {
            foundItem = foundItems[i];
            foundItem.applyParagraphStyle(doc.paragraphStyles.item("content body indent"), false);
         app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
         var myDocument = app.activeDocument;
    //Clear the find/change text preferences.
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeTextOptions.caseSensitive = false;
    app.findChangeTextOptions.includeFootnotes = false;
    app.findChangeTextOptions.includeHiddenLayers = false;
    app.findChangeTextOptions.includeLockedLayersForFind = false;
    app.findChangeTextOptions.includeLockedStoriesForFind = false;
    app.findChangeTextOptions.includeMasterPages = false;
    app.findChangeTextOptions.wholeWord = false;
    //Search the document for the string "copy" and change it to "text".
    app.findTextPreferences.findWhat = "^p";
    app.changeTextPreferences.changeTo = "^p";
    myDocument.changeText();
    //Clear the find/change text preferences after the search.
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;
    abc();
    function abc() {
        var foundItem;  
        var doc = app.activeDocument;
        //app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;
    app.findTextPreferences.findWhat = "*";
           //app.findTextPreferences.appliedParagraphStyle = "head";
        var foundItems = doc.findText();
        for (var i = 0; i < foundItems.length; i++) {
            foundItem = foundItems[i];
            foundItem.applyParagraphStyle(doc.paragraphStyles.item("RealEstate"), false);
         app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
         var myDocument = app.activeDocument;
    //Clear the find/change text preferences.
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeTextOptions.caseSensitive = false;
    app.findChangeTextOptions.includeFootnotes = false;
    app.findChangeTextOptions.includeHiddenLayers = false;
    app.findChangeTextOptions.includeLockedLayersForFind = false;
    app.findChangeTextOptions.includeLockedStoriesForFind = false;
    app.findChangeTextOptions.includeMasterPages = false;
    app.findChangeTextOptions.wholeWord = false;
    //Search the document for the string "copy" and change it to "text".
    app.findTextPreferences.findWhat = "*";
    app.changeTextPreferences.changeTo = "";
    myDocument.changeText();
    //Clear the find/change text preferences after the search.
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;
    ab();
    function ab () {
        var foundItem;  
        var doc = app.activeDocument;
        app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;
        app.findTextPreferences.findWhat = " ^ ";
    app.changeTextPreferences.changeTo = " ";  
        //app.findTextPreferences.appliedParagraphStyle = "head";
        var foundItems = doc.findText();
        for (var i = 0; i < foundItems.length; i++) {
            foundItem = foundItems[i];
            foundItem.applyParagraphStyle(doc.paragraphStyles.item("day"), false);
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.NOTHING;
         var myDocument = app.activeDocument;
    //Clear the find/change text preferences.
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeTextOptions.caseSensitive = false;
    app.findChangeTextOptions.includeFootnotes = false;
    app.findChangeTextOptions.includeHiddenLayers = false;
    app.findChangeTextOptions.includeLockedLayersForFind = false;
    app.findChangeTextOptions.includeLockedStoriesForFind = false;
    app.findChangeTextOptions.includeMasterPages = false;
    app.findChangeTextOptions.wholeWord = false;
    //Search the document for the string "copy" and change it to "text".
    app.findTextPreferences.findWhat = "^";
    app.changeTextPreferences.changeTo = "";
    myDocument.changeText();
    //Clear the find/change text preferences after the search.
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;

    @s_ashok – you'll find the right methods and properties in the CHM file for InDesign CS2 at:
    http://www.jongware.com/idjshelp.html
    Just a few hints:
    InDesign CS2 does not support GREP search/replace, so every line in your code that points to GREP does not work.
    Further: "app.findTextPreferences" and "app.changeTextPreferences" were "app.findPreferences" and "app.changePreferences" in InDesign CS2. And then there were no "findChangeTextOptions" or any counterpart for that in CS2…
    That should get you running…
    I have no InDesign CS2 installed to debug, so this is all I can say…
    Uwe

  • How do I turn off automatic stroke on text ?

    Using CS6
    Am unable to colour any text without that colour selection being applied as a stroke
    Have clicked the "formatting affects " T button on the swatch panel and on tools panel.
    Have looked in styles and turned off  all stroke instructions that i can find
    Cant make multiple text selections within a paragraph, whats going on here, thats a basic requirement
    Driving me nuts on what is an already very unintuitive application for the most part.
    Help ! please

    Had already checked those and made  no difference, tried all combinations.
    even looked at some screen shots of other peoples setup to make sure I was doing things correctly but no dice.
    Have now deleted my preferences file, restarted and all is back to normal.
    A quick stay at Hotel Last Resort never fails !

  • Stroke bug in ILL-CS2 (?)

    Hi all,
    I think I might have discovered a bug in Illustrator CS2's stroke weight handeling by Javascript.
    The bug is that when there is no stroke at all (ie. stroke weight is "0 pt" or empty), JavaScript reports it as being "1". It also reports the stroke weight as being "1" when it is actually 1 pt.
    I've written this simple script to verify it:
    ] myCharAttribs = app.activeDocument.textFrames[0].textRange.characters[0].characterAttributes
    ] alert(myCharAttribs.strokeWeight)
    Results: when the first char in the text frame has a stroke of "0 pt", the result is "1".
    when the first char in the text frame has a stroke of "1 pt", the result is "1".
    when the first char in the text frame has a stroke of "6 pt" (for example), the result is "6".
    Can anyone else verify this? Also, is there a way to solve this problem?

    Keep in mind there are many textranges per textframe, usually one per character. Textrange 8 might have a different stroke value than textrange 9.
    app.activeDocument.textFrames[0].textRanges
    Checking the stroke color is another important item to check if you want to be sure a textrange isn't stroked:
    if( tf.textRange.characters[0].characterAttributes.strokeColor == "[NoColor]" ) {
    $.writeln( "I am not stroked" );

  • Problem applying stroke miter limit with applescript

    Hi, I have a bit of a problem with applescript, Im creating a Text item and setting the stroke to 0.4pt then i want the stroke miter limit to be set to 2 but it wont work i get :-
    Adobe Illustrator got an error: Can’t set properties of text frame 1 of layer 1 of document 1 to {stroke miter limit:2}. (error -10006)
    but im am able to apply a stroke miter limit of 2 on a path item, is there a way of converting the text frame to a path item then applying the stroke miter limit to it.
    heres my script :-
    on TicketFront_(posX, posY)
         tell application "Adobe Illustrator"
              activate
              set ticketItem to make new text frame in theDoc with properties {contents:{"Some Text"}, position:{(35.7 + posX) * 2.834645, (173.5 - posY) * 2.834645}}
              set properties of the text of ticketItem to {text font:text font "Raleway-Thin", size:5.54, justification:center, fill color:{class:spot color info, tint:100.0, spot:spot "PANTONE 4535 U" of document 1}, stroke color:{class:spot color info, tint:100.0, spot:spot "PANTONE 4535 U" of document 1}, horizontal scale:126.46, stroke weight:0.4}
              --This next line gives me the error
              set properties of ticketItem to {stroke miter limit:2}
         end tell
    end TicketFront_
    ive also tryed putting convert to paths ticketItem in the script which converts the text to paths but the stroke miter limit still dont work.
    Thanks in Advance.
    uk_rules_ok

    you're not targeting the paths yet, you have to drill down to the letters (paths)
    textFrame to Outlines returns a Group
    inside this group you have compound paths
    inside each compound path you have the actual paths, one or more, depending on the letter
    try something like this, (not actual code, I'm just guessing)
    set ticketGroup to convert to paths ticketItem
    set ticketCompoundPath to first compoundPath in ticketGroup
    set ticketPath to first pathItem in ticketCompoundPath
    now you can set the miter limit property of ticketPath

  • Clicking a Paragraph Style Does Not Apply Style to Text

    I just switched from a PC to a brand new MacBook Pro (OSX Lion 10.7), and I bought InDesign CS5.5. I have been using CS4 on a PC for a couple of years and had no issues. For some reason, I cannot apply Paragraph Styles by placing my cursor in the text and clicking the Paragraph style. It highlights the clicked style for a moment, and then de-highlights all the styles, but does not apply any changes. The only way I can apply a Paragraph Style right now is by right clicking the style and selecting "Apply..." from the drop down menu. It's very puzzling. I was wondering if anyone had any experience with this. I also have Microsoft Office: Mac 2011 installed on the laptop if that makes a difference to anyone. Any help would be greatly appreciated, since I typeset and edit for my living, and this problem is slowing me down a bit.

    Neither. Let's say I click into a paragraph. The current style will be highlighted. If I click on another style (or even attempt to re-apply the same style by clicking on it in the styles pane), it momentarily highlights the new style, then flashes a little bar underneath (like the one that shows up if I were to try to re-organize the styles list by dragging a style to a different pace in the styles list), then all the styles become unselected, but no changes have been applied to the paragraph in question. Very definitely not normal. It is almost as if the pane assumes that I am attempting to drag the style even when I am merely clicking on it. Very weird.

  • Using InDesign CS6, why does a drop shadow applied to a text box, cause a photo on the same page to

    I thought it was just a screen appearance so I made a pdf and the photo is lighter here too.  I've never had this issue with CS5.5 or earlier.  Drop shadows were able to be applied to one object without affecting others on the page. Is it a bug? Is there a setting I'm missing?  Thanks!

    Overprint preview didn't stop the lightening of the photo.
    A google search turned up the suggestion to change the transparency blend space to RGB, which worked in InDesign.  When I make the pdf (no color conversion) it looks ok. But when turning on Output Preview in Acrobat, the photo lightens again.  Weird and frustrating - I'm not sure what the final output will look like. 
    Is Transparency Flattener set at High res an option?
    I appreciate your help!
    Anne

Maybe you are looking for

  • Can someone tell me how to connect my MacBook directly to my DSL cable modems BYPASSING by wireless connection?SING

    Hi all.  Can someone tell me how connect my MacBook directly to my DSL cable modem bypassing my wireless connection?  thanks in advance.  (the Maverick upload that was pushed out last month will not load for me -- keeps starting and stopping.  just r

  • ODBC Timeout problem.

    I am trying to use the query timeout of the ODBC specification while accessing an Oracle 8i database from within a client code written in MS Visual C++ 6.0. I use Oracle's ODBC driver version 8.01.07.810. (Microsoft's ODBC driver for Oracle does not

  • Letter of guarantee

    dear all; does anyone knows the configuration of letters of guarantee???? thnx in advance

  • Where can I try Oracle Forms developer online?

    Hi all, I m asking where on the web I can try Oracle Forms over web with limited spaces (1-2 or 10 mBytes) (somethink like http://htmldb.oracle.com/pls/otn/f?p=4550:1:87132331039537) Best regards Gordan

  • Need help in date coversion

    Hi, I have a date format which is varchar2 and value is like 2009-03-31..i need to convert to date and it shouldbe like 31-MAR-09 i am getting like 0RA-01981 error..please help me in that