getting reference as string for rebuilding a reference
getting reference as string for rebuilding a reference
- Subject: getting reference as string for rebuilding a reference
- From: Adam Morris <email@hidden>
- Date: Tue, 25 Jan 2011 11:01:31 +0700
Hi there applescripters,
I'm scripting Pages, and the "get selection" gives me a reference like this:
text from character 44 to character 49 of body text of document id
1706710 of application "Pages"
What I want to do is calculate a new selection (say, from character
start_char to character end_char) based on that first, given,
selection.
With other languages I just convert the reference to a string and use
a regexp to extract the numbers, and then rebuild it. Yet in
Applescript, when I use "as text" for that reference, though, it
returns the actual text from the Pages application (as one would
expect).
The problem is, how can I get Applescript to store a part of a
reference into a variable?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden