Skip to My Loo?
Skip to My Loo?
- Subject: Skip to My Loo?
- From: email@hidden
- Date: Sat, 31 May 2003 00:06:43 EDT
There is a rather odd bit of behavior being exhibited by one of my scripts
for QuarkXPress. (Mac OS 8.6, QXP version 4.11.)
The script in question breaks apart paragraphs that consist of a single line
of digits into separate paragraphs, deletes those that fail to meet a
condition, and then reassembles the remaining sets of numbers back into a single
paragraph. Simple enough, except when it gets to the end of the document, where
several paragraphs of text follow those hundreds of paragraphs of pure numbers.
[Note: These paragraphs of numbers consist of forward slashes, digits, dashes,
and tabs. There are NO spaces or characters.]
At that point, instead of deleting each paragraph of text (which it should do
because none of it meets the "condition") it skips over EVERY OTHER
paragraph, leaving it untouched. Why does it do this?
The command FOR DELETION is as follows:
repeat with n from 1 to 425
try
get every text of paragraph n
if (text of paragraph n contains "/" or ,
text of paragraph n contains phoneNumbers) is false then
(delete paragraph n)
else
get every text of paragraph n
end if
on error
exit repeat
end try
end repeat
_______________________________________________
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.