RE: Acrobat scripting2
RE: Acrobat scripting2
- Subject: RE: Acrobat scripting2
- From: email@hidden
- Date: Wed, 1 May 2002 09:58:00 -0500
First of all you need to describe a little more clearly, or in greater
detail what text you are trying to capture. Is it a specific string in each
document you are trying to isolate? If so, you might try a "find text"
syntax rather than a "select text" syntax.
Like this:
untested code to follow...
------------------------------
set myDoc to name of AVPageView 1
find text myDoc string "<your search string text here>"
------------------------------
end code
>
I have a PDF file of 355 pages, I want to select some words in every page
>
after 3 lines, but this 3 lines is not contains equal words
Is there a keyword in this text you might could do a filtered reference of
some kind.
I don't see an element or event in Acrobat's dictionary to deal with lines
themselves so you need to look for a way to isolate the set of words you are
trying to capture.
>
repeat 355 times
Another potential problem I see so far is stepping through the 355 pages of
your PDF. After testing your code, I couldn't get this repeat to, well
repeat. I think you need to set up a counter that counts the number of pages
in the document and repeats based on that count. Just looking through the
dictionary you will probably also need to employ a "goto next" construct to
have Acrobat step through pages to find or select text on each page.
>
the x became in defirent place, because the lines before contain a diferent
>
size
When you set up these lines in your script...
>
set x to 10
>
from words { x , 1}
>
set x to x +20
On the first pass of the repeat, Acrobat selects word 10, right?
Then you set x to x + 20 or 30, so the next pass through the repeat Acrobat
selects word 30, if I am reading the syntax correctly.
If you can determine with some certainty what increment it will take to land
on the particular word or words you are wanting to capture, this might work,
but by then you would have gone thru the document manually counting words
trying to decide whether or not you can get to them programmatically. Kinda
self defeating.
Still, without a firmer grasp on what you are trying to accomplish, I may be
clouding the issue more than helping.
Kev
--
Kevin Talbert
L2 Support, Macintosh
(501)376.5226
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.