Script that will show the character count of all carriage resturns

I have found a bug when exporting an indd to idml. If a a carriage return falls in a character count that is a multiple of 8000 + 1 it is converted to a paragraph separator (u2029). I am in the process of mass exporting around 3000 files to idml for a project. I am trying to come up with a way with a script to check the files to see if carriage returns exist in these locations. I am fairly new to scripting and don't know how this would be done. I know it is possible to get character counts but is it possible to check if a character exists in a certain character count from the beginning of a story? Any help on this would be appreciated.
Also has anyone else ran into this with exporting to idml? I have submitted a bug report. This is can be recreated across multiple computers, OS's and versions of InDesign.

@Blujely – about your initial question about showing a specific character at an n-th position in a story, you could use a simple GREP search in InDesign and restrict that search to a specific story (e.g. the story of a selected piece of text):
Search for the n-th position with the formular in dummy-syntax:
Positive look behind of any character in the exact length n-1 + character
E.g. if you want to look for a "carriage return", defined in GREP as \n at every 10th position, search for:
(?<=.{9})\n
In your case that would be:
(?<=.{8000})\n
Uwe

Similar Messages

  • Simple script that will export the coordinates (layer bounds - top left x,y)

    Hi,
    I'm looking for a simple script that will export the coordinates (layer bounds - top left x,y) of the layers to an seperate xml/txt file.

    Your screen capture looks like it's from Photoshop.
    In InDesign sub layers are page items, the containing layer has no dimension. So you could get all the page item's x, y, width, height. But you might have to consider groups and then the layering could be very complex. The stacking order could also get complex. Page items have an index, but it's relative to its parent container.

  • I need a script that will find the computer a user last logged into.

    I am still learning scripting, I need a script that will allow me to pull in usernames from a csv file. Find what computer they last logged into and output that to an csv file.
    I have looked all over and can't find exactly what I need.
     I found the following script but I need  to add the resuitsize unlimited but can not figure out where to put it we have a large environment. Also I need to be able to grab username from a csv file. Any assistance you can provide is appreciated.
    ##  Find out what computers a user is logged into on your domain by running the script
    ##  and entering in the requested logon id for the user.
    ##  This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ##  snapin  http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null){
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username}
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null){
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username}
    get-username resultsize unlimited
    $computers = Get-QADComputer | where {$_.accountisdisabled -eq $false}
    foreach ($comp in $computers)
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
      $Reply = $null
      $Reply = $ping.send($Computer)
      if($Reply.status -like 'Success'){
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username){
    write-host "$Username is logged on $Computer"

    If you are querying by user "resultset size" will be of no use.
    You also have functions that are never used and the body code doe snot look for users.
    Here is what you scrip looks like if printed well.  It is just a jumble of pasted together and unrelated items.
    ## Find out what computers a user is logged into on your domain by running the script
    ## and entering in the requested logon id for the user.
    ## This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ## snapin http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null) {
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null) {
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username
    get-username resultsize unlimited
    $computers = Get-QADComputer | where { $_.accountisdisabled -eq $false }
    foreach ($comp in $computers) {
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
    $Reply = $null
    $Reply = $ping.send($Computer)
    if ($Reply.status -like 'Success') {
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username) {
    write-host "$Username is logged on $Computer"
    I suggest finding the original code then use the learning link at the top of this page to help you understand how it works in Powershell.
    ¯\_(ツ)_/¯

  • Need a program that will save the capacity settings for all storage bins

    Hey all,
    I would really apprecaite any help with a program I am trying to come up with.
    What I need to do is create a program that:
    1. Will save the capacity settings for all storage bins to
    a file
    2. Then update them all to allow unlimited capacity BUT be able to revert back to the
    original that was saved.
    Any suggestions about possible existig reports that I may be able to modify to suit my needs, or where to start from if I have to do this from scratch?

    I know I'm talking about expensive apps, but having been in prepress for about 30 years now, I really don't look at anything other than Quark XPress or InDesign for page layout apps. Your printing vendor will also be much happier with you when you use these products. Some areas of the U.S. tend to be mostly Quark oriented; others, InDesign. Ask your vendor what they would prefer, and if there are any free or cheap alternative apps they'll accept documents from.
    Apple's Pages app (part of iWork) is a decent page layout program, but hasn't been updated in four years. It also doesn't support CMYK. If you place a CMYK image in the app, it will export out an RGB version of it. Not good! You can work with RGB images if you prefer, but your CMYK translations will be left to the skill of the print shop you use to do the conversions.
    Don't even think about using Word. It has what it calls a page layout option, and does pretty much work like one, but there's no good way to import it into a real layout app such as InDesign. You end up paying the printer for their time to rebuild your entire project in either XPress or InDesign so they can actually do something with it.

  • Is there any plug-ins that will show the missing text that couldn't be fitted in the created text box?

    Hello,
    I often work with long pieces of text that are too long to be fitted inside a pre-determined text box.
    I want to know how much text is not appearing inside of my text box without having to change the size of the text box. Is there any way of doing that? Perhaps via plug-in?

    If there is more text than will fit inside an area text object, the out port of the object will show as a red + sign. Select the object with the Selection tool. Click on the red + and the pointer becomes a "loaded text" icon. Click and drag on an empty space of the artboard, creating a new text object containing the overflow text. It may be necessary to resize the new text object to view all remaining text.

  • Is there a utility that will show the actual ram voltage in Windows?

    Sorry for the newbie question.  ASUS had this utility that showed the actual ram voltage in windows.  I don't think it'd work with an MSI motherboard.    And I don't think any of the overclocking utilities show the actual ram voltage.  The reason I asked was because the ASUS P5N-D overvolted my ram by .1 volts.    If I set 2.2v in the BIOS, it would overvolt the ram to 2.3v.  That's not exactly the greatest thing.  I just wanted to check if my brand spanking new P7N Diamond is doing the ram voltage accurately.  It should be right?  Oh and I have cheapo Patriot memory ram.  It's rated at 2.2 volts.  Seems like all PC2 6400 ram is rated at 2.2 volts these days though.  Maybe a 2.1v somewhere but that's becoming more and more rare.  Thanks.

    yeah...  LOL.  Everest shows what you've set it to.  I can just look in the BIOS or just like remember 2 seconds into the past.  :-P  I guess there isn't something for that.  Just as I thought.  I wonder if I can trick the ASUS utility into thinking that I'm running an ASUS board.  :-P  Probably wouldn't work right anyway though.

  • I need a logout script that will erase the standard user account data after logout.

    I have a lab of 35 Macbook Pros and I am trying to make it where when the user logouts, it will erase the data after they logout.
    I have found several articles about deleting user accounts when they login through AD, but this is not the case.
    Any help would be much help!

    Then when they are at those system they do not Login and if they do have to enter a password it is whatever it is for the Base user account that is setup. Right?
    I'd look at the Mac KB system to see if you can restrict saving to the local HDD but yet allow saving to a thumb drive or not.
    To do what you want the system would need to keep track of all files saved from time X to time Y, and those times would be every changing. Not sure you are going to get there from here.
    Not sure what you mean by Lab machines. I've worked in and gone to school at a Graphic art school and they have hundreds of Lab Mac's that each student must log into with there own user account when in different classes and when saving any of there work it gets saved on the server so it can be retrieved by them when they log into another system someplace else throughout the school or when using their own computer and connected to the schools network.
    I wish you the best of luck with this project.

  • I want to build an apple script that will parse the name of a file and sort it into folders.

    This is for medical application, so I will do it as such: CLIN_FAM_PAT_FILE_DATE.EXT sorts into Folders: Family/Patient/Type/Date, either sorting into folders that already exist (and make them shared folders eventually for each patient) or creating new folders with names as indicated by the file name.  The Prefix "CLIN" is an indication that the file is a clincial patient document and so needs to be filed.  Files without that prefix would be ignored. 
    So the file format would be:
    Family Folder
    Family DocumentsDocument Type folders
    Patient folders - for each person who is a member of that houshold unitDocument Type Folders (such as x-rays, lab reports, or insurance info)Within each document type, there would be separate folders based on the date (or at least the order of the docs would be by date)
    For example:   A document called CLIN_JONES123_JAMES228_LAB_022614.PDF which is a lab summary for James Jones done on 2/26/14 would go here
    JONES123 FolderJAMES228 FolderLab Results FolderFebruary 2014 Folder.
    Makes sense?  I am initially putting these files into a Filemaker Pro database and having it compile the files based on patient name, type, date, etc.  But need to use Applescript to create the folders so things are organized in a way that I can easily share with patients.
    Makes sense?

    You can call this script from Applescript (just need to do some escaping of quotes):
    This can be run in Applescript:
    do shell script "
    DestinantionFolder=$HOME/Desktop
    MONTHS=(January February March April May June July August September October November December)
    for f in ~/Desktop/*
    do
         if [[ $( echo \"${f##*/}\" | cut -d_ -f1 ) == \"CLIN\" ]] ; then
              ff=$( echo \"${f##*/}\" | cut -d_ -f2 )
              pd=$( echo \"${f##*/}\" | cut -d_ -f3 )
              date=$( echo \"${f##*/}\" | cut -d_ -f5 )
              date=${date%%.*}
              mo=${date:0:2}
              yr=20${date:4:2}
              Dir=$DestinantionFolder/$ff/$pd/${MONTHS[$mo-1]}\\ $yr/
              if [ ! -d \"$Dir\" ]; then
                   mkdir -p \"$Dir\"
              fi
              mv \"$f\" \"$Dir\"
         fi
    done"
    ...is there a way to trigger this whenever a new file is created to check and see if it needs to be moved
    Yes, with Automator.  When you Open Automator, choose Folder Action
    I copied what you did and while the script ran successfully, I don't see any new folders created.  Your shell script makes sense; I am not sure why it doesn't create folders.
    The script as written only looks for files in the Desktop Folder
    (edit by changing: DestinantionFolder=$HOME/Desktop )
    To test I created a file on my Desktop
      touch ~/Desktop/CLIN_JONES123_JAMES228_LAB_022614.PDF
    and Folders were created and the file moved.
    (Note: I only tested that format.  If the file has any other format, it will fail)

  • Need a powershell script that will modify the path of an existing Outlook 2010 OST file

    For new users we have a GPO in place that creates the OST file in the correct location.  The GPO also works on existing users who create a new Outlook Profile.
    The problem I am trying to solve is modifying an existing Outlook Profile and changing the location that the OST file is written to.
    I have to put the users OST file on the network.  Yes, I do know that this is not supported by Microsoft, but I have zero clients (WYSE units) on non-persistent VMware virtual machines.  This means they cannot keep the OST file on the PC. 
    Our email provider requires us to run in Cached-Mode so OST files are here to stay.
    Forcing 3000 users to create new Outlook profiles would not have a good outcome.
    I also have to relocate their PST files onto the network, which is also not supported.  I have been able to connect PST's with powershell, but disconnecting them has been challenging (can't make it work even once) so if I could get some help with that
    too that would be excellent.
    Thanks

    Hi,
    You may refer to the following article to create the registry keys and deploy it with logon script:
    http://www.slipstick.com/exchange/moving-outlook-ost-file/
    Best regards,
    Rex Zhang
    TechNet Community Support

  • Is there a place in my CS6 that will show the key so I can have Mac do a data transfer?

    My college provided all design graduates with a Macbook with CS6 Illustrator, Photoshop, InDesign, Dreamweaver, Fireworks, Bridge, Extension manager, and Flash installed and registered with the key to Adobe. My laptop that they gave has gone bad and is being replaced this weekend by myself since my school won't fix it(per their contract they are required to so I plan to go after them for this but int he meantime) The school never provided us with the license key for this CS6, they did the install themselves, is there a place in my programs on my laptop that I can go to in order to get this key so I can have Mac do a data transfer?

    Thanks, thats  a good resource. However, it doesn't help in my situation, I didn't [urchase this or install it directly thru Adobe, as stated my college, College america(famous for their promotion that if you go to school with them and graduate you get a free laptop with all of CS6 included) this means they installed it as a mass install on all Design students laptops. They originally gave us CS5 then sent us a link to a site for upgrading to CS6, the email said this from the college;
    Great News Regarding the Upgrade to CS6:
    As it has been announced in your Design courses the free upgrade to CS6 is now available for all active Graphic Arts and Web Design students.
    To get the upgrade please follow these 3 simple steps:
    1-     Copy and paste this link to your web browser:  getmyisos.myvalcom.net
    2-     Select the download for your specific computer (Mac or HP)
    It will take a long time to download, make sure you reset your “sleep” timer on your computer so it does not doze off during the download process.  When it is complete…
    When downloading the upgrade it (I guess, just speculating here) had the license bult in because it was never displayed it just downloaded and
    i have used it ever since. I of course tried contacting the school for this but when you graduate from them, and are no longer a potential student they can suck up to sell you on their courses, they stop responding and being nice.
    Does anyone have any other ideas? Is there a spot in the programs where if I open preferences in my Mac book or if I open he programs I can click something that displays the license in my laptop?
    Thanks

  • How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?

    How Do i create a list that will show in a dropdown box with the list being pulled from another tab and not the cell data format junk?
    I currently run OS X 10.10.1
    Now i have been trying to work on this for a while now and what i want to do should be simple but its apparently not.
    Here is an example of what i want to happen.
    I will have 2 tabs: Contact | Sales
    Now Contacts will have the list of names and various information about a customer, While Sales will have one drop-down box for each Cell Row that will show the names of the person in tab contacts
    for what i am wanting to do i cant use the data format pop-up menu because the list is edited everyday several times a day.
    Now how do i do this, Excel can do this so how can numbers do it?

    Hi Shegra,
    Paste this into a applescript editor window and run it from there. In the script you may need to adjust the four properties to agree with your spreadsheet. Let me know if you have any questions.
    quinn
    Script starts:
    -- This script converts column A in one table into an alphabetized list of popups. It copies the last cell in that column. Then reverts the column to text. It then refreshes popups in column A of a data table starting with a user defined row.
    property DataEntrySheet : "Sheet 1" --name of sheet with popups to be refreshed
    property DataEntryTable : "Sales" --name of table with popups to be refreshed
    set copyRange to {}
    property PopValueSheet : "Sheet 1" --name of sheet with popup values table
    property PopValueTable : "Contacts" --name of table with popup values
    set PopStartRow to {}
    tell application "Numbers"
      set d to front document
      set ps to d's sheet PopValueSheet
      set pt to ps's table PopValueTable
      set s to d's sheet DataEntrySheet
      set t to s's table DataEntryTable
      set tf to t's filtered --this records filter setting on data Entry Table
      display dialog "Start from row #..." default answer "" with icon 1 -- with icon file "Path:to:my.icon.icns" --a Week # row
      set PopStartRow to {text returned of result}
      tell pt --convert list to alphabetized popups
      set ptRows to count rows
      set copyRange to ("A2:" & name of cell ptRows of column "A")
      set selection range to range copyRange
      set selection range's format to text
      sort by column 1 direction ascending
      set selection range's format to pop up menu
      -- popupsmade
      set selection range to cell ptRows of column 1 of pt
      set v to value of cell ptRows of pt
      end tell
      activate application "Numbers"
      tell application "System Events" to keystroke "c" using command down
      tell pt
      set selection range to range copyRange
      set selection range's format to text
      end tell
      tell t
      set filtered to false
      set tRows to count rows
      set pasteRange to ((name of cell PopStartRow of column "A") & ":" & (name of cell tRows of column "A"))
      set selection range to range pasteRange
      tell application "System Events" to keystroke "v" using command down
      set filtered to tf
      end tell
    end tell

  • Is there an app that will show a photo's metadata for the iPad?

    It is said that "A picture is worth a thousand words" but without context it is only a picture. With context a photo can become a slice of life. Is there an app that will show the viewer the metadata that belongs to that picture?

    Have a look in the App Store for "EXIF viewer".
    There are quite a few free ones.

  • Script that will help validate if there is any data loss after a DB restore

    Hi,
    I need to write a single script that will perform the following
    operations:
    1)return me the highy accessed tables across all databases.
    2)List the count, Min and Max system date of the highy accessed tables returned from step 1.
    The idea is to validate if there is any data loss to the highly transactional tables after a database restore operation has been performed.
    Thanks.

    Hello,
    I would also like you to see nice blog by Aron,you can modify the script a bit to change according to your need
    http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
    Hello Shanky,
    The post would not be helpful too much for OP's requirement. The post was talking about when was the database last accessed. DMLs are not capturing in the script and also there will be many variant forms that can be applied for DML. Hence, I do not think,
    the script would help too much. 
    Or Am I missing something? 
    Latheesh as i mentioed OP has to modify the script little bit may be add User_seek,user_update,user_scans.Still IMO there is no *perfect* way to actually analyze this.So I pointed out point in my original post.Also unless he has some timestamp he cannot
    see min time when it was accessed ,max time can be taken from last user seek,scan,lookup time. Motive was to lethim know what he was trying to achieve cannot be axactly obtained by using sys.dm_index_usage_stats.Below query will give most accessed table
    : Source (Query)
    SELECT
    t.name AS 'Table',
    SUM(i.user_seeks + i.user_scans + i.user_lookups)
    AS 'Total accesses',
    SUM(i.user_seeks) AS 'Seeks',
    SUM(i.user_scans) AS 'Scans',
    SUM(i.user_lookups) AS 'Lookups'
    FROM
    sys.dm_db_index_usage_stats i RIGHT OUTER JOIN
    sys.tables t ON (t.object_id = i.object_id)
    GROUP BY
    i.object_id,
    t.name
    ORDER BY [Total accesses] DESC
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • I have purchased itunes match but the cloud will not load on my ipad 4.the only music that will show up is stuff that i bought from the itunes store.any ideas on how to get this to work?

    i have purchased itunes match but the cloud will not load on my ipad 4.it works on my iphone 5 & it originally worked on my ipad.the only music that will show up is stuff that i bought from the itunes store.any ideas on how to get this to work?

    On the MBP, in iTunes, switch to Song view and enable the iCloud Status column by pulling down View > View options and selecting the option for "iCloud Status." Close the small window. Look for any tracks that have a status of "waiting." If you see several of them disable iTunes Match while holding down the Option key. Quit iTunes, wait a few seconds, then open it again and turn iTM back on. Let it compelete the scan. Wait until all tracks that are "waiting" have a status of either "matched" or "uploaded."
    On the iPad, turn off iTunes Match then launch the Music app and let the contents clear out. Power cycle the iPad for good measure, then re-enable the service once all the tracks in iTunes have been processed.

  • 1. Firefox Help 2. Search Refine your search Found 0 results for I have a lot of firefox downloads BUT can't find anything to click to see them - Where is the button that will show all Firefox downloads? in English in English

    1. Firefox Help
    2. Search
    Refine your search
    Found 0 results for I have a lot of firefox downloads BUT can't find anything to click to see them - Where is the button that will show all Firefox downloads? in English in English

    Tools > Downloads or {Ctrl + J} will open the Downloads window

Maybe you are looking for

  • SAP GUI 7.10p15 weird problem on FB70

    Hi all, We upgraded SAP GUI 7.10 to patch level 15 from patch level 14 using the install server on our Windows XP machines. A weird problem seems to appear since then on FB70. You press once or twice the ENTER key, without filling any field on the sc

  • Will the iphone work with a blackberry email server

    I am about to start a new job.  I was told they have a blackberry email server.  Will I beable to recieve and create email using my work email address?

  • How to get HD presets in Premiere CS3?

    Hi, I use Adobe Premiere CS3 under W7 and I would like to import, process and export movie clips in HD resolution (1920 X 1080). The files to import  are video files  having a format .wmv or .mp4 with the above mentioned resolution and located on the

  • Video ITunes

    Please help me with my problem. I can not import video files to my Itunes Library. I tried both by drag and dropping directly from the folder and with the option add files to the library. In both cases nothing happens at all. Can anybody explain me w

  • Peformance of First_Value

    Hi , I want to know which of the two queries is better in terms of performance(using first_value or a sub query). Let us assume that salary is unique... 1) select first_value(ename ) over (order by sal) from emp; or 2) select ename from emp where sal