Re: Replace all caps into plain
Re: Replace all caps into plain
- Subject: Re: Replace all caps into plain
- From: Hans Haesler <email@hidden>
- Date: Tue, 26 Dec 2006 21:40:12 +0100
On Tue, 26 Dec 2006, Jan Bultereys wrote:
>I would like to select every text which has "all caps" as style
>and replace it with plain:
Jan,
you don't need to select anything.
---
tell document 1 of application "QuarkXPress Passport"
activate
tell text box 1
tell every text style range
set style to {plain}
end tell
end tell
end tell
---
When using a test you must loop through the text
style ranges. Backwards, because their number might
change while running the script.
---
tell document 1 of application "QuarkXPress Passport"
activate
tell text box 1
repeat with i from (count of text style ranges) to 1 by -1
tell text style range i
if on styles of (get style) is {all caps} then
set style to {plain}
end if
end tell
end repeat
end tell
end tell
---
Regards,
Hans
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden