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

Similar Messages

  • Apply Fill Color to Group Item with Applescript

    Is it possible to set the fill color of a group item using applescript and CS3? The group contains paths and text that have the same fill color with no strokes.I am able to select the group and delete it or move it (with applescript) but have had no success in setting the fill color.
    Thank you in advance for help on this question. And thanks for everything I have picked up from browsing.

    Now that I am addressing the path items and text items of the group separately I am having some success. Now I am having difficulty getting the correct terms for assigning a Spot Color to the file. Here is a piece of the script.
    This works:
    tell application "Adobe Illustrator"
    set openDoc to document 1
    set ftClr1 to (first group item whose note is "Front3") of openDoc
    set ftClr1Paths to path items of ftClr1
    repeat with thisPath in ftClr1Paths
    set fill color of thisPath to {red:255}
    end repeat
    set textFrames to text frames of ftClr1
    repeat with thistext in textFrames
    set fill color of every line of thistext to {red:255}
    end repeat
    end tell
    Need help to set the fill color to a Spot Color that already exists in Swatches.
    Thanks
    Nick

  • I am having problems syncing my iPad 2 with iTunes. Whenever I click "sync" or "apply," the sync begins. As soon as it gets to step 3 (in this particular case "determining apps to sync") it immediately stops syncing. What's the deal here?

    I am having problems syncing my iPad 2 with iTunes. Whenever I click "sync" or "apply," the sync begins. As soon as it gets to step 3 (in this particular case "determining apps to sync") it immediately stops syncing. What's the deal here?

    You haven't purchased apps with multiple Apple ID's have you? If you have, you can only sync with one Apple ID in the iTunes library at a time. Whichever ID you are signed into on the computer and the iPad would determine which apps would sync.
    Have all of your apps been transferred into iTunes for your iPad?
    iTunes Store: Transferring purchases from your ... - Support - Apple

  • HT1296 I am facing a problem with my iPhone 4. I applied the first syncing with outlook 2007 by choosing the "merge" option. At the end of the process, some contacts are correctly sync, but most are only sync with the names. Numbers are lost. Any suggesti

    I am facing a problem with my iPhone 4. I applied the first syncing with outlook 2007 by choosing the "merge" option. At the end of the process, some contacts are correctly sync, but most are only sync with the names. Numbers are lost. Any suggestion?

    I would love to do this as well. All I need is my calendar appts from outlook. Right now I am using google calendar sync, but I would like to move to the cloud and away from google. I find it hard to believe there isn't an option to do this.

  • Apply Stylesheets with AppleScript

    I've been trying to apply paragraph style sheets using AppleScript, but nothing I try works the way I expect it.
    Here's what I'm trying:
    apply paragraph style using paragraph style "Stylesheet Name" of paragraph x of parent story of myFrame with clearing overrides
    but no formatting is applied to the paragraph. As far as I can tell, I'm following the specifications in the dictionary, but am not getting the results I expect.
    Any ideas?

    I think I figured out what's happening. I think it's a difference between the way QuarkXPress (where these scripts are coming from) handles words vs. punctuation and the way InDesign (where these scripts are being rewritten for) does.
    For example, I'm testing for a day of the week as the first word in a paragraph and then applying a stylesheet for a "calendar date" to that paragraph. Using the dateline "TUESDAY, JUNE 12" as a reference point, QuarkXPress sees word 1 as "TUESDAY" but InDesign sees word 1 as "TUESDAY,"
    That comma is a small difference, but makes all the difference between a whole head of haid and a bald one!

  • Problem with AppleScript command "Duplicate"?

    Hi all.
    I'm relatively new to AppleScript so I hope I can get some help here.
    I'm writing a script for Aperture 3.0.3 that
    1. Makes 4 new versions of the currently selected image
    2. Applies 4 different image adjustment presets to the new versions.
    3. Presents the 4 adjusted versions on screen.
    Making duplicate versions with AppleScript was easy enough, but how do I get an ID for the newly created versions? The "Duplicate" command doesn't return any information at all.
    How do I talk to image versions created with the duplicate command?
    Can anyone help?
    Message was edited by: Monostratos

    Hi,
    I'm also interested in a script like that. Have you had any success?
    I've found this site, where you can purchase a similar script:
    http://www.apertureexpert.com/storedetails/applescript-4-up-auto-levels-curves-r gb-luminance.html
    /Christian

  • Can a transform effect be applied with applescript

    I want to write a script for Illustrator that will apply a step and repeat as a transform effect based on the dimensions of the artboard. I've figured out how to get the dimensions of the artboard, but I'm at a loss as to how to apply a transform effect with a script. It looks like it might be in the Matrix suite, but none of the descriptions there make much sense to me.

    The reason I thought of a script is because it would allow me to create logic that would work on multiple repeat sizes. The files I'm working with use all different repeats. I've been using actions and styles to streamline, so this script is kind of a next step from that.

  • Problems with AppleScript and MS Office 2011

    The script below used to work great for converting MS Word files to PDF files.  However, sometime during the last few months it has stopped working and will no longer compile without error.  Possibly after upgrading to Mavericks but I'm not exactly sure when it stopped working, could have been an update to Office.  Anyway, the error I'm getting when I compile is a Syntax Error, "Expected end of line but found class name".  The editor highlights "document" in the line "set the_doc to active document".  I'm not very familiar with Applescript but I have opened the scripting dictionary for Microsoft Word in the Applescript editor and I do see "active document" as a property of the "document" object.  So why doesn't the compiler recognize it?  Am I missing something obvious or was there some sort of change in Mavericks that broke this functionality?
    I've been pulling my hair out trying to get this script working again  but I have not had any luck.  I've tried uninstalling and reinstalling Microsoft Office per instructions from Microsoft.  I have all the latest updates and patches. Any help would be greatly appreciated.
    Here is the original code which used to work just fine.
    -- Stephen Norum
    -- [email protected]
    property pdf_ext : ".pdf"
    on remove_extension(file_path)
        -- remove the extension if it exists
        set stripped to do shell script ("F=" & quoted form of file_path & " ; echo ${F%.*}")
        return stripped
    end remove_extension
    on get_pdf_path(doc_path)
        set doc_path to remove_extension(doc_path)
        -- Try the simple name first
        set pdf_path to (doc_path & pdf_ext)
        -- Otherwise, number the pdfs
        set counter to 1
        tell application "Finder"
            repeat while (exists pdf_path)
                set pdf_path to (doc_path & " " & counter & pdf_ext)
                set counter to counter + 1
            end repeat
        end tell
        return pdf_path
    end get_pdf_path
    on run {input, parameters}
        repeat with file_name in input
            tell application "Microsoft Word"
                open file_name
                set the_doc to active document
                set doc_path to path of the_doc
            end tell
            set pdf_path to get_pdf_path(doc_path)
            tell application "Microsoft Word"
                save as active document file name pdf_path file format format PDF
                close active document
            end tell
        end repeat
        tell application "Finder"
            activate
        end tell
        return input
    end run

    try this syntax:
                        tell application "Microsoft Word"
      save as (active document) file name pdf_path file format PDF
                        end tell
    Apparently they changed the enumeration label from format PDF to just plain old PDF without bothering to update the scripting dictionary or ensure backward compatibility. If you want to know how they managed to do that, they are still not using sdef or even scriptSuite xml files, but are loading the scripting information from old-school (i.e. os 8 or os 9 style) resource files.
    I've occasionally considered writing Microsoft a proposal to redo the Office scripting dictionaries so they are less crazy-making, but I'm not sure I'd survive the attempt.

  • 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

  • CS4 Master Collection - Problem Applying Updates

    Hi
    I'm running the CS4 Master Collection on Windows Vista Ultimate 32-bit, SP2.
    Normally I have no problem applying updates to the various Adobe components when they become available, however for a while now I've been unable to instal an update that's reported as being available for Adobe Media Encoder 4.1.0.
    If I run the "check for updates" manually I can download the update (reported as being 63.7MB) and when I attempt to instal it the installation process appears to run. It finishes after a while and the Adobe Updater reports "The Udating Process is Finished" in a single dialog box with a single button entitled "Quit" - which seems odd as "Quit" implies "finish earlier than planned", I'd have expected something more in line with "All done", something like "OK".
    Anyway, when I run the check for updates again I'm told about the same update implying that it wasn't applied successfully.
    I get this behaviour whether I run the update as an Administrator or not (all other updates for other products are applied without problem). I also get it regardless of whether or not I reboot the machine after trying to apply the update.
    Does anyone have any suggestions on what could be causing the problem ? I couldn't find anything obvious or obviously relevant in any of the Windows event logs on the PC.
    Thanks for any ideas
    Steve

    I am having the same problem. I found a forum that suggested this. Apparently it worked for some people, but not for me. Let me know if it does:
    1. Start -> All Programs -> Accessories
    2. Right-click on Command Prompt and select "Run as..."
    3. Run as Administrator (even if you are logged in as Admin. You need to run in the Black Command Prompt, not the White one)
    4. Run: regsvr32 JScript.DLL
    5. Then run: regsvr32 vbscript.DLL
    (dont forget the spaces, or it won't work)
    6. Then try running the set up again
    As i said, it worked for some on the forum, but not others (like me). Try it and see if works for you

  • Problem in aligning dynamic UI with the static UI

    Hi All,
    I have problem in aligning dynamic UI with the static UI, I am using Matrix layout.
    Static fields are spread over 2 colums and 3 rows:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    Now when a value is selected in C, than E becomes visible, and depending on the values selected in E, there are dynamic UI generated, i.e dynamic lables and depending on some validation it will be either a dropdowns or input fiels or both.
    at run time screen is like this:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dynaSPACEdropdown
    dynbSPACEinput field
    if I change my selection in E than layout looks like:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dynaSPACESPACEdropdown
    dynbSPACESPACEinput field
    Requirment: I need all the lables as well as dropdown/ input fiels in line with the static fields irrespective of my selection in E.
    Something like this:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dyna   SPACEdropdown
    dynbSPACESinput field
    dyncSPACESdropdown
    All this elements are in a group and that group has 2 transparent containers, 1 for static and for holding dynamic UI.
    I tried playing with the container properties, and also tried fixing width of dynamic UI but still the alignment issue is encountered.
    Can U guys plz give in ur valuable inputs as i need to fix this urgently.
    Regards,
    JJ

    Hi Armin,
    Can you please elaborate your solution ?, I do not have an idea of InvisibleElement & IWDView.resetView() ,
    If you can give me the exact pointer than it would be great and a good learning exp. for me.
    Thanks for the action assignment part, it worked.
    if (wdContext.nodeMaterialClass().size() > 0 && wdContext.currentContextElement().getActionMatCls()) {
         if (wdContext.currentMaterialClassElement().getMaterialClass_Description() != null || !wdContext.currentMaterialClassElement ().getMaterialClass_Description().equalsIgnoreCase(" ")) {
               IWDGroup Searchgroup = (IWDGroup) view.getElement("DynGroup");
    Searchgroup.destroyAllChildren();
    view.getContext().reset(false);
                                                      for (int i = 0; i < wdContext.nodeMaterialCharateristcs().size(); i++) {
                                  //this for label
         IWDLabel CharLabel = (IWDLabel) view.createElement(IWDLabel.class, "label" + i);
         CharLabel.setText(wdContext.nodeMaterialCharateristcs().getMaterialCharateristcsElementAt(i).getDescr_Char());
         CharLabel.setDesign(WDLabelDesign.EMPHASIZED);
         CharLabel.createLayoutData(MatrixHeadData.class);                              CharLabel.setWidth("154px");                              Searchgroup.addChild(CharLabel);
                 further there are conditions to create either dropdown or input field
    Can you please point where and how to apply your solution.
    Regards,
    JJ

  • The user '*' preference item in the 'User - 6th Form Students Policy {E03166E7-A848-48B5-AA93-97B848AA9C13}' Group Policy object did not apply because it failed with error code '0x80070003 The system cannot find the path specified.' This error was suppres

    I am looking at an issue with users not getting specific group policies. 
    After searching a number of client computers I found that the following error
    The user '*' preference item in the 'User - 6th Form Students Policy {E03166E7-A848-48B5-AA93-97B848AA9C13}' Group Policy object did not apply because it failed with error code '0x80070003 The system cannot find the path specified.' This error was suppressed.
    I can find the folder in the Sysvol folder on all of the domain controllers. 
    The issue with end users seems to be that the proxy settings for internet explorer is not being applied. 
    Potential problems?
    one folder in sysvol entry is empty 
    \\<server>\SYSVOL\<domain.name>\Policies\{E03166E7-A848-48B5-AA93-97B848AA9C13}\User\microsoft\IEAK\LOCK
    or is this our issue
    The old method of configuring proxy settings  to Internet Explorer 9 has changed?
    https://support2.microsoft.com/kb/2530309?wa=wsignin1.0 
    http://thommck.wordpress.com/2013/11/08/the-new-way-to-configure-internet-explorer-proxy-settings-with-group-policy/

    Hi all 
    In administering this policy I am a little confused. 
    We have a policy that distributes proxy settings in the internet explorer maintenance settings section - however when opening this policy up in GPO editor the internet explorer maintenance section is not present.
    I plan to apply the settings via User/preferences/control panel settings/ internet settings (or registry settings from article) however I am unable to edit the settings for internet explorer maintenance and these will persist. Ideas????

  • Problems selecting paper bin/source with some printers drivers

    Hi,
    I'm using CR2008 SP2 .NET SDK.
    With some printers drivers i'm unable to set the correct paper source in the print options.
    For example, if I use Toshiba e-series PLC driver (you can find it here:drivers and select, for example, the e-STUDIO281C printer).
    Even if i set the correct paper source on the report designer when i print it through code (without applying any changes to the report) the report is always printed by the default paper source defined at the printer preferences.
    The same thing happens when you do it through the designer.
    I already tried the following workaround but without any success: at the CR Designer, go to the File Menu, and choose Page Setup. Under Page Options, check the Dissociate Formatting Page Size and Printer Paper Size. This often helps with these issues. Resave the report, and see if that works any better.
    Is there any known issues with printer drivers and CR2008?
    (This thread was originally posted in [.NET Development forum|Re: Problems selecting paper bin/source with some printers drivers])

    Oops, sorry my mistake. I'll leave it here for now.
    How CR works is to get the Printer info from the DEVMODE structure, which is where the printer driver settings and configurations are saved for each printer installed.
    What I've seen plenty of times before is within the DEVMODE structure there is one area called DMExtra and in that structure it holds various custom options. Quite often the issue is we query that structure to get info but the problem lies in the driver returning an invalid structure size and therefore CR can't use any custom settings.
    Same type of issue if they use an uncommon (ENUM) value for the paper size. In code you can see this in debug mode. But if you simply pass the values as pointers and not attempt to alter them at all CR should not alter what the designer used and saved in the RPT file when the reprot was designed.
    What can happen when CR loads the printer info it fails due to problems with the printer itself. There are missing files from the install of the printer which cause Crystal to stop getting the info.
    Try this on a clean PC with no other printers installed, Install just that printer driver and then install Crystal Reports. If it still fails then we know it could be Crystal having problems with that driver. You may want to post your issue with the printer manufacturer also. They may be able to test also and determine if it is a CR or their driver issue. They can download a trial version of CR for testing.
    Trial lin is: Direct link to the Trial version: http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    If that's not an option you could purchase a support case here for one of our Engineers to escalate to R&D. If it turns out to be a CR problem then you'll get a credit for the case, if it is a printer driver problem then no credit.
    Single Case Purcahse is: http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551
    Be sure to tell them it needs to go to the Report Designer team first.
    There is also a possibilty their driver has issue with Windows OS and the .NET framework. Crystal reports is also UNICODE compliant so the printer driver would have a better success rate if their driver was also unicode compliant.
    Bottom line is if it doesn't work in Crystal Designer it won't work in code either.
    Thanks again
    Don

  • How to apply external CSS file with MyFaces Trinidad?

    In my original JSF page, I used to have
    <head>
        <link href="css/app.css" rel="stylesheet" type="text/css" />
    </head>However, after I switched to MyFaces Trinidad and used <tr:document> tag, the external stylesheet could not be applied.
    <tr:document inlineStyle="css/app.css">I wonder the external stylesheet is not applied in this way with the inlineStyle attribute. So what is the correct way of applying an external stylesheet for the whole page? Thanks.

    ...and which kind of files can be included under
    resources: [] ??
    I have a .json file that I need to be included in a template (and also included in projects created from that template).
    The only way I found to do this is to add it as a script. The problem then is that all included "scripts" will be evaluated when the page is loaded, which will fail since it's a json file. External dependencies makes it impossible for me to change the format of the json file...

  • Export PDF Workflow with Applescript and CS3

    Hello,
    I am setting up some PDF workflow with Applescript.
    On a given moment, as my script runs and after getting some user-input answers to questions in some dialogs, my script tells InDesign CS3 to open the Export Adobe PDF window for the current document. I copied and pasted that small part of the script:
    tell application "Adobe InDesign CS3"
    tell document 1
    export format PDF type to "Macintosh_HD:Test01.pdf" using "somePreset" with showing options
    end tell
    end tell
    When you run this small part of my Applescript, InDesign opens the Export Adobe PDF window (as expected) waiting for me to click on "Export". That is exactly what I want, since the user is given here a last opportunity to change some values (for example page range, or spreads). When all is set, the user can click on Export to close the dialog and finish the script.
    Problem: I was hoping that the Adobe PDF Preset "somePreset" would be selected in the first pull-down menu of the Export Adobe PDF window when this window is opened by the script. Unfortunately the last used preset is always selected by default. Anyone suggestions or help?
    Kind regards,
    Bertus Bolknak.

    My operators enter the page range and filename into a dialog box. Then I set those in the script. I use the Press Quality preset to start with and then set the changes I want into a export variable. I set things like bleed, marks, page range, etc.
    Here is an example:
    set theProps to properties of PDF export preset "[Press Quality]"
    try
    delete PDF export preset "Schmidt PDF"
    end try
    set theStyle to {name:"Schmidt PDF", acrobat compatibility:acrobat 7, bleed top:"0.125i", bleed bottom:"0.125i", bleed inside:"0.125i", bleed outside:"0.125i", page marks offset:"0.125i", include ICC profiles:Include None, effective PDF destination profile:use no profile, effective PDF X profile:"No Color Conversion"} & theProps
    make PDF export preset with properties theStyle
    set properties of PDF export preferences to theStyle
    set color bitmap sampling of PDF export preferences to none
    set grayscale bitmap sampling of PDF export preferences to none
    set page range of PDF export preferences to (item i of myPageList) as string
    export document 1 format PDF type to (PrinergyFolder & myJobNumFinal & "_" & VerCode & ".pdf") as Unicode text without showing options
    I am also doing this in Quark.

Maybe you are looking for