Change font

Discuss AppleScripting for QuarkXPress 10, 9 & 8 (and before)
Post Reply
LittleIron
Posts: 0
Joined: 22 Oct 2007, 03:56

Change font

Post by LittleIron » 05 Sep 2014, 10:47

Hi all, I'm not a developer.
Is it possible, using AppleScript, change font of all character in all story is using specific font?
Best Regards
LittleIron

LittleIron
Posts: 0
Joined: 22 Oct 2007, 03:56

Re: Change font

Post by LittleIron » 16 Sep 2014, 02:57

I have some Chinese word in Occident story and I need to change font only to these word. I tried as follows but it didn't run.
Someone know how to do it?

tell application "QuarkXPress"
tell document 1
try
set (every text of every story where font is "华文黑体") to "HYCuHeiJ"
end try
end tell
end tell

It is not a Chinese font problem, it is not running using Arial or Times.
Best Regards

Jean-Marie Schwartz
Posts: 1168
Joined: 23 Nov 2004, 04:30

Re: Change font

Post by Jean-Marie Schwartz » 16 Sep 2014, 03:54

Try this:

Code: Select all

tell application "QuarkXPress"
	tell document 1
		set font of (every text style range of every story whose font is "华文黑体") to "HYCuHeiJ"
	end tell
end tell
Jean-Marie Schwartz

= Mac Pro Quad-Core Intel 2.8 GHz • 10 Go 1066 MHz DDR3 • Mac OS 10.10.5 • QuarkXPress 9.5.4.1 + QuarkXPress 2017 • Adobe CS5 =

LittleIron
Posts: 0
Joined: 22 Oct 2007, 03:56

Re: Change font

Post by LittleIron » 16 Sep 2014, 05:11

ok,it is running :D
Thank you very much
LittleIron

Post Reply

Return to “QuarkXPress 8, 9 & 10: AppleScript”