I need to go through and join hundreds of separate text frames into a unified text thread. The problem is that when I link the frames the style of the first paragraph of the frame I'm linking to ofter changes to the style of the last paragraph in the text frame I'm linking from. If I could put a frame break into the end of every text frame I could avoid this problem. The hidden character for 'end of text' looks like a hashtag. Is there a GREP for this?
Just found on the Adobe forums that \z is the character I want, and it does find all the instances, but when I try to change them for page breaks I crash my programme. Every damn time.
You can't only search for a single location placeholder with InDesign's GREP (it has its wings clipped) – although it should not have made it crash. Change the Keep Settings for every first paragraph in your stories to start in a new frame, it'll have the same result when joining.
You can use GREP for this as well. Search for
\A.
and leave the Change To field blank. In the Change To formatting field, set your new Keep options. \A matches Start of Story, and the single . is so you actually can find a (any) character so it won't crash on you again.
So I did this in the end which achieved what I wanted:
Find: (.)(\z)
Change to: $1~R
This way when I linked the text frames the styles didn't get changed.
Thanks for everyone's help, esp. user1754036 for the link to InDesign Secrets which really solved the puzzle for me.
Related
I have this little challenge.
I want to ask, how do i sort the emails using the color code (light green) as stated in this picture here
I have tried to remove the non emails by scrolling through, but i need a solution that can make it a one click through sorting.
I will appreciate your kind response.
Open the Replace dialog box and enter the following regex in the Find field:
^((.*#[^\.]*)|([^#]+))$\n
Change the radio button to Regular Expressions. This regex pattern finds any line without a dot after # or any line without a #. Note that you need the last line of the document to be empty as shown in line 7 of your document.
Since we are deleting those lines, the "Replace with" field is blank. Now click Replace All.
So, I had a pretty simple Automator task that I used from the 'Services' right-click pop-up menu in Finder that copied an image, renamed it, scaled it, then added a border around it. Worked fine for ages. The final step of it is to do the padding in an AppleScript, which starts with this incantation:
on run {input, parameters}
set this_image to item 1 of input
...
And is meant to continue with this_image set to the file path from the previous step.
Since Big Sur, I get an error
The action “Run AppleScript” encountered an error: “Can’t get item 1 of {}.”
Which seems to indicate that input is now an empty list. So — perhaps the previous action (Rename Finder Items: Replace Text) does not pass a result — or something else.
Quick search via Google does not yield any clues, except some indication that breaking changes are part of the game and Apple doesn't really indicate what would break.
Any ideas? Every other step works fine — as I single-step, the file is manipulated as expected (duplicated, renamed, scaled, etc.). It's only when it gets to this line where I expect to have a filename in order to do the padding that there's an issue.
(Also, just in case someone wants to suggest using the 'Pad Images' automator action — the padding it performs isn't my kind of padding — it puts padding around the entire image. I just put padding at the top and bottom turning a 3x2 image into a square with the image proper sandwiched between white borders, top and bottom.)
The issue appears to be at one particular text replacement step, where I attempt to replace a string with a leading space with an empty string. For some reason, that fails — I am not sure why. But, when I change that particular step ('Rename Finder Items: Replace Text') to replace any string with a leading space with another character (say, an '_') it works fine. So I am deducing that replacing something with an empty string is the culprit, but I'm not 100% sure. But, now my Automator workflow works having adjusted that particular step.
Here's how a text document in Apple Pages might be structured:
CHARACTER #1: Dialogue
CHARACTER #2: Dialogue
CHARACTER #1: Dialogue
Action description.
CHARACTER #1: Dialogue
My question:
Using Applescript, is there a way to detect that the last two dialogue entries stem from the same character, even though there is an action description in between?
CHARACTER names are defined by a paragraph style and always appear in ALL CAPS.
Many thanks for your time!
Disappointingly, the more recent versions of Pages (like 5.5.2, which I have right now) are very limited in AppleScript support. One should be able to access specific properties of paragraphs, including paragraph style (this seemed to be possible in past versions, 5-6 yrs ago), but this is not possible. You'd be better off exporting as an rtf (for example) and using a more complete script-able app -- but guess what? Pages doesn't even support exporting to RTF.
A quick bit of advice: If you do end up exporting as Word document, use the older "doc" version instead of the "docx" (under 'Advanced' setting in export), or at least test between them. docx can kill screenplay-formatted documents (which you seem to be working with).
I'd also suggest that you be more specific with your question, like what the style consists of, and any code you've actually tried (which is considered basic form here on StackOverflow).
I've been playing around with NSTextView and have applied some paragraph styles to certain lines. However, when I type enter and get a new line, the attributes that I applied to one line are bleeding into the next.
I want to be able to apply a paragraph style to one line and have the next line be formatted in the default way. You can see what I mean from the screenshots.
When I add some spacing between paragraphs via NSParagraphStyle, the same spacing applies to the newline, which makes the whole thing look pretty shotty. Basically, I am looking for a way to reset the paragraph style for an empty line.
I have tried [MyTextView resetTypingAttributes:theAttributes] to no avail, since you first have to start typing for the new attributes to apply. Just to be clear, the line below the text in the screenshot is the cursor, which is really far down there as a result of the paragraph spacing.
Screenshot:
It seems that you have to use setTypingAttributes on the textview.
The scrollbar scrolls way past the end of my class. Is there any way to adjust this? Is it just the VS convention? I can't delete the space, so it isn't carriage returns.
The reason I don't like this is that I keep accidentally scrolling past the end of my class!
I'd especially like to hear from people who actually have Visual Studio 2008 installed ;)
Either you have extra newlines (the cr/lfs Jim Anderson was talking about) in which case you can just select all the blank lines and hit delete to get rid of the extra space. The other possibility is that what you think is blank space is just the IDE letting you scroll down one page past the end of the file (until the last line of the file is at the very top of the screen). This is to let you scroll to the bottom of the file and start typing without causing the screen to scroll every time you start a new line.
Edit:
A quick glance at the other editors on my computer shows that this sort of thing is common - CodeWright will let you keep scrolling down as far as you want (pages and pages past the end of text) - although it does show the scroll bar as being all the way to the bottom when the bottom of the file is in the middle of the screen of text.
Even basic tools like Query Analyzer have this.
This is a feature (no, not a bug relabeled a "feature").
Reboot? No seriously, more information is needed.
I am guessing you have CR/LFs you you need to delete.