How can I find the longest line in an InDesign document?
Is there a script that locates the longest line in an InDesign document?
Hello
I area with Vamitul (Welcome back, long time no see) that the smaller Panel is fairly trivial.
Not sure what Vamitul what you were asking about the block of code on the forum.
I just want to reaffirm it as a loop will be several times faster than sort on the same short document.
#targetengine longestLine var docLines = app.activeDocument.stories.everyItem().lines.everyItem ().getElements(), l = docLines.length, lineLength, longestLines = [], longestLineLength = 0, multi; while(l--) { if ((lineLength = docLines[l].characters.length) >= longestLineLength) { if (lineLength === longestLineLength) longestLines.push(docLines[l]); else longestLines = [docLines[l]]; longestLineLength = lineLength; } } multi = longestLines.length ; if (multi == 1) longestLines[0].select(); else { var n = 0, w = new Window ('palette'), b1 = w.add('button', undefined, "Next"), b2 = w.add('button', undefined, "Previous"); w.show(); b1.onClick = function () {selct(1)}; b2.onClick = function () {selct(-1)}; function selct (next) { n = (n + multi + next) % multi; longestLines[n].select(); } }
Concerning
Trevor
Tags: InDesign
Similar Questions
-
TypeError: Error #1009: How can I find the exact line of the error?
I got the following error when testing a project:
[SWF] ProjectZ_iOS.swf - 12154544 bytes after decompression
TypeError: Error #1009: cannot access a property or method of a null object reference.
at ProjectZ_iOS_fla::MainTimeline/goButtons() [ProjectZ_iOS_fla. MainTimeline::frame71:54]
I don't know how to read what there isn't any 'framework' 71 Moreover, that means this average, 'MainTimeline::frame71:54 '?
Since no one has mentioned, the line number is 54. Field 71, line 54.
-
How can I find the number of pixels is in my photos of the ipad? I sell on ebay and they have new requirements for the photos. 500 pixels on the longest side. Is it possible to increase the pixels on already took pictures?
See if this application works for you > https://itunes.apple.com/us/app/image-size/id670766542?mt=8
-
Half of my Word document disappeared while I was working on it. I tried to use the back arrow to recover, but Word is closed. How can I find the history of the document so I can revert to a saved version the earlier?
I hope that you have a Time Machine backup that you can use to revert to a previous version. If it is then maybe you shared the document with someone else by e-mail and get get an old copy of your sent e-mail.
-
How can I find the music marked with an exclamation point in my itunes library?
How can I find the music marked with an exclamation point in my itunes library?
Hello there rdgernnr!
I certainly don't want to find the songs that show the "!" and get them to play correctly. If you have not yet done it, read this article: If you see an exclamation point next to your items in iTunes - Apple Support
More precisely:
Correct the path of the media file
Follow these steps to help find the correct location of the file iTunes media:
- In iTunes on your Mac or PC, select the song, album, movie, or television show that has the exclamation next to him.
- In the MenuBar at the top of your screen, computer or at the top of the iTunes window choose Edition > read the information.
If you are using Windows and you don't see the menu bar, Learn how to turn it on. - When you see a message asking if you want to locate the file, click search.
- If you know the location of the file, point to it iTunes and try to read your content.
- If you do not know the location of the file, search for it:
Mac: Press ⌘ and space control your keyboard, and then type the name of the movie title, app, song, album or artist.
Windows: Press the Windows on your keyboard, and then type the name of the movie title, app, song, album or artist. If your keyboard does not have a Windows key, press the Escape (Esc) and control (Ctrl) on your keyboard. - If the file is on a network drive or external, plug on the volume of disk or external network.
- If you find your objects in the trash or recycle bin, restore them to their previous location:
Mac: Control-click or right-click on the item and choose put back.
Windows: Right-click on the item and choose restore.
- Once you retrieve the file, use Get new Info to locate the file, and then point iTunes to the correct location.
See you soon!
-
When I get a bookmark and you think how can I find the folder it is in?
I click Favorites, and then click Show all bookmarks and use the favorite search box at the top right. I type in the name of the
I'm looking for bookmark and considers appropriate. How can I find the folder it is in?Without an extension, a possible way to proceed is to open the bookmark in a tab (possibly offline), then click the star on the Navigation toolbar to open the dialog box "Edit this bookmark" that shows the folder.
-
How can I find the installed version of Firefox?
How can I find the installed version of Firefox?
You run v33 right now. But you can still check two ways
- Click on the
button-> then the help icon (?) then on Firefox
- Type of topic: in the address bar
- Click on the
-
How can I find the IP address of my MacBook pro
How can I find the IP address of my MacBook pro
-
Question
My drop down bookmark does not offer 'manage bookmarks '. All the support I can find that this is how to change the bookmarks. How can I find the link manage if this isn't in the drop-down list?In Firefox 4, "Organize bookmarks" was changed to "Show all bookmarks" to open the library window.
-
How can I find the serial number if I can't go to the back of the phone?
How can I find the serial number if I can't go to the back of the phone?
Two ways
Settings - general - or about
Connect iPhone to iTunes and to see in the summary OR section
Sign in here
(1211)
-
How can I find the album/albums in that picture in my library is included? I want to have all my photos in my own albums.
This isn't a feature of photos - tell Apple what you want - http://www.apple.com/feedback/photos.html
You can find all the photos are not in any album - file menu ==> new album, smart album is not a
LN
-
How can I find the dpi of the iPhoto?
How can I find the dpi of the iPhoto?
The pictures in iPhoto have no assigned dpi. They are just a matrix of pixels and a width in pixels and a height of pixel.
When you export a photo from iPhoto, it will create an image file that may have assigned IP. You can see the dpi values when you open photo exported preview and open the Inspector in the Tools menu. For example, this picture has been exported with 180 dpi. But more important than the CIO is the size in pixels. It will show you the quality of the photo.
-
How can I find the phone number of an ipad nano sim?
How can I find the telephone number of a mini ipad nano 4 sim?
Look in settings - general - about
-
How can I find the history of the app on itunes or the app store for my iphone 5? I got an iphone 5s and it broke... now I have another but want to see the history of my old phone apps.
If you are connected to the same Apple ID you used with the old iPhone, just open the App Store App and look in the tab under purchased for applications updates.
And less... More-> purchased in the iTunes App for music, movies etc...
-
How can I find the code for the iTunesi
How can I find the ocated
What is the code you are looking for?
Maybe you are looking for
-
WiFi work stopped on Time Capsule, but manages to get internet
Part of our time Capsule Wifi stopped working in our office. He continues to receive internet because everything that is connected to the internet can connect properly, including our VoIP phone system. It just seems to be the Wifi on the Time Capsu
-
If the internal hard drive dies this affect router/WiFi? I know that this seems to be a strange question. Logically, they seems to be two independent functions. However, since I do not understand how it works... I plan to spend my old airport extr
-
HP 550-119ea Bios password recovery
Hello I had trouble with my BIOS. I would like to install ubuntu and to do this, I need to turn off secure in the bios boot. The thing is, when I bought the computer, I stupidly added a BIOS password, and now I can not remember. I guessed all of my u
-
Where are the files created in Microsoft Visual C++ 2005 Setup logs?
Hello Where are the installation saves the files created in Microsoft Visual C++ 2005? I checked the temporary directory and couldn't find the logs for Microsoft Visual C++ 2008. Thank you!
-
Photosmart 6520: my printer (photosmart 6520) does not print in black
Hello, my printer aged 2 years does not want to print in black for 1 week. I tried everything to solve the problem is : head cleaning cartridges, printer reset , purchasing new ink cartridges ( ink hp orininal ) color settings when printing , diagnos