1 Reply Latest reply on Mar 28, 2015 5:21 AM by abendm

    Script to extract pages with comments

    abendm

      I know that what I would like to do is probably quite simple. I'm trying to automatically take a source document, and extract all pages with comments to a new document.  Ideally, I would have multiple versions of this script for different purposes.  I used to be a business analyst years ago, but it's been years since I've written any code, and even back then I used SQL almost exclusively--it's been about 12 years since I've written any code other than SQL queries, and back then it was highschool projects written in C++ before OOP was really a big thing.  I'd attempt to read documentation myself and figure it out, but I really don't even know where to start -- my CS knowledge at this point is pretty much only conceptual.  Whenever I have a similar VBscript problem using MS software, usually all I do is find an existing function and modify one or two lines to meet my needs, so I've never really had to learn how the scripts I've used work.  I just tinker with existing stuff to get what I need.  My past coding experience does give me an idea is to the general algorithm that I think would work.  To show that I really tried with this one, I paste my guess as to how I would code this below: 


      1)     Create For loop for source doc.

      2)     Create FOR loop for new doc

      3)     Analyze page in source doc

      4)     IF source page has any comments or highlighting THEN somehow note that page and increment "new doc" counter

      5)     Increment source doc counter

      6)     Repeat 3-5 until all pages in source doc have been analyzed

      7)     Create new file

      8)     Extract pages noted during step 4 to new file.

       

      If someone could help me create the above script, I would probably be smart enough to get it to meet my needs.  What I'd really like are two versions of that script.  If asking for the community to simply provide me with code is not a cool thing to do, could someone link me to a good tutorial and/or existing scripts so I could try and figure it out myself?

       

      1)     One that extracts only pages with text comments (using the typewriter tool).

      2)     One that extracts pages with highlights or text comments.