Find and delete the graphic lines of geometric limits

Hello world

I'm really desperate after days of web browsing and the forums that I still cannot understand this.

I'm working on InDesign CS3 on a MacBook Pro with Snow Leopard.

I have a catalog of 300 pages, set up thanks to a data merge. Unfortunately this way, I produce 2 graphic lines at the end of each page to which I would like rather to remove. Since I don't want to do it manually to each page and I'll have to set up this catalog quite frequently in the future I would like to remove these lines using Applescript.

Since I have about 12 more of the same lines on each page (same style, color, stroke etc) I thought that the only way to tell which Applescript to remove is the geometrical limitations because these lines always run the same coordinates on each page.

Unfortunately I can't understand it. I tried the following code:

tell application "Adobe InDesign CS3"
     tell document 1
          repeat with oneFrame in (get graphic lines whose stroke weight = 1)
               if geometric bounds of oneFrame is {0, 0, 0, 210} then
                    delete oneFrame
               end if
          end repeat
     end tell
end tell


RESPONSE

tell application "Adobe InDesign CS3"
     get every graphic line of document 1 whose stroke weight = 1
          --> {graphic line id 187 of page id 177 of spread id 172 of document "Untitled-16"}
     get geometric bounds of graphic line id 187 of page id 177 of spread id 172 of document "Untitled-16"
          --> {0.0, 0.0, 0.0, 210.0}
     delete graphic line id 187 of page id 177 of spread id 172 of document "Untitled-16"
end tell


It worked well for the line to x y 0mm 0mm with a length of 210mm.

I tried the same thing with a line x 3mm y 134mm length of 210mm with the following code

tell application "Adobe InDesign CS3"
     tell document 1
          repeat with oneFrame in (get graphic lines whose stroke weight = 1)
               if geometric bounds of oneFrame is {134, 3, 134, 213} then
                    delete oneFrame
               end if
          end repeat
     end tell
end tell



ANSWER:

tell application "Adobe InDesign CS3"
     get every graphic line of document 1 whose stroke weight = 1
          --> {graphic line id 213 of page id 177 of spread id 172 of document "Untitled-16"}
     get geometric bounds of graphic line id 213 of page id 177 of spread id 172 of document "Untitled-16"
          --> {134.0, 3.0, 134.0, 213.0}
end tell

It was my best shot. No idea if I'm on the right track or totally out of bounds.

Any help would be much appreciated!

Thanks in advance...

Osinho

Take a look at that show the values for the geometric limits. These figures related to your x and is coordinated and you refer to them by their article in the list, for example, item 1 is the first "134,0" in your list, point 2 is called the "3.0", etc. So you need to refer to "that item 2 of geometric limits = [regardless of the value you're trying to match].

If your document is very complicated, I think I would add another modifier to ensure that you get the right things, to say if these lines have a color that is not used on other graphic in the document lines, or if their weight of race is different, or even tests two items in the list of geometric limits if there is two that appear systematically in all the elements you want to delete - something for you make sure that you ONLY get references to the items that you want and are not likely to delete something, you need to keep.

Good luck and welcome to AppleScript!

Tags: InDesign

