Script for search TextFrame whitout full text, and top align...

This script "JUSTIFY_ALING" all text frames without footnotes:
var TRUFI = app.activeDocument.textFrames.everyItem().getElements(),
     CHARLY;
while( CHARLY=TRUFI.pop() )
     if ( CHARLY.footnotes.length == 0)
          CHARLY.textFramePreferences.verticalJustification = VerticalJustification.JUSTIFY_ALIGN;
But I need that TextFrames whitout full text (for example: the text only go to the middle of the textframe) stay in TOP_ALIGN...
Thanks for read me... 

You can't tell right away if a textframe is filled all the way to the bottom. Even with linked text threads, there is usually a small space at the bottom, just not enough for an entire next line -- less than the leading of that next line. There may even be more space at the bottom, if the next frame starts with a heading, which is kept with a number of lines following it; or a large inline table or figure; or a hard page break. Or (come to think of it) a footnote -- I'm not sure what would happen then ...
But you can get the vertical position of the last regular text line. With a text frame selected:
alert (app.selection[0].lines.item(-1).baseline);
will show you the absolute vertical position of that last line. If you need the distance from the top of its containing text frame, use
alert (app.selection[0].lines.item(-1).baseline - app.selection[0].geometricBounds[0]);
-- you might remember that the array 'geometricBounds' contains the positions of top, left, bottom, and right corners, in that order. So geometricBounds[0] is the top y position; subtract this from your baseline, and you know how low you go.
In this case, you would want the distance from the last line to the bottom:
alert (app.selection[0].geometricBounds[2] - app.selection[0].lines.item(-1).baseline) ;
w
will show you how much space there is left. A warning is in place: blank lines are also lines! (Theoretically, if this happens a lot, you could adjust for these. Left as an exercise.)
All you have to do is ask yourself, what amount of white space at the bottom is allowed? Then check your frames for this, and only apply vertical justification if it's inside your parameters.
(Apologies for those weirdly cramped final paragraphs. Sorry -- tried to restore it to normal readability, failed miserably. Jive Strikes Again!)

