Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • in reply to: Smart Title Case #96365

    After double checking yours works better and exaclty what i needed. My version some still did soft returns as regular returns

    in reply to: Setting different columns width as a style #96364

    okay guys thanks! But still wondering why after 7 years this is not implemented, imean some items are. But very need items like this still need to be done by scripting, thats weird, isnt it???

    in reply to: Smart Title Case #96362

    Yes this seems to work as well. So both codes work, thats great. Now i need to dive in this stuff, so much power here :)
    With more knowledge hours of work can be solved in a couple of minutes of coding.

    Its a bit of an old thread but i find it very usefull. I seem some simularities with AS scripting and python or php code.
    I kept getting error, probably a format coding error, when the style has a space like his example Resize_Yellow Style_10mm.jsx it will give a error cause the space gets a ASCII code %20 for a space. I change line 2 which looks for %20 and replaces this with a space. The new working code for me on OSX looks like this then.

    if (app.activeScript.name.match(/_/g).length == 2) {
    cellStyleName = app.activeScript.name.split(‘_’)[1].replace(‘%20’, ” “);
    //newHeight = app.activeScript.name.split(‘_’)[2].split(‘.’)[0];
    newHeight = app.activeScript.name.split(‘_’)[2].split(‘.jsx’)[0];
    if (app.activeDocument.cellStyles.item(cellStyleName).isValid)
    app.doScript (sizeRows, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, “Undo Resize Height of “+cellStyleName);
    else
    alert (‘There is no Cell Style named “‘+cellStyleName+'”‘);
    } else
    alert (‘The name “‘+app.activeScript.name+'” should be in the format “Resize_CellStyleName_Height.jsx”!’);

    function sizeRows (){
    cellarray = app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().getElements();
    for (a=0; a<cellarray.length; a++)
    if (cellarray[a].appliedCellStyle.name == cellStyleName)
    cellarray[a].height = newHeight;
    }

    in reply to: Setting different columns width as a style #96356

    2017 and tables styles are still a joke! Do we really need to redo tables if we need to adjust the width. How about doing 200pages adjusting the width!!!! pfffff

    Does anybody know a trick? My idea was object style and do something about the warning i would get if the table is to wide

    in reply to: Smart Title Case #96347

    I think i found it i replace +~j to \r, so it look at the paragraph letter??? Seems to work. So now the code is ^.\r|[\w-] this will automatically Sentence Case a Paragraph

    in reply to: Smart Title Case #96345

    I found this post looking for a proper Sentence Case method. Found a post and editing it a bit i got it to work i think.
    You make a Character Style CAPS with Caps as Casing of course. Then make a Paragraph Style with a grep using; ^.+~j|[\w-] If you add a + on the end it will take the complete word and make this TITLE Cased. Handy for index or so.

    But now i still need a version which takes the first word in a sentence and not per row.

Viewing 7 posts - 16 through 22 (of 22 total)