Back

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

Forum Replies Created

Viewing 15 posts - 1,096 through 1,110 (of 1,338 total)
  • Author
    Posts
  • Sure there is. You can use one script to run other scripts from, with the command 'doScript'.

    You will have to experiment a bit, because sometimes scripts need specific starting circumstances — mine needs the cursor to be in the first line of text to check, and when it's done the cursor is on the last line it checked. Other scripts may need the cursor to be somewhere else, or nowhere, or have a frame selected (and so on) …

    If you find yourself clicking several scripts in a row without doing anything else (that included repositioning the cursor!), you can safely chain them to run in sequence using just one script.

    The framework script should contain this line for each script to run:

    app.docScript (app.activeScript.path+'/yourScriptName.jsx');

    The path stuff is because 'doScript' needs the exact run time path of the script that it's going to run — typically, that'd be the Scripts folder in your personal User data folder. Fortunately, you don't even have to type it in, because the “active” script — the one that is running — can ask “whence it was run from” (the activeScript.path property), and if all your scripts are in the same folder, you only have to tack on the name of the script to run.

    in reply to: Strange new hidden characters #52468

    Marvellous! An entire new set of hidden codes!

    … On second thought: you don't mention it, but I bet you are working on a Mac. Unfortunately, it's “just” some font caching that went awry — and, worse, it doesn't limit itself to InDesign but may also be visible in Mail. Or so I heard.

    Can you google a bit on how to clear the font cache on your Mac? I recall it's a simple procedure but that's about it.

    in reply to: Spot colors for press #52450

    ..  they had to uncheck 'overprint preview' in acrobat to create the postscript and the plates ..

    How extremely odd.

    “Overprint preview” is a screen-only function. Checking and unchecking this will draw a certain PDF using different algorithms, but the PDF itself *will not be changed*. It certainly should have *no influence at all* on how a document is printed — that should be the same, no matter what the preview looks like.

    (Unless these printers have very unusual procedures, like using the Print Screen button to produce their plates.)

    in reply to: Tab setting problems #55445

    ID gets confused because you asked it to align everything on the “)”, and then gave it a couple of lines without.

    Try this: put a “)” on those lines, so they automatically align; then make this character invisible by setting its text color to [None].

    If you have to do this lots of times, it might be a good idea to create a character style with that color setting. If you ever have to correct the file, you can make them visible again by changing the color to something obvious (bright red or something); when done, change it back.

    After you inserted the parenthesis once and applied the style, you probably can copy it and use a GREP search-and-replace to automatically insert it into any cell that ends with a digit, rather than with a parenthesis:

    Copy the 'invisible' character; then select the entire table. Enter this in the GREP Find field:

    d$

    and this in the Replace field:

    $0~c

    Hit “Change All” to replace all “digits followed by an end-of-line” with “whatever was found, plus the formatted contents of your clipboard”.

    in reply to: Tips for working with a text black layer? #55444

    Wouldn't grouping black text with non-black objects violate the requirement that the entire text layer can be replaced with another?

    I think it would be alright to group objects to move them around, provided you ungroup them again and put everything back onto the layer where it belongs when you are done with them.

    In case you might forget to do so, it's possible to write a script that checks each and every object, moving all text frames to a layer of their own, and even ungrouping when necessary. (Just don't fiddle-diddle with some layers having Ignore Text Wrap and others don't — now that'd be a recipe for disaster.)

    in reply to: Tab setting problems #52440

    ID gets confused because you asked it to align everything on the “)”, and then gave it a couple of lines without.

    Try this: put a “)” on those lines, so they automatically align; then make this character invisible by setting its text color to [None].

    If you have to do this lots of times, it might be a good idea to create a character style with that color setting. If you ever have to correct the file, you can make them visible again by changing the color to something obvious (bright red or something); when done, change it back.

    After you inserted the parenthesis once and applied the style, you probably can copy it and use a GREP search-and-replace to automatically insert it into any cell that ends with a digit, rather than with a parenthesis:

    Copy the 'invisible' character; then select the entire table. Enter this in the GREP Find field:

    \d$

    and this in the Replace field:

    $0~c

    Hit “Change All” to replace all “digits followed by an end-of-line” with “whatever was found, plus the formatted contents of your clipboard”.

    in reply to: Tips for working with a text black layer? #52434

    Wouldn't grouping black text with non-black objects violate the requirement that the entire text layer can be replaced with another?

    I think it would be alright to group objects to move them around, provided you ungroup them again and put everything back onto the layer where it belongs when you are done with them.

    In case you might forget to do so, it's possible to write a script that checks each and every object, moving all text frames to a layer of their own, and even ungrouping when necessary. (Just don't fiddle-diddle with some layers having Ignore Text Wrap and others don't — now that'd be a recipe for disaster.)

    Laziness is okay in my book, as it makes you want to look for easier solutions!

    This script sounds like it does what you want. Your initial idea is good, but you cannot (or hardly) use the clipboard inside a javascript. So the script scans for your GREP match string (that was a good one!), and when it finds a paragraph with it, it kicks into action: it stores the found stuff in “lastMatch”, so it can compare the next paragraphs against this same value. If it's the same, the paragraph is skipped, and if the pattern *is* found but not the same, your style (I called it “LineAbove”) is applied. Then this value is used as “lastMatch”, and the loop goes around and around until the end of your text is reached.

    As it is, the LineAbove style is *only* applied when the previous and current paragraphs contain the GREP string, so it will never (I think!) be applied at the very top or very bottom of a table. Note: blank lines also 'break' this pattern, and you might or might not have had that in mind.

    Place your cursor in the first row to check, double-click the script, and stand well back.

    (Oh — sorry, David, this forum's editor can't handle medium-long scripts! No prob. — RY, download it from my site: https://www.jongware.com/binari…..er.jsx.zip — unpack, put into your scripts folder, run as above.)

    (Be sure to first change the style name somewhere near the top to yours, though.)

    Laziness is okay in my book, as it makes you want to look for easier solutions!

    This script sounds like it does what you want. Your initial idea is good, but you cannot (or hardly) use the clipboard inside a javascript. So the script scans for your GREP match string (that was a good one!), and when it finds a paragraph with it, it kicks into action: it stores the found stuff in “lastMatch”, so it can compare the next paragraphs against this same value. If it's the same, the paragraph is skipped, and if the pattern *is* found but not the same, your style (I called it “LineAbove”) is applied. Then this value is used as “lastMatch”, and the loop goes around and around until the end of your text is reached.

    As it is, the LineAbove style is *only* applied when the previous and current paragraphs contain the GREP string, so it will never (I think!) be applied at the very top or very bottom of a table. Note: blank lines also 'break' this pattern, and you might or might not have had that in mind.

    Place your cursor in the first row to check, double-click the script, and stand well back.

    (Oh — sorry, David, this forum's editor can't handle medium-long scripts! No prob. — RY, download it from my site: https://www.jongware.com/binari…..er.jsx.zip — unpack, put into your scripts folder, run as above.)

    (Be sure to first change the style name somewhere near the top to yours, though.)

    in reply to: Spanish spellcheck #55424

    The Control Panel is tool-sensitive, and for text, it even gets divided into two bars: Character and Paragraph properties. “Language” is, by default, in the Character part, and you can toggle between the two using the leftmost buttons (conveniently displaying a 'character' and a paragraph symbol). If you happen to have a wide screen, it pays off to visit the drop down menu (on the far right of the control panel). The bottom option is “Customize”, and my screen is wide enough to switch “on” everything (plus some space to spare).

    Or you can select your text and set the language using the Character Panel. If there is no “Language” drop down, the panel has its Extra Options hidden; select “Show Options” in the Panel dropdown menu to see them again.

    By the way, you don't have to create paragraph styles to set the language. It's enough to change the ones you already have.

    .. if i draw out a rectangular frame on the coloured area and try to add text to it by selecting text tool or double clicking inside the frame, the text starts at the top of page and not in the text frame as i want.

    That's a behaviour of the text tool. If you click into a previously drawn rectangle (even a single click), the text tool will convert it immediately into a text frame with, as you noticed, the cursor in the top left. I find I'm having no problems at all drawing a new frame over (“inside”) a rectangle by dragging over it.

    You will have less problems with this if you drag-and-draw new text frames outside all objects on your page, type in your text, then drag that frame to the required position.

    (Post-edit) .. since you mention “top of the page”, this suggests you have a rectangle or text frame all over your page — possibly even on your master page. Still, creating new frames outside any existing object ought to “solve” (well, “circumvent”) this.

    in reply to: Spanish spellcheck #51989

    The Control Panel is tool-sensitive, and for text, it even gets divided into two bars: Character and Paragraph properties. “Language” is, by default, in the Character part, and you can toggle between the two using the leftmost buttons (conveniently displaying a 'character' and a paragraph symbol). If you happen to have a wide screen, it pays off to visit the drop down menu (on the far right of the control panel). The bottom option is “Customize”, and my screen is wide enough to switch “on” everything (plus some space to spare).

    Or you can select your text and set the language using the Character Panel. If there is no “Language” drop down, the panel has its Extra Options hidden; select “Show Options” in the Panel dropdown menu to see them again.

    By the way, you don't have to create paragraph styles to set the language. It's enough to change the ones you already have.

    It sounds like you have set Text Wrap to be on by default, for all new objects.

    If so, it's fixed real easy:

    1. Make sure you have nothing at all selected. Using the black arrow, click outside all objects (the control panel should go grey). You can also select “Deselect All” in the Edit menu.

    2. Call up your Text Wrap panel.

    3. I bet in the top row some other icon than the first one is selected. Select the leftmost (“No text wrap”) icon.

    4. It ought to be fixed now.

    This does not effect the objects you already created, but at least it ensures you don't add any new ones.

    .. if i draw out a rectangular frame on the coloured area and try to add text to it by selecting text tool or double clicking inside the frame, the text starts at the top of page and not in the text frame as i want.

    That's a behaviour of the text tool. If you click into a previously drawn rectangle (even a single click), the text tool will convert it immediately into a text frame with, as you noticed, the cursor in the top left. I find I'm having no problems at all drawing a new frame over (“inside”) a rectangle by dragging over it.

    You will have less problems with this if you drag-and-draw new text frames outside all objects on your page, type in your text, then drag that frame to the required position.

    (Post-edit) .. since you mention “top of the page”, this suggests you have a rectangle or text frame all over your page — possibly even on your master page. Still, creating new frames outside any existing object ought to “solve” (well, “circumvent”) this.

    It sounds like you have set Text Wrap to be on by default, for all new objects.

    If so, it's fixed real easy:

    1. Make sure you have nothing at all selected. Using the black arrow, click outside all objects (the control panel should go grey). You can also select “Deselect All” in the Edit menu.

    2. Call up your Text Wrap panel.

    3. I bet in the top row some other icon than the first one is selected. Select the leftmost (“No text wrap”) icon.

    4. It ought to be fixed now.

    This does not effect the objects you already created, but at least it ensures you don't add any new ones.

Viewing 15 posts - 1,096 through 1,110 (of 1,338 total)