Similar Messages

  • Mail cannot search email by full text

    Starting sometime in 10.7.2, my Mail can no longer search my emails with keywords. The only working one is search by contact.
    Spotlight can still search email by full-text, but it is barely usable for my purpose.
    Upgrading to 10.7.4 did not fix this problem.
    I have tried:
    1) vacuum mail envelops
    2) rebuilding mail boxes a few times
    3) repair disk permissions
    4) reset spotlight index
    none of them helped.
    Very frustrated and do not know how to fix this. I currently rely on Sparrow for my emails...
    Any other suggestions? Thanks!

    After creating a new user account, importing all the mails form the IMAP server to that account, and finding that full text search was broken in that new and virgin user account, too, I contacted Apple support. They walked me through repairing disk permissions and the spotlight index.
    When this did not help, they told me to RE-INSTALL 10.8.2 WITHOUT DELETING my home folder / private files. Finally, this solved the issue for me! There must have been something wrong deep within the system.

  • An attempt to install Adobe reader X on my Mac OS 10.5.8 failed, with this message: "Run preinstall script for application." What is that, and how do I do it?

    An attempt to install Adobe reader X on my Mac OS 10.5.8 failed, with this message: "Run preinstall script for application." What is that, and how do I do it?

    Hi renmusn79002737,
    Could you please try installing Reader again from the below mentioned link:
    http://get.adobe.com/reader
    Ensure that you are logged in as administrator and anti-virus is disabled as that might interrupt downloading.
    Try again and then let me know.
    Regards,
    Anubha

  • Other than screen shots, for printing purposes, I want text and photo on jpeg or .tiff formats? The printer only accepts jpeg and tiff and can't use screenshots.

    Other than screen shots, for printing purposes, I want text and photo jpeg or tiff formats

    Open the screenshot in preview and export it as a JPG

  • Contains, full text and underscore character

    Does anyone know what it takes to have a string with underscores show up in a full text index, and what the contains query would look like to get to it?  For example, something like 'IL_INTERACTIVE_LABEL'.   Should be an easy one for me to figure
    out, but the answer eludes me...
    Thank you in advance,
    John

    This is an issue of Language.  Words are broken apart based on the word breakers implemented for each language. 
    If I understand your question, you want to be able to fine (for example) INTERACTIVE from the string above.  Most languages will consider _ a tying character and will treat the whole string as a single word. Therefore the search term  IL_INTERACTIVE_LABEL
    will match IL_INTERACTIVE_LABEL.
    Just using the languages that I have installed on my server, I see that both KOREAN (1042) and THAI (1054) will break your string into 5 tokens as follows:
    il _ interactive _ label
    So you could then search for "interactive" and find it.
    But that is an abuse to the language concept and I could not recommend you depending on that approach.  Sample code below:
    SELECT 'British English', * from sys.dm_fts_parser('IL_INTERACTIVE_LABEL','2057',NULL,0)
    SELECT 'Korean', * from sys.dm_fts_parser('IL_INTERACTIVE_LABEL','1042',NULL,0)
    Other possibilities would require manipulating the data or a copy of the data, which is shot through with problems.
    If you want to search for INFIXES, there is a technique that you can use from SQL Server 2008 and forward. See an earlier post:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/d1f2b36b-bab0-4783-a82b-61d7cb45b7e4/full-text-search-with-wild-card?forum=sqlsearch
    RLF

  • How to write Java script for refering the 1st page text field from 2nd page?

    Hello I am developing an VISITOR info interactive form with webdynpro ABAP, its with 2 pages. Their heirarchy is,
    VISITOR_form
        |
        |
        |------Page_1
        |            |
        |            |
        |            |------Text_Field_A_1
        |            |
        |            |------Text_Field_A_2
        |
        |------Page_2
                     |
                     |
                     |------Text_Field_B_1
                     |
                     |------Text_Field_B_2
    Now, i have selected the 'Text_Field_B_1' of page_2 and writing the Java script, my requirement is; If Page_1's 'Text_Field_A_2' has a value of "Value_ABCD", THEN the 'Text_Field_B_1' of page_2 should be 'readOnly'. Pls let me know Wht is the Java script for this requirement?

    if (xfa.event.newText=="ABCD")
    VISITOR_form.Page_2.Text_FieldB_1.access ="readOnly";
    place script on change event of Text_FieldA_2

  • Powershell script for pinging computers from a text file and displaying output with ip address

    i am currently using the following script to display the computers that are pinging, i also want the script to display the
    ipaddress along with the results but the results are displayed not properly, i want the result to be displayed in a table or list format, what am i missing?
    $ServerName = Get-Content "C:\scripts\computers.txt"
    foreach ($Server in $ServerName) {
    if (test-Connection -ComputerName $Server -Count 2 -Quiet) {
    "$Server is Pinging "
    } else
    {"$Server not pinging"
    foreach ($server in $servername) {
    Get-WmiObject -class "Win32_NetworkAdapterConfiguration"|Select-Object IPAddress|Format-List

    Not sure I completely understand your question but looking at the code you posted I see one fairly simple change that may be what you are missing...your Get-WMIObject statement never passes a server name to the command.  You loop through the list
    you obtained but never actually pass that to anything.  So the simple change would be to just do the following...
    foreach($server in $servername)
    Get-WMIObject -class win32_NetworkAdapterConfiguration -computername $server
    | select IPAddress | FT -auto
    you could also tuck that command into the previous foreach/if/else statement and just do each one that actually responds. 

  • What is the workflow for creating templates in full FrameMaker and pushing them to XML Author?

    Hi All,
    I'm working for a large organization (3000+) that is subdivided into 60+ business units.  I'm trying to figure out the workflow for using full FrameMaker to create a template that I can provide my business units to fill in via XML Author, send back to me, and then I can publish into a number of products using the Tech. Comm. Suite.  I am somewhat new to XML so I am not sure how to get my structure and format to translate.
    Can anybody clarify what the general workflow would be for this process?  All I have been able to find is the flowchart showing full FM to XML to XML Author and back to full FM.  From my test driving of the Tech Comm Suite though it has not appeared that easy.
    ---Corey---

    Hi Corey...
    Here's a rough outline of what is needed.
    1) First, you'll need to define the data model that your documents are using. This could be some existing model like DITA or a new custom model. Depending on the complexity of your document's needs, this may drive that decision.
    2) Once you've got a model, you'll need to create a structure application (in full FM). This structure application defines the model and appearance of documents. This will provide the fundamental structure of the "template" as well as placeholder text for the elements where you want people to provide information.
    3) Then you have to install the structure application on each of the XML Author installations. This involves copying the structure application definitions file (structapps.fm) onto the client systems as well as the structure application files (into the proper location as indicated in the structure application definition). The structure application definition may reference these files at a network location, which might simplify the deployment, but would require that each person is connected to that network in order to create the files (pros/cons with this approach).
    Once that's set up, your XML Author users should (in theory) be able to create a new document using the new structure application, then send you the resulting files. Lots of hand waving here .. but that's the general idea.
    Cheers,
    Scott Prentice
    Leximation, Inc.
    www.leximation.com

  • Scripting for search/replace

    I created 6 Search/Replace items to help with changing the format of a document.  I would like to get a script that will run them in order.  Can anyone help me to do this or point me in the right direction? I'd really appreciate it. Thanks!!

    Here is my way of performing a series of find/change operations:
    First I create an array, each element of which contains a find/change pair. Then I process it in a function:
    // for text
    var myTxtReplace = [
    function replaceTxt() {
        app.findTextPreferences = NothingEnum.nothing;
        app.changeTextPreferences = NothingEnum.nothing;
        app.findChangeTextOptions.wholeWord = false;
        app.findChangeTextOptions.caseSensitive = true;
        app.findChangeTextOptions.includeMasterPages = false;
        for (i = 0; i <  myTxtReplace.length; i++) {
            var myCurArray = myTxtReplace[i];
            app.findTextPreferences.findWhat = myCurArray[0];
            app.changeTextPreferences.changeTo = myCurArray[1];
            myTextFrame.parentStory.changeText();
        app.findTextPreferences = NothingEnum.nothing;
        app.changeTextPreferences = NothingEnum.nothing;
    // for GREP
    myGrpReplace =[
                   ["[~m~>~f~|~S~s~<~/~.~3~4~% ]{2,}", " "], // Multiple Space to Single Space
                   ["--", "~_"], // Dash Dash to Em-dash
                   ["~b~b+", "\\r"] // Multiple Return to Single Return
    function replaceGrep() {
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
        for (i = 0; i <  myGrpReplace.length; i++) {
            var myCurArray = myGrpReplace[i];
            app.findGrepPreferences.findWhat = myCurArray[0];
            app.changeGrepPreferences.changeTo = myCurArray[1];
            myTextFrame.parentStory.changeGrep();
        app.findGrepPreferences = NothingEnum.nothing;
        app.changeGrepPreferences = NothingEnum.nothing;
    Another option is to use FindChangeByList.jsx script – it’s pre-installed with incopy.                   

  • What is the script for creating a word count text box that references a specific text box?

    I am working in Adobe LiveCycle Designer.
    I am trying to create an auto populated word count box that provides the word count for a given text box.  For background, it'll be used on a form for blog posts and the posts needs to be specified word lengths but will probably be edited in form as it is passed around a committee.
    I found this script: var wordCnt = new Array();var str = this.rawValue;wordCnt = str.split(" ");xfa.resolveNode("wordcount").rawValue = "There are " + wordCnt.length + " words."; and created a textbox named wordcount but when I use it I get an error stating unfound Array.
    Any help would be greatly appreciated!

    Try the LCD forum.

  • When I send a text message to my friends Trac phone, my iphone 4s sends two text(even though I am under my 160 count).  He said that it sends one full text and a second with just one word.

    When I send a text message to my friends Trac phone, my iphone 4s sends him two messages(even though I am under my 160 count).  He said that the first message is full and the second one is only one word.  Can anyone help me with this?

    When I send a text message to my friends Trac phone, my iphone 4s sends him two messages(even though I am under my 160 count).  He said that the first message is full and the second one is only one word.  Can anyone help me with this?

  • Script for check users password's expiry and email it to respective users

    Hi,
    I am a beginner in Solaris environment. Anyone have sample script to read password's expiry and email it to respective users ?
    Thanks in Advance.
    Sincerely,
    Daniel

    If you don't want to be constrained by keeping your videos super small so they can fit in an email, there are several solutions:
    1) Get a .mac account and use Web Gallery ($)
    2) Use Youtube and include a link to the video in your email (free)
    3) Use Google Video and include a link to the video in your email (free)
    4) Use VIMEO and include a link to the video in your email (free)
    There are several other video hosting services but you get the idea.

  • Support for  MS Office (esp full Outlook and Contacts) on MacBook Pro.

    I recently purchased my first Mac - a MacBook Pro.  I'm addicted to Microsoft Office (esp Outlook and Contacts) and share my Contact between my work (Windows laptop) and my personal laptop (now a MacBook).  I purchased MS Office 2008 for Mac however it didn't come with Outlook or Contacts.  When I called Apple they told me to purchase an Apple iCloud app for my old Windows based laptop ... however that's no help since my old laptop is ready to die any day now.
    Has anyone found a solution for those of us addicted to MS Office and especially Outlook and Contacts?
    By the way the Word that came with MS Office 2008 for Mac keeps crashing ... any tips on that?

    No, and there is no Publisher either, and if you are using iCloud be aware that no version of Office for Mac will work with it (except for email) no contacts, no calendars, no tasks.

  • Blurry icons and text and top bar

    Hello,
    I always keep my Mac Mini on (almost 3 months now), yesterday I used it and it was great, ofcourse I left it on overnight (as always) and when I tried to use it today desktop - icons - text - top bar even mouse courser became blurred almost double vision.
    however bottom bar (the bar has icons) are all fine, when I shut down the Mac Mini I noticed all things goes back to normal while it is turning off, and same when it starts every thing goes fine for few seconds then it happens ,as if there is an application (virus maybe) making the display blurred.
    any help will be really appreciated.
    Thanks

    Turn off Zoom from the Universal Access and Keyboard & Mouse panes of System Preferences.
    (112453)

  • "Filter/partition key" for full-text searching

    Hi there,
    We have a challenge whereby we have a table of products by store, each store having say 200,000 products.  Basically, for each store, we want to allow searching by product name.  The best solution for this is to have full-text searching, but there
    is no way to have a "filter" or "partition" key on the store ID.
    So in essence what happens, the full-text search scans the entire full-text catalog for the products, then it uses the primary key to match to the table and then filters out the other stores.  Considering we have hundreds of stores in the table, this
    is not a good solution.
    We contemplated adding separate indexed views and full-text catalogs for every store, but this would be a nightmare to manage.
    I was expecting to see some sort of a "partition by Column" in the full-text indexes, but it doesn't exist.  This basically means we have to scrap full-text and look for a third party solution.
    Does anyone have any idea how we could achieve this with just standard SQL full-text searching?

    Hi Adam,
    Thank you for your question.  I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    If you have any feedback on our support, please click
    here.
    Elvis Long
    TechNet Community Support

Maybe you are looking for

  • Call id on TV, feature is on the box but can't get it to work, at least a NY issue...

    I was told a bunch of things from a bunch of places.. Story 1: source: some ad I read) Call-id on TV needs either digital voice or a regular fios pots phone + fios internet.  I have the latter & the feature does show up on the box but when I try to e

  • Purchase requisition against budget

    Hi If a Purchase Requisition is in the system and it has been approved by managers, but it has not yet been turned in to a Purchase Order, does the value of the purchase requisition show up as committed dollars on budget? I really appreciate your hel

  • MacBook Pro virus protection

    Is there a free virus/spyware program I can get/use with a MacBook Pro?

  • Issue in form and cancel button

    Hi, I have created one customized form, on that form i have created one cancel button for cancelling the record. when i click on cancel button it is not going from form , but when i close the form and open again then wont seen. i have to cancel the r

  • I want to delete a video from iTunes

    I want to delete a video from iTunes> On This Phone > Movies. I have unsynced the movie so movie is in grey box but I cannot delete it using delete button. When I go back to List, I cannot find this video under Movies nor on my iphone. Why is this so