Skip to main content
Known Participant
January 6, 2011
Question

SplitStory script seems to be broken

  • January 6, 2011
  • 1 reply
  • 1712 views

I am typesetting a book that needs to have separately numbered footnotes for each short section; they typically end in the middle of a page, so I might have the last footnote from one section in the upper part of the page and the first of the next in the lower part.

Physically, I can get the result I want by inserting a blank 1-line split-column paragraph between the two sections, which forces the earlier note(s) to precede it. The problem is getting the numbering to start again from 1 in the new section. ID only allows section breaks at the top of a page, so I need to split the story repeatedly (potentially nearly 200 times in the whole book) whenever the section division comes in the middle of a page.

I thought the SplitStory script would do the trick, but it doesn't seem to work. Whether I have an insertion point in the text or select the frame the text is in, the script fails with the error message "AppleScript Error!    Error Number: -2741    Error String: Expected "," or "}" but found identifier    Engine: Default    File: Applications/Adobe Creative Suite CS5/Adobe InDesign CS5/Scripts/Scripts Panel/Samples/AppleScript/SplitStory.applescript".

Any advice?

This topic has been closed for replies.

1 reply

Inspiring
January 6, 2011

The script works OK here. Try opening it in AppleScript Editor (choose Edit Script from the Scripts panel flyout menu) and run it from there -- then report which lie of the script the error is happening on.

Known Participant
January 7, 2011

For some reason the faulty behavior has disappeared today. Yesterday, I restarted the computer at least once, but continued to get the same error; in AppleScript Editor the word "range" in the second line of the script proper (not counting the initial comments) was highlighted. The one major change in my system was upgrading Mac OS X to 10.6.6 overnight.

Today the script works, but it turns out it isn't doing what I need: I hadn't quite understood from the descriptive comments that it separates every frame into a separate story (as well as wiping out all overset text, which I did get). What I need is to be able to split a story into two (no more) at a precise point in the text. If I have to make that point coincide with a break between two frames, I can live with that (though it would be a heck of a lot easier if I could simply position the text cursor at the point where I want to make the break). An even better solution, which I expect is unrealistic, would be to split the story at every occurrence of a particular paragraph style. (The sections I need to split up are of variable length, often covering multiple frames.)

I have no expertise in scripting. Can you suggest a way to achieve what I'm after? Has anyone already produced a suitable script?

Thanks,

Jeff

Inspiring
January 8, 2011

You can't split a story mid-frame -- by definition, a frame can only contain one story. What a script could do is break the link between two text frames, and split the story between the two resulting text flows.