Back

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

Forum Replies Created

Viewing 15 posts - 631 through 645 (of 1,338 total)
  • Author
    Posts
  • in reply to: jsx for date and month #58726

    I was already typing a long answer, but let me check this first …

    Inside InDesign when using GREP, you have to escape each special character with a backslash to make it non-special. But the backslash is also a special character for Javascript! So to get a single backslash inside a GREP expression (to make the next character special), you have to insert two of them in a Javascript string (because JS itself will replace it with one 'regular' backspace).

    In your script, as seen above, it would seem that you only used single backspaces, which is a common pitfall when copying a working GREP expression into a non-working script. But (there is always a “but”) … this forum software eats backslashes for breakfast, and to see a single one you need to insert two in your post!

    So … is there one backslash per backslash, or did you have two (and the forum ate one), or …?

    A good way to check is to remove the two commands at the very end of your script, which reset the Find/Change box to its default state. When removed, the Find/Change dialog will show the exact settings it used; and you can even press the “Find Next” button to check the Find What is still valid.

    in reply to: Print Related Q: Paper Weight Calculator? #58724

    It should be easy to calculate!

    Paper specs are usually given in “grams”, such as “80g”. That is the weight per square meter. Given the paper weight, the page size and the number of pages, I think this would suffice:

    width x height x weight x numberOfPages/2

    where width and height are in meters, weight in grams, and numberOfPages in, erm, numbers. (…) The result is in grams as well.

    You can test it with an 80 g A4 page — this should be about 5 g (1 A4 is 1/16th of a square meter, per definition).

    … I don't know exactly how much the ink weighs, though.

    in reply to: GREP styles and soft returns #58687

    .. there is a slight glitch. If I apply a soft return to the paragraph ..

    Yep — noticed this before. It seems a soft return is also picked up by “^” as a new line. Well … technically it is a forced new line, of course. The odd thing is that GREP sees it as a new paragraph, whereas InDesign treats all as a single paragraph, and always has done so. Perhaps it's a mere oversight by the programmers when they added GREP.

    If I apply a soft return to the paragraph, ie. in order to force a word to the next line ..

    Avoid that. Use non-breaking spaces (there is a default shortcut for that) or No Break (no shortcut by default, but since it's so useful I added one to my own KB set).

    in reply to: Nested Style or Grep #58677

    GREP styles cannot do this, for two reasons — you can filter on the en space and regular space at the start (why these?), but not “just on 1/8 inch indented paragraphs”. GREP styles don't “see” indents. The second reason is that GREP styles cannot apply a paragraph style (which would be a contradiction!).

    Nested styles cannot “do” this either — also for two reasons. First off, a nested style has to be applied first, and if you do that, you might as well apply the correct style right away … Second reason is, as with GREP styles, a nested style can only apply a character style.

    On “automatically”: the only 'automatic' formatting InDesign can apply is with a GREP or nested style, and the formatting it applies has to be a character style. InDesign does not apply paragraph styles automatically.

    I think you should use a simple search-and-replace — search for paragraphs with a left indent of .125″, and apply the paragraph style in the Replace.

    in reply to: GREP with character styles ? start/end of range #58631

    (?<!.)d+(?!.)

    There is a caveat emptor with this; it assumes the spaces between your “aardvarks” and “234” are also italics; if not, this GREP will find the number, because it's a number in italics without anything before or after (in italics).

    in reply to: Creating a spell check 'Report' #58584

    Hey Eugene — that fired the correct neurons! Yep, the same question: https://forums.adobe.com/thread/676743

    I experimented with aspell (a free command line spellcheck utility), but found it too cumbersome to work with — export to plain text, spell check, gather results, find original location of the errors thru' another script …

    Heath Horton of Mindsteam seems to have picked up this particular challenge, so you might visit his website and check if there is any progress.

    Try this, for the main text:

    app.activeDocument.stories.everyItem().paragraphs.everyItem().clearOverrides(OverrideType.ALL);

    I think it doesn't work for text in tables and/or footnotes, because these are part of some other internal model.

    in reply to: How to assign shortcut to Cursor Key Increments #58554

    Locating the proper folder is extremely easy, using the following trick:

    Start your InDesign, and make sure the Scripts panel is visible.

    Right-click the “User” folder; the friendly pop-up offers you the choice of one item only: “Reveal in Explorer” (Windows; Mac users will see “Reveal in Finder”).

    Windows will open an Explorer Window, with (most likely) just one folder inside it: “Scripts Panel”. Double-click that to open, and that's where the script ought to go.

    When saved in the proper place, it will immediately appear in the Scripts Panel — no re-start required!

    in reply to: Coloured box around selected text without using frame tool #58550

    Well, it works:

    — but with some minor caveats. It seems the default top offset, 0 (in your preferred units of measure), aligns with the baseline of the first line. So you have to adjust for the line height yourself — by eye, because InDesign's line height does not start on the baseline but a little below. It's similar to the “Top Paragraph Rule” in that aspect.

    Another one is that the added definitions don't appear in Tagged Text Export, INX, or IDML.

    And another one is that you can only apply it per paragraph style, trying to access it with the Paragraph panel pops up a friendly alert saying “In Next Version” :)

    But– it does What It Promises! Edit the text inside the box/border to make it more or less lines long, and the box automatically adjusts!

    in reply to: Coloured box around selected text without using frame tool #58548

    JAB:

    “Mac and Win versions available for InDesign CS3/CS4/CS5.”

    — so I bet DTPUtils will be interested to hear it doesn't work on CS3!

    in reply to: Coloured box around selected text without using frame tool #58541

    I intend to d/l the demo and try it out. The demo doesn't print, but that's o-kay by me — I'm pretty sure DTPUtils know their Page Adornments inside-out. :)

    I'll try this at home, probably somewhere in the week-end; not at work, 'cause no matter what, I'm not going to install any demo on my work machine! (What if my colleagues get a “You need this plug-in” message on every file I've made?)

    in reply to: How to assign shortcut to Cursor Key Increments #58534

    Oh whatever, I'm bored — here is a longer script with a fancy dropdown list. You can populate the list with your favourite values, and assign a keyboard shortcut to this script to have all of them at the tips of your fingers.

    (It's a Javascript; copy, paste into Adobe's ESTK Editor, and save as “NudgeNudge.jsx” into your User Scripts folder.)

    //DESCRIPTION:Set Cursor Nudge Value
    // A Jongware Script 28-Jan-2011

    var yourList = [“0.01”, “0.1”, “0.25”, “0.5”, “1”, “2”, “5”, 10];
    var val = app.activeDocument.viewPreferences.cursorKeyIncrement;
    var aDialog = app.dialogs.add({name:”Nudge Nudge (Wink Wink)”, canCancel:true});
    with (aDialog)
    {
    with(dialogColumns.add())
    {
    with(dialogRows.add())
    {
    staticTexts.add({staticLabel:”&Nudge”, minWidth:80});
    var setWidth = realComboboxes.add({editValue:val, minWidth:100, largeNudge:10, smallNudge:1, minimumValue:0.01,maximumValue:100, stringList:yourList});
    }
    }
    }

    if (aDialog.show() == true)
    app.activeDocument.viewPreferences.cursorKeyIncrement = setWidth.editValue;

    in reply to: How to assign shortcut to Cursor Key Increments #58533

    What an odd way to work :) Is that to move objects around very precisely? If I need that, I type the value right into the Control Panel position fields.

    The default Nudges include these ones:

    Nudge right — Default: Right Arrow
    Nudge right 1/10 — Default: Shift+Ctrl+Right Arrow
    Nudge right 1/10 duplicate — Default: Shift+Ctrl+Alt+Right Arrow
    Nudge right duplicate — Default: Alt+Right Arrow
    Nudge right x10 — Default: Shift+Right Arrow
    Nudge right x10 duplicate — Default: Shift+Alt+Right Arrow

    so by default you can use your standard increment, as well as 1/10th and x10 of its value — if you enter “10mm” as the default nudge, you can move around in 1 mm steps as well as 10 cm (that last one might be a bit too much).

    Here is a small script to change the values to some preset, but you need a different script for each of your values and (probably) assign a shortcut key to each of the scripts as well (since you're obviously a Keyboard Jockey, as I am!).

    This simple one-line Javascript sets the increment to whatever you fancy:

    app.activeDocument.viewPreferences.cursorKeyIncrement = “0.5mm”;

    in reply to: Adobe InDesign Tagged Text files #58532

    I meant the “Show Options” button in the “Place” dialog. The “All files” is in the file type filter list, but you won't need it if the file extension is just “.txt” as this already qualifies as an “Importable file”. (I think I added “any files” because I also tried with non-standard file extensions.)

    My main point was, if InDesign properly recognizes the file you selected as Tagged Text, it shows this dialog:

    rather than the Text Import Options where all you can do is mess with character sets and hard returns. If you get the plain text import options, you can hit “Cancel” right away, instead of waiting for ID to load a useless file.

    in reply to: Adobe InDesign Tagged Text files #58528

    I recall from a similar post on the InDesign User's forum that the secret lies in the line endings.

    Try https://forums.adobe.com/message/1304548 (it's not the one I was expecting to find, but there you go. Seems the Search Post functionality on Adobe forums is broken. Again.)

    (After remembering the Magic Keyword to Google For:) This one was it: https://forums.adobe.com/thread/746804

    In another related post I found a tip of myself ( :) ):

    “I did find out something new, tho' (for me). If you select “Show Options”, you can see right away if ID recognizes any text file as Tagged text — even though you selected it with the “All files” type. ID shows an ASCII options dialog for plain, and Tagged Text options for recognized stuff.”

Viewing 15 posts - 631 through 645 (of 1,338 total)