Similar Questions

  • How can I find and delete the app that keeps me close my office?

    Whenever I try to power off my desktop computer, I get a message that says "this app prevents you to close...". "or something. I don't know how to find and delete the app.

    Open the Task Manager by right clicking on the toolbar to see the programs running.

  • I am looking for an app to download which will find and delete the duplicate on my computer... If anyone can help...

    No good on this side of the computer... Computer works more slowly not as sharp as it was, I found a lot of files and duplicate files on it. Not understand or trust myself to remove anything manually.

    You might like to try these. Read their comments/user opinions 1-links provided:

    http://www.SnapFiles.com/reviews/CloneSpy/CloneSpy.html

    CloneSpy can help you recover hard disk space by detecting and removing duplicate files. It can find files that have the same exact content, regardless of their name, the date, time and location. CloneSpy is also able to search for files that are not identical, but have the same file name, allowing you to find and remove old versions of a file. Once the scan is completed, you can decide what you want to do with the found duplicates, CloneSpy you shows the details for each file (and its duplicate proposed) and allows to keep, move or delete.

    http://www.SnapFiles.com/reviews/duplicate-cleaner/duplicatecleaner.html

    Duplicate Cleaner is an easy to use program that helps you find and remove the duplicate computer files. You can search several structures of files at a time and set of criteria to identify duplicates. You can choose to search exact matches using the comparison of CRC or use the file name, size and date as the criterion. The program offers extended support for music files, allowing you to use the tag information ID (artist, title, album) to identify duplicate titles. The results are grouped together in a list and a selection wizard allows you to select quickly the files based on age, the audio quality, location and other aspects.

    See you soon.

    Mick Murphy - Microsoft partner

  • How to find and delete the dupes in Photos

    How to find and remove the many dupes in Photos

    Duplicate Finder in the App Store will clean the photo library. However, I would be careful to make sure that nothing is really a duplicate.

  • How to find and remove the corresponding line in British Colombia ADF

    Hello

    I have a table with simple fields and I created the class of java for this entity also
    Person
         - Person_Id (PK)
         - Person_Name
    I wanted to create a method of application module to find the entity corresponding to certain name
    but I can't find the code to do this.
    public class AppModuleImpl{
      public boolean deletePersonByName(String personName)
      {
        EntityDefImpl personDef = PersonImpl.getDefinitionObject();
        //How to get all rows and find the matching name then delete the row
       
        return false;
      }
    }
    Thank you
    11.1.1.5 Jdev

    You can do findByKey or getfilteredrows to get the lines and you can then delete.

  • y at - it an easy way to find and delete the photos duplicated Gallery photo, or do I keep just scrolling and deleating

    I have several duplicate images and that you must remove to free up space ago filed either by date or name, and I thought that maybe there was a SHOW duplicates file as in itones

    Hello

    You will not be able to find duplicate files and remove all automatically. You must locate and remove it manually.

    There are several third-party programs that could help you find the duplicate on the computer files, and delete them. I suggest that you use your favorite search engine for these programs.

    DISCLAIMER of THIRD PARTY SOFTWARE: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    See also: http://windows.microsoft.com/en-US/windows-vista/Eliminate-duplicate-files

  • How to find and save the subject line in thunderbird

    I need to search the mails and export lines referred to Excel.

    After a thorough review, it appears there are a few bugs in the add-on: right click on a selection of messages, then "save messages selected/just index (CSV)" does not create a csv file, and choose a few index (HTML) produces an empty index.html file. By selecting 'Spreadsheet (CSV)' produces a csv file, but it contains the message body.

    However, if you right click on a folder, then ImportExportTools/export all messages in the folder/just index (CSV), a csv file is created with columns for the sender, the subject, the recipient and the Date.

    So, until the bugs are fixed, it seems that you have to copy the search results in a folder for the purpose of creating the csv file correct; Open in Excel, and remove the unwanted columns.

  • Windows Media Player 11 has a way to find and delete the dupes

    Using Windows Media Player 11, is there a way to search and remove duplicate music files?

    Hi Ibedennis,

    You can try the following steps and check:

    Method 1:

    To resolve this problem, delete the Windows Media Player database. To do this, follow these steps:

    a. exit Windows Media Player.

    b. click Start, click run, type %LOCALAPPDATA%\Microsoft\Media Playerand then click OK.

    c. Select all files in the folder and then click on Delete on the file menu.

    Note: You don't have to remove the folders that are in this folder.

    d. restart Windows Media Player.

    Note: Windows Media Player automatically rebuilds the database.

    Method 2:

    If this does not resolve the problem, disable the Windows Media Player database cache files. To do this, follow these steps:

    a. exit Windows Media Player.

    b. click Start, click run, type %LOCALAPPDATA%\Microsoftand then click OK.

    c. Select the Media Player folder, and then click on Delete on the file menu.

    d. restart Windows Media Player.

    Note: Windows Media Player automatically rebuilds the database.

  • Where can I find / and delete the HD of a toshiba satellite 1620 CDS?

    I have a problem with my hard drive from my toshiba 1620.
    I want that he should be replaced, but when I unscrew the back cover of the laptop there is no way that I can remove the cover.
    Can someone tell me how to access the HD?

    With the best regards.

    Hello

    As far as I know the HARD drive is under the keyboard. Keyboard is fixed by 4 screws. Remove and turn the keyboard (face down) on the touchpad. You will see two screws that attach the HARD drive. I hope you know what you need to do now.

    Please be careful because all parts of this material are very sensitive and you can damage it. If you are not sure you can do it yourself, contact the Service partner. If you manage on the wrong path the pins on the HARD drive may be damaged.

    If you only do you it on your own risk.

    Good luck!

  • where can I find and delete the LowerFilters entry

    I have instructions to remove the upper filters registry entry that I did. Step 2 is to remove the registry entry filters low but which shows not under expansion control and extend the class.

    Is there another way to remove the lower registry filters?

    If it isn't there, you don't have to remove it.  But make sure that you are looking in the appropriate device class.

    See http://pcsupport.about.com/od/driverssupport/ht/upperfilters-lowerfilters.htm

  • I accidentally deleted the program from my computer creative cloud, were can I find and download the program again?

    Hi, I accidentally deleted the program from my computer creative cloud, we can I find and download the program again?

    See if the links on this page to work:

    http://www.Adobe.com/appsmanager/

  • find and eliminate the zero length paths in a drawing

    Hello

    I frequently get drawings of a CAD system that unfortunately contain paths with a length of zero, meaning point of the path and endpoint ar exactly to the same starting point.

    I tried to combine a routine, which would be to find and delete these paths, but I'm a complete newbie to jsx, and now I'm stuck.

    My routine seems to find these paths and access in the alert box inserted for the said trial that they suck. But when I try to remove them, it does not work.

    Here's what I have so far:

    function getDistance (startPoint, endPoint) {}
    Rise = Math.ABS (StartPoint.Anchor [0] - Endpoint.Anchor [0]);
    Run = Math.ABS (StartPoint.Anchor [1] Endpoint.Anchor [1]);
    Return (Math.sqrt ((Rise*Rise) + (Run * Run)));
    }

    var geloescht = 0
    for (i = 0; i < selection.length; i ++) {}
    currentPath = selection [i]
    var Groesse = getDistance(currentPath.pathPoints[0],currentPath.pathPoints[1])
    Alert (Groesse)
    If (Groesse = 0) {}
    currentPath.remove)
    geloescht = geloescht + 1
    }
    }

    I also tried to put the line "if (Groesse = 0) {}" to "if (Groesse < 0.05) {}" but which removes the paths I need to keep (in fact even those whose length is more than 50 mm). Where can I go wrong

    Replace this:

    If (Groesse = 0) {}

    With this:

    If (Groesse == 0) {}

    (in JavaScript a single medium "=" assign a value and a double a way to compare two values)

  • Add, change and delete the file "iTunes" on a NAS

    I have just said "Apple Support Community" by Apple Support.

    The title probably sums up what I'm trying to do. I'm looking for a way to add, change, and delete files on a NAS.

    Hardware: MacBook Pro 15, 1 TB of storage, 16 GB memory, OSX El Capitan.

    NAS: Qnap TS - 453 has: storage nominally 16 TB, up to about 5 TB.  4 WD 4TB disks in a RAID 5 configuration.

    a Vaio WIN10 as well as a smaller MacBook (my wife)

    The purpose of the NAS is to provide a backup system for computers and act a server "iTunes."

    I acquired the NAS after the death of my WD MyBook live in December 2015 after five years of reading backup and "iTunes" to my computer and the Sonos system.

    After two months of 'getting to know you' with the NAS, I finally managed to configure the server "iTunes" and Mirabile Indo-European it works!  I'm just doing the SIN to a back-up for computers.

    Now for the question: I am looking for an app (for lack of a better term) that will allow me to add and remove files to and from the NAS "iTunes" folder

    My search for a solution so far has indicated that:

    (1) NAS' iTunes folder is not really true Apple iTunes and

    (2) I need something that is DAAP (Digital Audio Access Protocol) friendly, that would allow me to add, change and delete the files.that would allow me to add, edit and delete files.

    I'm not looking for something that would synchronize the files iTunes NAS to one of my computers, I am all prepared to do myself if necessary.

    If I can't find an application so I use the app 'Brute Force' change my Mac iTunes required records and download again to my NAS.

    Why do you need an app to put the files in a folder on the NAS Server?  Make them just above in the Finder.  Maybe I'm missing just your problematic here.  Do you mean add your PEMA files to iTunes? I've never used this file format, but kind of, I would be very surprised if iTunes supported it.

    the NAS iTunes folder is not really true Apple iTunes

    I don't understand what you're trying to say here.  "Apple iTunes" is an application. Yes, a folder is not an application.

    Be warned, we see not few messages from people that use iTunes with a NAS. Often the problems cannot be explained. sometimes just iTunes and NAS disagree togther.

  • How can I find (and remove) the source of this irritation

    With irritating regularity, a dialog box appears on my screen that says "sh: / usr/bin/lockfile: no such file or directory (127) '."  How can I find and eliminate the source of this thing?

    Please update "SuperDuper" to the current version, or delete it if you don't need.

  • Find and remove the dependence of the IMAQ

    Have a great project claims there addictive IMAQ, and at the same time she did. I thought all IMAQ screws have been removed from the project, but the library IMAQ is always listed in the dependencies of the project vi.lib. Looking for the project "IMAQ" refers to the location of the dependent files, but so far I have not been able to find in the code that is actually used. I want to remove this dependency of my project completely. Any suggestions on how I can find where this dependence occurs? So far, I've been unable to find.

    Of course, it is nice to have a Manager with tons of experience of LabVIEW.  Managed to find the culprit who held the dependencies of the Vision in my project.

    Find the culprit VI means interested in everything listed in the vi.lib of my project dependencies.  I would check for the appellants to any suspect screws, and of course, I found the one I was looking for pretty quickly.  (.. .not sure why it was so elusive yesterday...)  The VI is one that has been used is not at all in the draft, but was still part of the project, which meant that all its dependencies were too.

    Right click and delete the VI of the project; and magically all the dependencies of the vision disappeared.

Maybe you are looking for

  • I want to replace my list of bookmarks with an import html file - how can I do this?

    I have a file of bookmarks in Firefox. I want to replace the file - delete the current as well as all bookmarks - import a new HTML file to bokmark to serve to my bookmark list primary. How can I do this? Thank you very much John

  • Citadel of backup does not not on Server 2008

    I use Lookout 6.7 I just updated from Windows XP to Windows Server 2008 R2 Standard. The process went very well. I was able to take the files of the project and the new easy to machine. I was able to archive the data from the old computer to the new

  • How to find zeros in a file of spred sheet

    I have a file of sheet of broadcast having 33 column I want to find is there no zero in one of the columns, how this can be done easily.searching a table to a dimension is a long time since the file size is very large Thanks for your time concerning

  • AutoCorrect Macro

    What is the code must be added to the macro below so that it stores also up as AutoCorrect entries. I saw a utility that backs up the entries formatted too, but it is impossible to save large automatic fix, that allows to make this macro.  So, I need

  • Problem printer since recent updates.

    I can print, but cannot enter the tab "Properties" to change settings such as a 'project' or only in black and white printing.  This has happened since the last updates.  My printer is a HP Deskjet #F4140 all-in-one.  Thanks for your help.  Diane