Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quark text search/replace query



Hi Nick,

Am 01.03.2007 um 11:48 schrieb Nick Hearn:


***Before acting on this email or opening any attachment you are advised to read the disclaimer at the end of this email***
************************************


Hi there,

Please can someone clarify this for me. I’ve been doing some automation with Quark that involves the search/ replacing of text.
On the whole eveything has worked fine until I started another project the other day.


This project involves several text replacements on the same page of what will be a multi-page document. Everything started ok however now I’ve hit a slight snag in that I’m now getting the following error:-

QuarkXpress got an error: Can’t set contents of every line of document whose it = “xxx” to “yyy”

I’ve had a read through my Shirley Hopkins book to try and ascertain whether or not I need to search a ‘line’, ‘paragraph’ or ‘story’ but having tried a few variations this hasn’t helped.

The trimmed down search looks like this:-


tell application "QuarkXPress"
activate
tell front document
set (contents of text of every story where it = "test") to "replaced"
end tell
end tell




Try this:

tell application "QuarkXPress"
	tell document 1
		set contents of every text of every story where it = "xxx" to "ZZZ"
	end tell
end tell

Peter



_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Quark text search/replace query (From: Nick Hearn <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.